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(); }
public function __construct(WPScript $livePreviewScript = null) { parent::__construct('customize_register', 10, 1); if (!is_null($livePreviewScript)) { $this->livePreviewScript = $livePreviewScript; } }
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; }
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; }
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(); }
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"); } }
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); } }
public function __construct(WPscript $script) { $this->script = $script; parent::__construct('wp_enqueue_scripts', 5, 1); }
public function __construct() { parent::__construct('wp_enqueue_scripts', 100, 1); }
public function __construct(View $view) { parent::__construct('admin_head'); $this->view = $view; }
public function __construct(View $view) { parent::__construct("admin_init"); $this->view = $view; }
public function __construct() { parent::__construct('admin_init'); }
public function __construct($msg, $classtype = 'message error') { parent::__construct('admin_notices'); $this->msg = $msg; $this->classtype = $classtype; }
public function __construct() { parent::__construct('wp_insert_post', 100, 1); }
public function __construct($showOnProfile = true) { parent::__construct('admin_init'); $this->showOnProfile = $showOnProfile; }
public function __construct() { parent::__construct('save_post', 10, 2); }