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


PHP WP_List_Table类代码示例

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


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

示例1: __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

示例2: __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

示例3: __construct

 function __construct()
 {
     parent::__construct();
     Jetpack::init();
     // In WP 4.2 WP_List_Table will be sanitizing which values are __set()
     global $wp_version;
     if (version_compare($wp_version, '4.2-z', '>=') && $this->compat_fields && is_array($this->compat_fields)) {
         array_push($this->compat_fields, 'all_items');
     }
     $this->items = $this->all_items = Jetpack_Admin::init()->get_modules();
     $this->items = $this->filter_displayed_table_items($this->items);
     /**
      * Filters the list of modules available to be displayed in the Jetpack Settings screen.
      *
      * @since 3.0.0
      *
      * @param array $this->items Array of Jetpack modules.
      */
     $this->items = apply_filters('jetpack_modules_list_table_items', $this->items);
     $this->_column_headers = array($this->get_columns(), array(), array(), 'name');
     $modal_info = isset($_GET['info']) ? $_GET['info'] : false;
     wp_register_script('models.jetpack-modules', plugins_url('_inc/jetpack-modules.models.js', JETPACK__PLUGIN_FILE), array('backbone', 'underscore'), JETPACK__VERSION);
     wp_register_script('views.jetpack-modules', plugins_url('_inc/jetpack-modules.views.js', JETPACK__PLUGIN_FILE), array('backbone', 'underscore', 'wp-util'), JETPACK__VERSION);
     wp_register_script('jetpack-modules-list-table', plugins_url('_inc/jetpack-modules.js', JETPACK__PLUGIN_FILE), array('views.jetpack-modules', 'models.jetpack-modules', 'jquery'), JETPACK__VERSION, true);
     wp_localize_script('jetpack-modules-list-table', 'jetpackModulesData', array('modules' => Jetpack::get_translated_modules($this->all_items), 'i18n' => array('search_placeholder' => __('Search Modules…', 'jetpack')), 'modalinfo' => $this->module_info_check($modal_info, $this->all_items), 'nonces' => array('bulk' => wp_create_nonce('bulk-jetpack_page_jetpack_modules')), 'coreIconAvailable' => Jetpack::jetpack_site_icon_available_in_core()));
     wp_enqueue_script('jetpack-modules-list-table');
     /**
      * Filters the js_templates callback value.
      *
      * @since 3.6.0
      *
      * @param array array( $this, 'js_templates' ) js_templates callback.
      */
     add_action('admin_footer', apply_filters('jetpack_modules_list_table_js_template_callback', array($this, 'js_templates')), 9);
 }
开发者ID:pcuervo,项目名称:wp-carnival,代码行数:35,代码来源:class.jetpack-modules-list-table.php

示例4: render

    /**
     * Render the view.
     */
    public function render()
    {
        ?>

		<form method="GET">
			<input type="hidden" name="page" value="<?php 
        echo esc_attr($_GET['page']);
        ?>
">

			<?php 
        if (isset($_GET['status'])) {
            ?>
				<input type="hidden" name="status" value="<?php 
            echo esc_attr($_GET['status']);
            ?>
">
			<?php 
        }
        ?>

			<?php 
        $this->table->views();
        ?>
			<?php 
        $this->table->search_box(__("Search", Plugin::SLUG), 'itelic-search');
        ?>
			<?php 
        $this->table->display();
        ?>
		</form>

		<?php 
    }
开发者ID:pemiu01,项目名称:exchange-addon-licensing,代码行数:37,代码来源:ListV.php

示例5: display_tablenav

 public function display_tablenav($which)
 {
     $screen = get_current_screen();
     if ($screen->id != 'wc_crm_accounts') {
         parent::display_tablenav($which);
     }
 }
开发者ID:daanbakker1995,项目名称:vanteun,代码行数:7,代码来源:class-wc-crm-table-customers.php

示例6:

 function __construct($string_actions)
 {
     parent::__construct(array('plural' => 'lingotek-strings-translations', 'ajax' => false));
     $this->pllm = $GLOBALS['polylang']->model;
     $this->lgtm = $GLOBALS['wp_lingotek']->model;
     $this->string_actions = $string_actions;
 }
开发者ID:ergov2015,项目名称:rideflag.dev,代码行数:7,代码来源:strings-table.php

示例7: untrailingslashit

 /**
  *
  */
 function __construct()
 {
     parent::__construct(array('plural' => 'logs', 'singular' => 'log', 'ajax' => TRUE));
     $this->log_folder = get_site_option('backwpup_cfg_logfolder');
     $this->log_folder = BackWPup_File::get_absolute_path($this->log_folder);
     $this->log_folder = untrailingslashit($this->log_folder);
 }
开发者ID:leotaillard,项目名称:btws2016,代码行数:10,代码来源:class-page-logs.php

示例8: __construct

 public function __construct()
 {
     $this->load_dependencies();
     $this->db = WPSM_DB_Table::get_instance();
     global $status, $page;
     parent::__construct(array('singular' => 'table', 'plural' => 'tables', 'ajax' => false, 'screen' => $_REQUEST['page']));
 }
开发者ID:brettratner,项目名称:TCNJ-IMM-Showcase-2016,代码行数:7,代码来源:class-wpsm-list-table.php

示例9: array

 /** ************************************************************************
  * 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' => 'custom taxonomy', 'plural' => 'custom taxonomies', 'ajax' => true));
     $this->custom_taxonomies = get_option(WPCF_OPTION_NAME_CUSTOM_TAXONOMIES, array());
 }
开发者ID:aarongillett,项目名称:B22-151217,代码行数:11,代码来源:class.wpcf.custom.taxonomies.list.table.php

示例10:

 function __construct()
 {
     global $status, $page;
     //Set parent defaults
     parent::__construct(array('singular' => 'payment button', 'plural' => 'payment buttons', 'ajax' => false));
     $this->per_page = 50;
 }
开发者ID:jesusmarket,项目名称:jesusmarket,代码行数:7,代码来源:class.swpm-payment-buttons-list-table.php

示例11: __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

示例12: 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

示例13:

 /** ************************************************************************
  * 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

示例14:

 /**
  * 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

示例15: array

 /** ************************************************************************
  * 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' => 'custom post type', 'plural' => 'custom post types', 'ajax' => true));
     $this->custom_types = get_option('wpcf-custom-types', array());
 }
开发者ID:chrismathers,项目名称:premierplacement,代码行数:11,代码来源:class.wpcf.custom.post.types.list.table.php


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