/** * Constructor. * * @since 1.0.0 * * @access public * @param Visualizer_Plugin $plugin The instance of the plugin. */ public function __construct(Visualizer_Plugin $plugin) { parent::__construct($plugin); $this->_addAjaxAction(Visualizer_Plugin::ACTION_GET_CHARTS, 'getCharts'); $this->_addAjaxAction(Visualizer_Plugin::ACTION_DELETE_CHART, 'deleteChart'); $this->_addAjaxAction(Visualizer_Plugin::ACTION_CREATE_CHART, 'renderChartPages'); $this->_addAjaxAction(Visualizer_Plugin::ACTION_EDIT_CHART, 'renderChartPages'); $this->_addAjaxAction(Visualizer_Plugin::ACTION_UPLOAD_DATA, 'uploadData'); $this->_addAjaxAction(Visualizer_Plugin::ACTION_CLONE_CHART, 'cloneChart'); }
/** * Constructor. * * @since 1.0.0 * * @access public * @param Visualizer_Plugin $plugin The instance of the plugin. */ public function __construct(Visualizer_Plugin $plugin) { parent::__construct($plugin); $this->_addAction('load-post.php', 'enqueueMediaScripts'); $this->_addAction('load-post-new.php', 'enqueueMediaScripts'); $this->_addAction('admin_footer', 'renderTempaltes'); $this->_addAction('admin_enqueue_scripts', 'enqueueLibraryScripts'); $this->_addAction('admin_menu', 'registerAdminMenu'); $this->_addFilter('media_view_strings', 'setupMediaViewStrings'); $this->_addFilter('plugin_action_links', 'getPluginActionLinks', 10, 2); $this->_addFilter('plugin_row_meta', 'getPluginMetaLinks', 10, 2); }
/** * Constructor. * * @since 1.0.0 * @uses add_filter() To add "do_shortcode" hook for "widget_text" and "term_description" filters. * * @access public * @param Visualizer_Plugin $plugin The instance of the plugin. */ public function __construct(Visualizer_Plugin $plugin) { parent::__construct($plugin); $this->_addAction('wp_enqueue_scripts', 'enqueueScripts'); $this->_addShortcode('visualizer', 'renderChart'); // add do_shortocde hook for widget_text filter if (!has_filter('widget_text', 'do_shortcode')) { add_filter('widget_text', 'do_shortcode'); } // add do_shortcode hook for term_description filter if (!has_filter('term_description', 'do_shortcode')) { add_filter('term_description', 'do_shortcode'); } }
/** * Constructor. * * @since 1.0.0 * * @access public * @param Visualizer_Plugin $plugin The instance of the plugin. */ public function __construct(Visualizer_Plugin $plugin) { parent::__construct($plugin); $this->_addAjaxAction(Visualizer_Plugin::ACTION_GET_CHARTS, 'getCharts'); $this->_addAjaxAction(Visualizer_Plugin::ACTION_DELETE_CHART, 'deleteChart'); $this->_addAjaxAction(Visualizer_Plugin::ACTION_CREATE_CHART, 'renderChartPages'); $this->_addAjaxAction(Visualizer_Plugin::ACTION_EDIT_CHART, 'renderChartPages'); $this->_addAjaxAction(Visualizer_Plugin::ACTION_UPLOAD_DATA, 'uploadData'); $this->_addAjaxAction(Visualizer_Plugin::ACTION_CLONE_CHART, 'cloneChart'); // Added by Ash/Upwork if (defined('Visualizer_Pro')) { global $Visualizer_Pro; list($action, $name, $class) = $Visualizer_Pro->_getAjaxAction($this); $this->_addAjaxAction($action, $name, $class); } // Added by Ash/Upwork }
/** * Constructor. * * @since 1.1.0 * * @access public * @param Visualizer_Plugin $plugin The instance of the plugin. */ public function __construct(Visualizer_Plugin $plugin) { parent::__construct($plugin); $this->_addFilter(Visualizer_Plugin::FILTER_GET_CHART_SERIES, 'filterChartSeries', 1, 2); $this->_addFilter(Visualizer_Plugin::FILTER_GET_CHART_DATA, 'filterChartData', 1, 2); }
/** * Constructor. * * @since 1.0.0 * * @access public * @param Visualizer_Plugin $plugin The instance of the plugin. */ public function __construct(Visualizer_Plugin $plugin) { parent::__construct($plugin); $this->_addAction('init', 'setupCustomPostTypes'); $this->_addAction('plugins_loaded', 'loadTextDomain'); }