function __construct($page_slug, $args = array(), $file = false, $options = null) { ob_start(); $this->page_title(); $page_title = ob_get_clean(); $defaults = array('menu_title' => __('Add-ons', APP_TD), 'page_title' => $page_title, 'page_slug' => $page_slug, 'parent' => 'app-dashboard', 'action_link' => false, 'admin_action_priority' => 99); $this->args = wp_parse_args($args['menu'], $defaults); parent::__construct($file, $options); }
/** * @since 1.0.0 * @param string|bool $file * @param scbOptions $options * @param array $overrides * @param Prompt_Admin_Options_Tab[] $tabs * @param Prompt_Admin_Conditional_Notice[] $notices * @param Prompt_Api_Client $api_client */ public function __construct($file = false, $options = null, $overrides = null, $tabs = null, $notices = null, $api_client = null) { parent::__construct($file, $options); $this->_overridden_options = $overrides; $this->key = $options->get('prompt_key'); $this->maybe_auto_load(); $this->tabs = $tabs; $this->notices = $notices; $this->api_client = $api_client; }
function __construct($file, $options) { $this->textdomain = 'smart-archives-reloaded'; // Load translations $plugin_dir = basename(dirname($file)); load_plugin_textdomain($this->textdomain, "wp-content/plugins/{$plugin_dir}/lang", "{$plugin_dir}/lang"); $this->args = array('page_title' => __('Smart Archives Settings', $this->textdomain), 'menu_title' => __('Smart Archives', $this->textdomain), 'page_slug' => 'smart-archives'); add_action('transition_post_status', array($this, 'update_cache'), 10, 2); add_action('deleted_post', array($this, 'update_cache'), 10, 0); parent::__construct($file, $options); }
public function __construct($post_type = 'post', $fields, $args = '') { $args = wp_parse_args($args, array('taxonomies' => array(), 'custom_fields' => array(), 'tax_meta' => array(), 'geodata' => false)); $this->post_type = $post_type; $this->fields = $fields; $this->taxonomies = $args['taxonomies']; $this->tax_meta = $args['tax_meta']; $this->geodata = $args['geodata']; $this->custom_fields = array(); foreach ($args['custom_fields'] as $csv_key => $data) { if (!is_array($data)) { $data = array('internal_key' => $data); } $this->custom_fields[$csv_key] = wp_parse_args($data, array('internal_key' => $csv_key, 'default' => '')); } parent::__construct(); }
function __construct($args) { $this->args = wp_parse_args($args, array('page_slug' => 'app-dashboard', 'toplevel' => 'menu', 'position' => 3, 'screen_icon' => 'themes')); $this->boxes = array(array('news', $this->box_icon('framework/images/newspaper.png') . __('Latest News', APP_TD), 'normal'), array('twitter', $this->box_icon('framework/images/twitter-bird.png') . __('Latest Tweets', APP_TD), 'side'), array('forum', $this->box_icon('framework/images/comments.png') . __('Support Forum', APP_TD), 'side')); scbAdminPage::__construct(false); }
/** * Constructor. * * @param string|bool $file (optional) * @param object $options (optional) A scbOptions object. * * @return void */ public function __construct($file = false, $options = null) { parent::__construct($file, $options); scbUtil::add_uninstall_hook($this->file, array($this, 'uninstall')); }
function __construct( $file, $options = null ) { parent::__construct( $file, $options ); // too late scbUtil::add_uninstall_hook( $this->file, array( $this, 'uninstall' ) ); }
function __construct($options = null) { parent::__construct(false, $options); $this->tabs = new APP_List(); }
function __construct($args) { $this->args = wp_parse_args($args, array('submenu_title' => __('Dashboard', APP_TD), 'page_slug' => 'app-dashboard', 'toplevel' => 'menu', 'position' => 3, 'screen_icon' => 'themes')); $this->boxes = array(array('news', $this->box_icon('newspaper.png') . __('Latest News', APP_TD), 'normal'), array('tutorials', $this->box_icon('book-open.png') . __('Tutorials', APP_TD), 'side'), array('marketplace', $this->box_icon('store.png') . __('From the Marketplace', APP_TD), 'side')); scbAdminPage::__construct(); }
/** * Constructor * * @param array $args { * Optional. An array of arguments. * * @type string $page_title Dashboard title. Default 'AppThemes Dashboard' * @type string $menu_title Menu title. Default 'AppThemes' * @type string $submenu_title Submenu title. Default 'Dashboard' * @type string $page_slug Page slug. Default 'app-dashboard' * @type string $toplevel Menu level. Default 'menu'. Accepts 'menu', 'submenu'. * @type int $position Position in menu. Default 3. * @type string $screen_icon Screen icon (obsolete). Default 'themes'. * @type int $columns Number of columns of widgets. Default 2. Accepts 1, 2, 3, 4. * @type array $boxes { * An array of additional metaboxes with array of parameters. * Default 'stats', 'news', 'tutorials', 'marketplace', 'support_forum'. * * @type string $title Title of the meta box. * @type callback $callback Optional. Function that fills the box with the desired content. * The function should echo its output. * Default array( $this, '_intermediate_callback' ) * Accepts function name or array(object, method). * @type string $context Optional. The context within the screen where the boxes * should display. Default 'normal'. * Accepts 'normal', 'side', 'column3', 'column4'. * @type string $priority Optional. The priority within the context where the boxes * should show ('high', 'low'). Default 'default'. * @type array $callback_args Optional. Data that should be set as the $args property * of the box array (which is the second parameter passed * to your callback). Default array(). * } * } */ function __construct($args = array()) { $this->_setup_args($args); $this->_setup_boxes(); scbAdminPage::__construct(); }