本文整理汇总了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'));
}
示例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));
}
示例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);
}
示例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
}
示例5: display_tablenav
public function display_tablenav($which)
{
$screen = get_current_screen();
if ($screen->id != 'wc_crm_accounts') {
parent::display_tablenav($which);
}
}
示例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;
}
示例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);
}
示例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']));
}
示例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());
}
示例10:
function __construct()
{
global $status, $page;
//Set parent defaults
parent::__construct(array('singular' => 'payment button', 'plural' => 'payment buttons', 'ajax' => false));
$this->per_page = 50;
}
示例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);
}
示例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']) : '';
}
示例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));
}
示例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();
}
示例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());
}