當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。