From 0bfee7db489b9feda9975ca1b2c5d783e3e712df Mon Sep 17 00:00:00 2001 From: scribu Date: Thu, 4 Nov 2010 21:02:13 +0000 Subject: [PATCH] Rename property _screen to screen. See #14579 git-svn-id: http://svn.automattic.com/wordpress/trunk@16195 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/class-wp-list-table.php | 28 ++++++++--------- .../includes/class-wp-media-list-table.php | 4 +-- .../includes/class-wp-plugins-list-table.php | 30 +++++++++---------- .../includes/class-wp-posts-list-table.php | 4 +-- 4 files changed, 33 insertions(+), 33 deletions(-) diff --git a/wp-admin/includes/class-wp-list-table.php b/wp-admin/includes/class-wp-list-table.php index e164a01549..54e6bd4105 100644 --- a/wp-admin/includes/class-wp-list-table.php +++ b/wp-admin/includes/class-wp-list-table.php @@ -48,9 +48,9 @@ class WP_List_Table { * * @since 3.1.0 * @var object - * @access private + * @access protected */ - var $_screen; + var $screen; /** * Cached bulk actions @@ -84,15 +84,15 @@ class WP_List_Table { 'ajax' => true ) ); - $this->_screen = $args['screen']; + $this->screen = $args['screen']; - if ( is_string( $this->_screen ) ) - $this->_screen = convert_to_screen( $this->_screen ); + if ( is_string( $this->screen ) ) + $this->screen = convert_to_screen( $this->screen ); - add_filter( 'manage_' . $this->_screen->id . '_columns', array( &$this, 'get_columns' ), 0 ); + add_filter( 'manage_' . $this->screen->id . '_columns', array( &$this, 'get_columns' ), 0 ); if ( !$args['plural'] ) - $args['plural'] = $this->_screen->base; + $args['plural'] = $this->screen->base; $this->_args = $args; @@ -204,7 +204,7 @@ class WP_List_Table { */ function views() { $views = $this->get_views(); - $views = apply_filters( 'views_' . $this->_screen->base, $views ); + $views = apply_filters( 'views_' . $this->screen->base, $views ); if ( empty( $views ) ) return; @@ -237,7 +237,7 @@ class WP_List_Table { if ( is_null( $this->_actions ) ) { $this->_actions = $this->get_bulk_actions(); - $this->_actions = apply_filters( 'bulk_actions-' . $this->_screen->base, $this->_actions ); + $this->_actions = apply_filters( 'bulk_actions-' . $this->screen->base, $this->_actions ); $two = ''; } else { @@ -535,9 +535,9 @@ class WP_List_Table { */ function get_column_info() { if ( !isset( $this->_column_headers ) ) { - $columns = get_column_headers( $this->_screen ); - $hidden = get_hidden_columns( $this->_screen ); - $sortable = apply_filters( 'manage_' . $this->_screen->id . '_sortable_columns', $this->get_sortable_columns() ); + $columns = get_column_headers( $this->screen ); + $hidden = get_hidden_columns( $this->screen ); + $sortable = apply_filters( 'manage_' . $this->screen->id . '_sortable_columns', $this->get_sortable_columns() ); $this->_column_headers = array( $columns, $hidden, $sortable ); } @@ -554,7 +554,7 @@ class WP_List_Table { * @param bool $with_id Whether to set the id attribute or not */ function print_column_headers( $with_id = true ) { - $screen = $this->_screen; + $screen = $this->screen; list( $columns, $hidden, $sortable ) = $this->get_column_info(); @@ -807,7 +807,7 @@ class WP_List_Table { function _js_vars() { $args = array( 'class' => get_class( $this ), - 'screen' => $this->_screen + 'screen' => $this->screen ); printf( "\n", json_encode( $args ) ); diff --git a/wp-admin/includes/class-wp-media-list-table.php b/wp-admin/includes/class-wp-media-list-table.php index 5b0b7f7d9b..bf7b438271 100644 --- a/wp-admin/includes/class-wp-media-list-table.php +++ b/wp-admin/includes/class-wp-media-list-table.php @@ -151,13 +151,13 @@ class WP_Media_List_Table extends WP_List_Table { $posts_columns['author'] = __( 'Author' ); //$posts_columns['tags'] = _x( 'Tags', 'column name' ); /* translators: column name */ - if ( 'upload' == $this->_screen->id ) { + if ( 'upload' == $this->screen->id ) { $posts_columns['parent'] = _x( 'Attached to', 'column name' ); $posts_columns['comments'] = '
Comments
'; } /* translators: column name */ $posts_columns['date'] = _x( 'Date', 'column name' ); - $posts_columns = apply_filters( 'manage_media_columns', $posts_columns, 'upload' != $this->_screen->id ); + $posts_columns = apply_filters( 'manage_media_columns', $posts_columns, 'upload' != $this->screen->id ); return $posts_columns; } diff --git a/wp-admin/includes/class-wp-plugins-list-table.php b/wp-admin/includes/class-wp-plugins-list-table.php index 2607dafd1d..09771ee422 100644 --- a/wp-admin/includes/class-wp-plugins-list-table.php +++ b/wp-admin/includes/class-wp-plugins-list-table.php @@ -57,7 +57,7 @@ class WP_Plugins_List_Table extends WP_List_Table { 'dropins' => array() ); - if ( ! is_multisite() || ( $this->_screen->is_network && current_user_can('manage_network_plugins') ) ) { + if ( ! is_multisite() || ( $this->screen->is_network && current_user_can('manage_network_plugins') ) ) { if ( apply_filters( 'show_advanced_plugins', true, 'mustuse' ) ) $plugins['mustuse'] = get_mu_plugins(); if ( apply_filters( 'show_advanced_plugins', true, 'dropins' ) ) @@ -85,16 +85,16 @@ class WP_Plugins_List_Table extends WP_List_Table { foreach ( (array) $plugins['all'] as $plugin_file => $plugin_data ) { // Filter into individual sections - if ( is_plugin_active_for_network($plugin_file) && !$this->_screen->is_network ) { + if ( is_plugin_active_for_network($plugin_file) && !$this->screen->is_network ) { unset( $plugins['all'][ $plugin_file ] ); continue; } elseif ( is_multisite() && is_network_only_plugin( $plugin_file ) && !current_user_can( 'manage_network_plugins' ) ) { $plugins['network'][ $plugin_file ] = $plugin_data; - } elseif ( ( !$this->_screen->is_network && is_plugin_active( $plugin_file ) ) - || ( $this->_screen->is_network && is_plugin_active_for_network( $plugin_file ) ) ) { + } elseif ( ( !$this->screen->is_network && is_plugin_active( $plugin_file ) ) + || ( $this->screen->is_network && is_plugin_active_for_network( $plugin_file ) ) ) { $plugins['active'][ $plugin_file ] = $plugin_data; } else { - if ( !$this->_screen->is_network && isset( $recently_activated[ $plugin_file ] ) ) // Was the plugin recently activated? + if ( !$this->screen->is_network && isset( $recently_activated[ $plugin_file ] ) ) // Was the plugin recently activated? $plugins['recently_activated'][ $plugin_file ] = $plugin_data; $plugins['inactive'][ $plugin_file ] = $plugin_data; } @@ -128,7 +128,7 @@ class WP_Plugins_List_Table extends WP_List_Table { uasort( $this->items, array( &$this, '_order_callback' ) ); } - $plugins_per_page = $this->get_items_per_page( str_replace( '-', '_', "{$this->_screen->id}_per_page" ) ); + $plugins_per_page = $this->get_items_per_page( str_replace( '-', '_', "{$this->screen->id}_per_page" ) ); $start = ( $page - 1 ) * $plugins_per_page; @@ -254,14 +254,14 @@ class WP_Plugins_List_Table extends WP_List_Table { $actions = array(); if ( 'active' != $status ) { - $action = $this->_screen->is_network ? 'network-activate-selected' : 'activate-selected'; + $action = $this->screen->is_network ? 'network-activate-selected' : 'activate-selected'; $actions[ $action ] = __( 'Activate' ); } if ( 'inactive' != $status && 'recent' != $status ) $actions['deactivate-selected'] = __( 'Deactivate' ); - if ( !is_multisite() || $this->_screen->is_network ) { + if ( !is_multisite() || $this->screen->is_network ) { if ( current_user_can( 'update_plugins' ) ) $actions['update-selected'] = __( 'Update' ); if ( current_user_can( 'delete_plugins' ) && ( 'active' != $status ) ) @@ -313,11 +313,11 @@ class WP_Plugins_List_Table extends WP_List_Table { ); if ( 'mustuse' == $context ) { - if ( is_multisite() && !$this->_screen->is_network ) + if ( is_multisite() && !$this->screen->is_network ) continue; $is_active = true; } elseif ( 'dropins' == $context ) { - if ( is_multisite() && !$this->_screen->is_network ) + if ( is_multisite() && !$this->screen->is_network ) continue; $dropins = _get_dropins(); $plugin_name = $plugin_file; @@ -337,15 +337,15 @@ class WP_Plugins_List_Table extends WP_List_Table { $description .= '

' . $plugin_data['Description'] . '

'; } else { $is_active_for_network = is_plugin_active_for_network($plugin_file); - if ( $this->_screen->is_network ) + if ( $this->screen->is_network ) $is_active = $is_active_for_network; else $is_active = is_plugin_active( $plugin_file ); - if ( $is_active_for_network && !is_super_admin() && !$this->_screen->is_network ) + if ( $is_active_for_network && !is_super_admin() && !$this->screen->is_network ) continue; - if ( $this->_screen->is_network ) { + if ( $this->screen->is_network ) { if ( $is_active_for_network ) { if ( current_user_can( 'manage_network_plugins' ) ) $actions['network_deactivate'] = '' . __('Network Deactivate') . ''; @@ -359,7 +359,7 @@ class WP_Plugins_List_Table extends WP_List_Table { if ( $is_active ) { $actions['deactivate'] = '' . __('Deactivate') . ''; } else { - if ( is_network_only_plugin( $plugin_file ) && !$this->_screen->is_network ) + if ( is_network_only_plugin( $plugin_file ) && !$this->screen->is_network ) continue; $actions['activate'] = '' . __('Activate') . ''; @@ -367,7 +367,7 @@ class WP_Plugins_List_Table extends WP_List_Table { if ( ! is_multisite() && current_user_can('delete_plugins') ) $actions['delete'] = '' . __('Delete') . ''; } // end if $is_active - } // end if $this->_screen->is_network + } // end if $this->screen->is_network if ( current_user_can('edit_plugins') && is_writable(WP_PLUGIN_DIR . '/' . $plugin_file) ) $actions['edit'] = '' . __('Edit') . ''; diff --git a/wp-admin/includes/class-wp-posts-list-table.php b/wp-admin/includes/class-wp-posts-list-table.php index b6a651eb1a..432108ec3f 100644 --- a/wp-admin/includes/class-wp-posts-list-table.php +++ b/wp-admin/includes/class-wp-posts-list-table.php @@ -256,7 +256,7 @@ class WP_Posts_List_Table extends WP_List_Table { } function get_columns() { - $screen = $this->_screen; + $screen = $this->screen; if ( empty( $screen ) ) $post_type = 'post'; @@ -675,7 +675,7 @@ class WP_Posts_List_Table extends WP_List_Table { function inline_edit() { global $mode; - $screen = $this->_screen; + $screen = $this->screen; $post = get_default_post_to_edit( $screen->post_type ); $post_type_object = get_post_type_object( $screen->post_type );