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', ) ); }
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)); } }
function WP_Media_List_Table() { $this->detached = isset( $_REQUEST['detached'] ) || isset( $_REQUEST['find_detached'] ); parent::WP_List_Table( array( 'plural' => 'media' ) ); }
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)); }
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')); }
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')); } }
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')); }
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')); }
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')); }
function WP_MS_Sites_List_Table() { parent::WP_List_Table(array('plural' => 'sites')); }
function WP_Links_List_Table() { parent::WP_List_Table(array('plural' => 'bookmarks')); }
function _WP_List_Table_Compat($screen) { parent::WP_List_Table(array('screen' => $screen, 'ajax' => false)); }
function WP_Theme_Install_Table() { parent::WP_List_Table(array('screen' => 'theme-install')); }