public function __construct($jsBaseUrl, $pointersJsVar)
 {
     parent::__construct('admin_enqueue_scripts', 500);
     $this->pointersJsVar = $pointersJsVar;
     $this->script = new WPscriptFeaturePointer('installPointer' . $this->pointersJsVar, $jsBaseUrl . 'installPointer.min.js', $jsBaseUrl . 'installPointer.js');
     $this->pointers = array();
 }
Example #2
0
 public function register()
 {
     add_action('customize_preview_init', array($this, 'loadScript'));
     add_action('customize_save_after', array($this, 'save'));
     add_action('customize_controls_enqueue_scripts', array($this, 'enqueueAssets'));
     add_action('customize_register', array($this, 'customizeDefault'), 50);
     parent::register();
 }
Example #3
0
 public function __construct(WPmetabox $metabox, WPSaveMetabox $saveaction = null)
 {
     parent::__construct(array('load-post.php', 'load-post-new.php'));
     $this->saveaction = $saveaction;
     if (is_null($this->saveaction)) {
         $this->saveaction = new WPSaveMetabox();
     }
     $this->metabox = $metabox;
 }
Example #4
0
 public function __construct($handle, $name, $data)
 {
     if (is_admin()) {
         parent::__construct('admin_enqueue_scripts', 10000, 1);
     } else {
         parent::__construct('wp_enqueue_scripts', 10000, 1);
     }
     $this->handle = $handle;
     $this->name = $name;
     $this->data = $data;
 }
Example #5
0
 public function __construct(View $view, $parent_slug = 'options-general.php', $page_title = 'Custom Menu', $menu_title = 'Custom Menu', $menu_slug = 'custom-menu', $capability = 'manage_options')
 {
     //Low priority so that all options from other features are loaded before panel is displayed
     parent::__construct('admin_menu', 10000);
     $this->view = $view;
     $this->setParentSlug($parent_slug);
     $this->setPageTitle($page_title);
     $this->setMenuTitle($menu_title);
     $this->setMenuSlug($menu_slug);
     $this->setCapability($capability);
     $this->register();
 }
Example #6
0
 public function __construct($mbId, $title, $postType, $context = 'advanced', $priority = 'default', $saveableClass = null, $callbackArgs = null)
 {
     parent::__construct('add_meta_boxes', 10, 2);
     $this->mbId = $mbId;
     $this->title = $title;
     $this->postType = $postType;
     $this->context = $context;
     $this->priority = $priority;
     $this->saveableClass = $saveableClass;
     $this->callbackArgs = $callbackArgs;
     $this->nonceAction = $this->mbId . '_nonceaction';
     $this->nonceName = $this->mbId . '_noncename';
     if (is_null($saveableClass)) {
         $this->saveableClass = '\\WPCore\\WPcustomPost';
     } elseif (!in_array('WPCore\\admin\\WPpostSaveable', class_implements($saveableClass))) {
         throw new \InvalidArgumentException("WPmetabox saveableClass must be the name of a class that implements WPCore\\WPpostSaveable interface");
     }
 }
Example #7
0
 public function __construct(View $view, $pageTitle = null, $menuTitle = null, $menuSlug = null, $capability = null, $iconUrl = null, $position = null)
 {
     //Low priority so that all options from other features are loaded before panel is displayed
     parent::__construct('admin_menu', 10000);
     $this->view = $view;
     if (!empty($pageTitle)) {
         $this->setPageTitle($pageTitle);
     }
     if (!empty($menuTitle)) {
         $this->setMenuTitle($menuTitle);
     }
     if (!empty($menuSlug)) {
         $this->setMenuSlug($menuSlug);
     }
     if (!empty($capability)) {
         $this->setCapability($capability);
     }
     if (!empty($iconUrl)) {
         $this->setIconUrl($iconUrl);
     }
     if (!empty($position)) {
         $this->setPosition($position);
     }
 }
Example #8
0
 public function __construct(WPscript $script)
 {
     $this->script = $script;
     parent::__construct('wp_enqueue_scripts', 5, 1);
 }
Example #9
0
 public function __construct()
 {
     parent::__construct('wp_enqueue_scripts', 100, 1);
 }
Example #10
0
 public function __construct(View $view)
 {
     parent::__construct('admin_head');
     $this->view = $view;
 }
Example #11
0
 public function __construct(View $view)
 {
     parent::__construct("admin_init");
     $this->view = $view;
 }
Example #12
0
 public function __construct()
 {
     parent::__construct('admin_init');
 }
Example #13
0
 public function __construct($msg, $classtype = 'message error')
 {
     parent::__construct('admin_notices');
     $this->msg = $msg;
     $this->classtype = $classtype;
 }
Example #14
0
 public function __construct()
 {
     parent::__construct('wp_insert_post', 100, 1);
 }
Example #15
0
 public function __construct($showOnProfile = true)
 {
     parent::__construct('admin_init');
     $this->showOnProfile = $showOnProfile;
 }
Example #16
0
 public function __construct()
 {
     parent::__construct('save_post', 10, 2);
 }