public static function instance() { if (is_null(self::$_instance)) { self::$_instance = new self(); } return self::$_instance; }
function init_mce_plugin() { if ($this->can_output()) { // print modal dialog dom add_action('admin_footer', array($this, 'print_modal')); // populate scripts and styles dependencies $loader = VP_WP_Loader::instance(); $loader->add_types($this->get_field_types(), 'shortcodegenerator'); } }
public function register_fields() { $loader = VP_WP_Loader::instance(); $loader->add_types($this->get_field_types(), 'metabox'); }
public function enqueue_scripts_and_styles() { $opt_loader = VP_WP_Loader::instance(); $opt_loader->add_types($this->get_field_types(), 'option'); $opt_loader->add_main_js('vp-option'); $opt_loader->add_main_css('vp-option'); $opt_loader->add_js_data('vp-option', 'custom_local.name', $this->_option_key); $opt_loader->add_js_data('vp-option', 'custom_local.SAVE_SUCCESS', VP_Option_Control_Set::SAVE_SUCCESS); $opt_loader->add_js_data('vp-option', 'custom_local.SAVE_NOCHANGES', VP_Option_Control_Set::SAVE_NOCHANGES); $opt_loader->add_js_data('vp-option', 'custom_local.SAVE_FAILED', VP_Option_Control_Set::SAVE_FAILED); }
function vp_enqueue_scripts() { $loader = VP_WP_Loader::instance(); $loader->build(); }
function vp_enqueue() { $loader = VP_WP_Loader::instance(); wp_enqueue_script(array('jquery-ui-sortable')); $loader->build(); }
/** * Register VP fields * * @access public */ public function registerFields() { $loader = \VP_WP_Loader::instance(); $field_types = $this->getControlsType(); $loader->add_types($field_types, 'widgets'); }
/** * add requireds css and js scripts * * @access private * @return void */ private function addScripts() { $loader = \VP_WP_Loader::instance(); $loader->add_main_css('vp-metabox'); }