public static function register_option_assets() { $WP = \EzFilter\getWpObject(); wp_register_script($WP->plugin_domain . "-settings-js", plugins_url('/assets/js/options.js', $WP->plugin_file)); wp_register_script($WP->plugin_domain . "-post-js", plugins_url('/assets/js/post.js', $WP->plugin_file)); wp_register_style($WP->plugin_domain . "-post-css", plugins_url('/assets/css/posts.css', $WP->plugin_file)); wp_register_style('jquery-style', 'http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.1/themes/smoothness/jquery-ui.css', true); }
function ez_filter_option() { $WP = \EzFilter\getWpObject(); $data['plugin_domain'] = $WP->plugin_domain; $data['option_updated'] = false; if (isset($_POST['submit-' . $data['plugin_domain']])) { if ($varify = wp_verify_nonce($_POST['nonce_' . $data['plugin_domain']], $data['plugin_domain'])) { $data['option_updated'] = update_option($data['plugin_domain'], $_POST[$data['plugin_domain']]); } } $data['settings'] = $WP->getSettings(); $data['filter_types'] = $WP->filter_types; $this->load->view('option', $data); }
function __construct(Loader &$loader) { $this->load = $loader; $this->WP =& \EzFilter\getWpObject(); }