[ 'key' => 'll_at_accessibility_menu', ], 'Enable' => [ 'key' => 'll_at_enable' ], 'Hide on scroll' => [ 'key' => 'll_at_hide_on_scroll' ], 'Hide on touch' => [ 'key' => 'll_at_hide_on_touch', ], 'Check image alt text' => [ 'key' => 'll_at_check_image_alt', ], 'Check all phone and email links' => [ 'key' => 'll_at_check_phone_email_links', ], 'Hide background images on contrast change' => [ 'key' => 'll_at_hide_bg_contrast', ], 'Enable button/link outlines on hover' => [ 'key' => 'll_at_enable_outlines', ], 'Enable accessibility menu' => [ 'key' => 'll_at_enable_accessibility_menu', ], ]; public $options = [ 'Accessibility Menu' => [ 'key' => 'll_at_accessibility_menu', ], 'Enable' => [ 'key' => 'll_at_enable' ], 'License' => [ 'key' => 'll_at_license' ], 'License Status' => [ 'key' => 'll_at_license_status' ], 'Hide on scroll' => [ 'key' => 'll_at_hide_on_scroll' ], 'Hide on touch' => [ 'key' => 'll_at_hide_on_touch', ], 'Check image alt text' => [ 'key' => 'll_at_check_image_alt', ], 'Check all phone and email links' => [ 'key' => 'll_at_check_phone_email_links', ], 'Hide background images on contrast change' => [ 'key' => 'll_at_hide_bg_contrast', ], 'Enable button/link outlines on hover' => [ 'key' => 'll_at_enable_outlines', ], 'Enable accessibility menu' => [ 'key' => 'll_at_enable_accessibility_menu', ], ]; public function init() { } public function getOptions($data = [],$frontend = false){ $options = []; if($frontend){ foreach($this->options_frontend AS $label => $option){ $options[$option['key']] = get_option($option['key']); } } else { foreach($this->options AS $label => $option){ $options[$option['key']] = get_option($option['key']); } } return [ 'options' => $options, ]; } public function updateOption($label, $value){ update_option($this->options[$label]['key'], $value); } public function updateOptions($data){ $options = $data['options']; foreach($options AS $option => $value){ update_option($option, $value); } License::getInstance()->check([],true); return [ 'success' => 1, 'ispro' => get_option('ll_at_license_status'), ]; } }