本文整理汇总了PHP中WP_List_Table::WP_List_Table方法的典型用法代码示例。如果您正苦于以下问题:PHP WP_List_Table::WP_List_Table方法的具体用法?PHP WP_List_Table::WP_List_Table怎么用?PHP WP_List_Table::WP_List_Table使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WP_List_Table
的用法示例。
在下文中一共展示了WP_List_Table::WP_List_Table方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
function WP_Posts_List_Table() {
global $post_type_object, $post_type, $wpdb;
if ( !isset( $_REQUEST['post_type'] ) )
$post_type = 'post';
elseif ( in_array( $_REQUEST['post_type'], get_post_types( array( 'show_ui' => true ) ) ) )
$post_type = $_REQUEST['post_type'];
else
wp_die( __( 'Invalid post type' ) );
$_REQUEST['post_type'] = $post_type;
$post_type_object = get_post_type_object( $post_type );
if ( !current_user_can( $post_type_object->cap->edit_others_posts ) ) {
$this->user_posts_count = $wpdb->get_var( $wpdb->prepare( "
SELECT COUNT( 1 ) FROM $wpdb->posts
WHERE post_type = %s AND post_status NOT IN ( 'trash', 'auto-draft' )
AND post_author = %d
", $post_type, get_current_user_id() ) );
if ( $this->user_posts_count && empty( $_REQUEST['post_status'] ) && empty( $_REQUEST['all_posts'] ) && empty( $_REQUEST['author'] ) && empty( $_REQUEST['show_sticky'] ) )
$_GET['author'] = get_current_user_id();
}
if ( 'post' == $post_type && $sticky_posts = get_option( 'sticky_posts' ) ) {
$sticky_posts = implode( ', ', array_map( 'absint', (array) $sticky_posts ) );
$this->sticky_posts_count = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT( 1 ) FROM $wpdb->posts WHERE post_type = %s AND post_status != 'trash' AND ID IN ($sticky_posts)", $post_type ) );
}
parent::WP_List_Table( array(
'plural' => 'posts',
) );
}
示例2: isset
function __construct()
{
// Get The Registry
$this->_settings = AVH_FDAS_Settings::getInstance();
$this->_classes = AVH_FDAS_Classes::getInstance();
// Initialize the plugin
$this->_core = $this->_classes->load_class('Core', 'plugin', true);
$this->_ipcachedb = $this->_classes->load_class('DB', 'plugin', true);
$this->screen = 'avh_f_d_a_s_page_avh_first_defense_against_spam_ip_cache_';
$default_status = get_user_option('avhfdas_ip_cache_list_last_view');
if (empty($default_status)) {
$default_status = 'all';
}
$status = isset($_REQUEST['avhfdas_ip_cache_list_status']) ? $_REQUEST['avhfdas_ip_cache_list_status'] : $default_status;
if (!in_array($status, array('all', 'ham', 'spam', 'search'))) {
$status = 'all';
}
if ($status != $default_status && 'search' != $status) {
update_user_meta(get_current_user_id(), 'avhfdas_ip_cache_list_last_view', $status);
}
if (AVH_Common::getWordpressVersion() >= 3.2) {
parent::__construct(array('plural' => 'ips', 'singular' => 'ip', 'ajax' => true));
} else {
parent::WP_List_Table(array('plural' => 'ips', 'singular' => 'ip', 'ajax' => true));
}
}
示例3: isset
function WP_Media_List_Table() {
$this->detached = isset( $_REQUEST['detached'] ) || isset( $_REQUEST['find_detached'] );
parent::WP_List_Table( array(
'plural' => 'media'
) );
}
示例4: isset
function WP_Comments_List_Table()
{
global $post_id;
$post_id = isset($_REQUEST['p']) ? absint($_REQUEST['p']) : 0;
if (get_option('show_avatars')) {
add_filter('comment_author', 'floated_admin_avatar');
}
parent::WP_List_Table(array('plural' => 'comments', 'singular' => 'comment', 'ajax' => true));
}
示例5: isset
function WP_Users_List_Table()
{
$screen = get_current_screen();
$this->is_site_users = 'site-users-network' == $screen->id;
if ($this->is_site_users) {
$this->site_id = isset($_REQUEST['id']) ? intval($_REQUEST['id']) : 0;
}
parent::WP_List_Table(array('singular' => 'user', 'plural' => 'users'));
}
开发者ID:Esleelkartea,项目名称:herramienta_para_autodiagnostico_ADEADA,代码行数:9,代码来源:class-wp-users-list-table.php
示例6:
function WangGuard_Queue_Table()
{
global $wp_version;
$cur_wp_version = preg_replace('/-.*$/', '', $wp_version);
$callConstructor = version_compare($cur_wp_version, '3.2.1', ">=");
if (!$callConstructor) {
parent::WP_List_Table(array('singular' => 'report', 'plural' => 'reports'));
} else {
parent::__construct(array('singular' => 'report', 'plural' => 'reports'));
}
}
示例7:
function WP_Terms_List_Table()
{
global $post_type, $taxonomy, $tax;
wp_reset_vars(array('action', 'taxonomy', 'post_type'));
if (empty($taxonomy)) {
$taxonomy = 'post_tag';
}
if (!taxonomy_exists($taxonomy)) {
wp_die(__('Invalid taxonomy'));
}
$tax = get_taxonomy($taxonomy);
if (empty($post_type) || !in_array($post_type, get_post_types(array('public' => true)))) {
$post_type = 'post';
}
parent::WP_List_Table(array('plural' => 'tags', 'singular' => 'tag'));
}
开发者ID:Esleelkartea,项目名称:herramienta_para_autodiagnostico_ADEADA,代码行数:16,代码来源:class-wp-terms-list-table.php
示例8: isset
function WP_Plugins_List_Table()
{
global $status, $page;
$default_status = get_user_option('plugins_last_view');
if (empty($default_status)) {
$default_status = 'all';
}
$status = isset($_REQUEST['plugin_status']) ? $_REQUEST['plugin_status'] : $default_status;
if (!in_array($status, array('all', 'active', 'inactive', 'recently_activated', 'upgrade', 'network', 'mustuse', 'dropins', 'search'))) {
$status = 'all';
}
if ($status != $default_status && 'search' != $status) {
update_user_meta(get_current_user_id(), 'plugins_last_view', $status);
}
$page = $this->get_pagenum();
parent::WP_List_Table(array('plural' => 'plugins'));
}
开发者ID:Esleelkartea,项目名称:herramienta_para_autodiagnostico_ADEADA,代码行数:17,代码来源:class-wp-plugins-list-table.php
示例9: isset
function WP_MS_Themes_List_Table()
{
global $status, $page;
$default_status = get_user_option('themes_last_view');
if (empty($default_status)) {
$default_status = 'all';
}
$status = isset($_REQUEST['theme_status']) ? $_REQUEST['theme_status'] : $default_status;
if (!in_array($status, array('all', 'enabled', 'disabled', 'upgrade', 'search'))) {
$status = 'all';
}
if ($status != $default_status && 'search' != $status) {
update_user_meta(get_current_user_id(), 'themes_last_view', $status);
}
$page = $this->get_pagenum();
$screen = get_current_screen();
$this->is_site_themes = 'site-themes-network' == $screen->id ? true : false;
if ($this->is_site_themes) {
$this->site_id = isset($_REQUEST['id']) ? intval($_REQUEST['id']) : 0;
}
parent::WP_List_Table(array('plural' => 'themes'));
}
示例10:
function WP_MS_Sites_List_Table()
{
parent::WP_List_Table(array('plural' => 'sites'));
}
示例11:
function WP_Links_List_Table()
{
parent::WP_List_Table(array('plural' => 'bookmarks'));
}
开发者ID:Esleelkartea,项目名称:herramienta_para_autodiagnostico_ADEADA,代码行数:4,代码来源:class-wp-links-list-table.php
示例12:
function _WP_List_Table_Compat($screen)
{
parent::WP_List_Table(array('screen' => $screen, 'ajax' => false));
}
示例13:
function WP_Theme_Install_Table()
{
parent::WP_List_Table(array('screen' => 'theme-install'));
}