plugin_dir = $adminPress->plugin_dir; $this->plugin_url = $adminPress->plugin_url; $this->version = $adminPress->version; $this->options = $adminPress->options; } add_filter( 'adminpress_form', array( $this, 'AjaxSearch_style_form' ), 19 ); add_action( 'admin_enqueue_scripts', array( $this, 'search_admin_theme_style' ) ); } public function search_admin_theme_style() { if( isset( $this->options['enable_ajax'] ) && $this->options['enable_ajax'] == 1 ){ wp_enqueue_style( 'ajaxcss', $this->plugin_url . 'modules/ajax_search/ajax.css' ); wp_enqueue_script( 'ajaxjs', $this->plugin_url . 'modules/ajax_search/ajax.js', array( 'jquery' ) ); } } public function AjaxSearch_style_form( $form ) { ob_start(); ?>

options['enable_ajax'] ) && $this->options['enable_ajax'] == 1 ? 'checked="checked"' : '' ?> type="radio" name="admp[enable_ajax]" value="1" class="toggle-radio" /> options['enable_ajax'] ) && $this->options['enable_ajax'] == 0 ? 'checked="checked"' : '' ?> type="radio" name="admp[enable_ajax]" value="0" class="toggle-radio" />