当前位置: 首页>>代码示例>>PHP>>正文


PHP WP_List_Table::__construct方法代码示例

本文整理汇总了PHP中WP_List_Table::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP WP_List_Table::__construct方法的具体用法?PHP WP_List_Table::__construct怎么用?PHP WP_List_Table::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在WP_List_Table的用法示例。


在下文中一共展示了WP_List_Table::__construct方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 /**
  * Constructor.
  *
  * @access public
  * @since  8.3
  *
  * @uses   cnTerm::getBy()
  *
  * @see    WP_List_Table::__construct() for more information on default arguments.
  *
  * @param array $args An associative array of arguments.
  */
 public function __construct($args = array())
 {
     $defaults = array('type' => '');
     $args = wp_parse_args($args, $defaults);
     $this->type = $args['type'];
     parent::__construct(array('plural' => 'email', 'singular' => 'email', 'ajax' => FALSE));
 }
开发者ID:uwmadisoncals,项目名称:Cluster-Plugins,代码行数:19,代码来源:class.template-list-table-email-log.php

示例2: SendPress

 /** ************************************************************************
  * REQUIRED. Set up a constructor that references the parent constructor. We 
  * use the parent reference to set some default configs.
  ***************************************************************************/
 function __construct()
 {
     global $status, $page;
     $this->_sendpress = new SendPress();
     //Set parent defaults
     parent::__construct(array('singular' => 'qemail', 'plural' => 'qemails', 'ajax' => false));
 }
开发者ID:radscheit,项目名称:unicorn,代码行数:11,代码来源:class-sendpress-queue-all-table.php

示例3: array

 function __construct()
 {
     global $status, $page;
     $this->example_data = PROFILEPRESS_sql::sql_wp_list_table_registration_builder();
     parent::__construct(array('singular' => __('registration', 'profilepress'), 'plural' => __('registrations', 'profilepress'), 'ajax' => false));
     add_action('admin_head', array(&$this, 'admin_header'));
 }
开发者ID:pawandhillon,项目名称:ICTICT-project,代码行数:7,代码来源:registration-builder-wp-list-table.php

示例4: __construct

 /**
  * Get things started
  *
  * @since 1.1
  * @see   WP_List_Table::__construct()
  */
 public function __construct()
 {
     global $status, $page;
     // Set parent defaults
     parent::__construct(array('singular' => __('API Key', 'give'), 'plural' => __('API Keys', 'give'), 'ajax' => false));
     $this->query();
 }
开发者ID:duongnguyen92,项目名称:tvd12v2,代码行数:13,代码来源:class-api-keys-table.php

示例5: __construct

 /**
  * Get things started
  *
  * @since 1.4
  * @see WP_List_Table::__construct()
  */
 public function __construct()
 {
     global $status, $page;
     // Set parent defaults
     parent::__construct(array('singular' => edd_get_label_singular(), 'plural' => edd_get_label_plural(), 'ajax' => false));
     add_action('edd_log_view_actions', array($this, 'downloads_filter'));
 }
开发者ID:Balamir,项目名称:Easy-Digital-Downloads,代码行数:13,代码来源:class-file-downloads-logs-list-table.php

示例6: __construct

 /**
  * Primary class constructor.
  *
  * @since 2.0.0
  */
 public function __construct()
 {
     // Bring globals into scope for parent.
     global $status, $page;
     // Allow compat fields to be whitelisted.
     $this->compat_fields = array_merge($this->compat_fields, array('base', 'optin_id', 'optin', 'meta', 'total', 'base_url'));
     $this->compat_methods = array_merge($this->compat_methods, array('optins_data', 'get_settings_actions'));
     // Load the base class object.
     $this->base = Optin_Monster::get_instance();
     // Set the optin ID, object and meta properties.
     $this->optin_id = isset($_GET['om_optin_id']) ? $_GET['om_optin_id'] : $_POST['id'];
     $this->optin = get_post($this->optin_id);
     $this->meta = get_post_meta($this->optin_id, '_om_meta', true);
     // Utilize the parent constructor to build the main class properties.
     parent::__construct(array('singular' => 'optin', 'plural' => 'optins', 'ajax' => false));
     // Set some of the class properties.
     $this->total = $this->base->get_split_tests($this->optin_id) ? count($this->base->get_split_tests($this->optin_id)) : 0;
     $this->base_url = add_query_arg('page', 'optin-monster-settings', admin_url('admin.php'));
     // Process any bulk actions.
     $this->process_bulk_actions();
     // Load the track datastore interface.
     if (!class_exists('Optin_Monster_Track_Datastore')) {
         require plugin_dir_path($this->base->file) . 'includes/global/track-datastore.php';
     }
 }
开发者ID:venturepact,项目名称:blog,代码行数:30,代码来源:split-table.php

示例7: __construct

 /**
  * Constructor, we override the parent to pass our own arguments
  * We usually focus on three parameters: singular and plural labels, as well as whether the class supports AJAX.
  *
  * @param CUAR_Plugin $plugin
  * @param array       $args
  * @param             $base_url
  * @param string      $item_wrapper_class Class to wrap the WP_Post objects (leave empty to use only WP_Post)
  */
 public function __construct($plugin, $args, $base_url, $item_wrapper_class = '')
 {
     parent::__construct($args);
     $this->plugin = $plugin;
     $this->base_url = $base_url;
     $this->item_wrapper_class = $item_wrapper_class;
 }
开发者ID:Darkers54,项目名称:eLEGO,代码行数:16,代码来源:list-table.class.php

示例8: __construct

 /**
  * Create and instance of this list table.
  *
  * @since 1.0
  */
 public function __construct()
 {
     parent::__construct(array('singular' => 'subscription', 'plural' => 'subscriptions', 'ajax' => false));
     $this->process_actions();
     // Check if the table caused a fatal error and if so, set flags to disable certain features
     add_action('shutdown', array(&$this, 'handle_fatal_errors'));
 }
开发者ID:akshayxhtmljunkies,项目名称:brownglock,代码行数:12,代码来源:class-wc-subscriptions-list-table.php

示例9: __construct

 public function __construct($args)
 {
     parent::__construct(array('screen' => 'fw-ext-update-extensions-update'));
     $this->_extensions = $args['extensions'];
     $this->_table_columns = array('cb' => '<input type="checkbox" />', 'details' => fw_html_tag('a', array('href' => '#', 'onclick' => "jQuery(this).closest('tr').find('input[type=\"checkbox\"]:first').trigger('click'); return false;"), __('Select All', 'fw')));
     $this->_table_columns_count = count($this->_table_columns);
 }
开发者ID:AdsonCicilioti,项目名称:Unyson,代码行数:7,代码来源:class--fw-ext-update-extensions-list-table.php

示例10: array

 /**
  * The constructor function for our class.
  * Adds hooks, initializes variables, setups class.
  */
 function __construct()
 {
     global $status, $page;
     $screen = get_current_screen();
     /* Determine the status */
     $status = 'all';
     $statuses = array('active', 'inactive', 'recently_activated', 'admin', 'frontend');
     if (isset($_REQUEST['status']) && in_array($_REQUEST['status'], $statuses)) {
         $status = $_REQUEST['status'];
     }
     /* Add the search query to the URL */
     if (isset($_REQUEST['s'])) {
         $_SERVER['REQUEST_URI'] = add_query_arg('s', stripslashes($_REQUEST['s']));
     }
     /* Add a snippets per page screen option */
     $page = $this->get_pagenum();
     add_screen_option('per_page', array('label' => __('Snippets per page', 'code-snippets'), 'default' => 10, 'option' => 'snippets_per_page'));
     /* Set the table columns hidden in Screen Options by default */
     add_filter("get_user_option_manage{$screen->id}columnshidden", array($this, 'get_default_hidden_columns'), 15);
     /* Strip once-off query args from the URL */
     $_SERVER['REQUEST_URI'] = remove_query_arg(array('activate', 'activate-multi', 'deactivate', 'deactivate-multi', 'delete', 'delete-multi'));
     /* Add filters to format the snippet description in the same way the post content is formatted */
     $filters = array('wptexturize', 'convert_smilies', 'convert_chars', 'wpautop', 'shortcode_unautop', 'capital_P_dangit');
     foreach ($filters as $filter) {
         add_filter('code_snippets/list_table/print_snippet_description', $filter);
     }
     /* Setup the class */
     parent::__construct(array('singular' => 'snippet', 'plural' => 'snippets', 'ajax' => true));
 }
开发者ID:kgoedecke,项目名称:kevingoedecke-blog,代码行数:33,代码来源:class-list-table.php

示例11: isset

 /** ************************************************************************
  * REQUIRED. Set up a constructor that references the parent constructor. We
  * use the parent reference to set some default configs.
  ***************************************************************************/
 function __construct()
 {
     global $status, $page;
     //Set parent defaults
     parent::__construct(array('singular' => 'notification', 'plural' => 'notifications', 'ajax' => false));
     $this->form_id = isset($_REQUEST['form_id']) ? absint($_REQUEST['form_id']) : '';
 }
开发者ID:thehereward,项目名称:ninja-forms,代码行数:11,代码来源:notifications-table.php

示例12:

 /** ************************************************************************
  * REQUIRED. Set up a constructor that references the parent constructor. We 
  * use the parent reference to set some default configs.
  ***************************************************************************/
 function __construct()
 {
     global $status, $page;
     global $wpdb;
     //Set parent defaults
     parent::__construct(array('singular' => 'user', 'plural' => 'users', 'ajax' => false));
 }
开发者ID:serker72,项目名称:T3S,代码行数:11,代码来源:class.bulk.approve.unapprove.php

示例13:

 /**
  * Get things started
  *
  * @access      private
  * @since       1.0
  * @return      void
  */
 function __construct()
 {
     global $status, $page;
     // Set parent defaults
     parent::__construct(array('singular' => __('Subscriber', 'edd-recurring'), 'plural' => __('Subscribers', 'edd-recurring'), 'ajax' => false));
     $this->subscribers = $this->query();
 }
开发者ID:nguyenthai2010,项目名称:ngocshop,代码行数:14,代码来源:class-subscriber-reports-table.php

示例14:

 /**
  * @param string $field_group
  * @param string $post_type
  * @param string $table_title
  */
 function __construct($field_group, $post_type, $table_title = NULL)
 {
     global $status, $page;
     if ($field_group == 'resume') {
         $field_group = 'resume_fields';
     }
     $this->set_field_group($field_group);
     $this->set_post_type($post_type);
     $this->set_field_group_slug($this->fields()->get_field_group_slug($field_group));
     $this->set_field_group_slug_parent($this->fields()->get_field_group_slug($field_group, TRUE));
     $stripped_slug = $this->fields()->get_field_group_stripped_slug($field_group);
     $edit_page = 'edit_' . $stripped_slug . '_fields';
     $this->set_page($edit_page);
     $this->set_fields_page('edit.php?post_type=' . $post_type . '&page=' . $edit_page);
     $this->set_table_title(ucfirst($stripped_slug) . __(' Field', 'wp-job-manager-field-editor'));
     if ($table_title) {
         $this->set_table_title($table_title);
     }
     if (!$post_type) {
         $this->set_post_type($this->fields()->field_group_to_post_type($field_group));
     }
     ob_start();
     parent::__construct(array('singular' => $this->get_table_title(TRUE), 'plural' => $this->get_table_title(), 'ajax' => true, 'screen' => ''));
     ob_end_clean();
     // Prevent PHP warnings from being output when WP_DEBUG is enabled
 }
开发者ID:durichitayat,项目名称:befolio-wp,代码行数:31,代码来源:list-table.php

示例15:

 function __construct()
 {
     if (!empty($_REQUEST['s'])) {
         $this->is_search = true;
     }
     parent::__construct(array('plural' => __('Co-Authors', 'co-authors-plus'), 'singular' => __('Co-Author', 'co-authors-plus')));
 }
开发者ID:luskyj89,项目名称:mt-wordpress,代码行数:7,代码来源:class-coauthors-wp-list-table.php


注:本文中的WP_List_Table::__construct方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。