WordPress.org

Make WordPress Core

Changeset 16195


Ignore:
Timestamp:
11/04/2010 09:02:13 PM (9 years ago)
Author:
scribu
Message:

Rename property _screen to screen. See #14579

Location:
trunk/wp-admin/includes
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/class-wp-list-table.php

    r16182 r16195  
    4949     * @since 3.1.0
    5050     * @var object
    51      * @access private
    52      */
    53     var $_screen;
     51     * @access protected
     52     */
     53    var $screen;
    5454
    5555    /**
     
    8585        ) );
    8686
    87         $this->_screen = $args['screen'];
    88 
    89         if ( is_string( $this->_screen ) )
    90             $this->_screen = convert_to_screen( $this->_screen );
    91 
    92         add_filter( 'manage_' . $this->_screen->id . '_columns', array( &$this, 'get_columns' ), 0 );
     87        $this->screen = $args['screen'];
     88
     89        if ( is_string( $this->screen ) )
     90            $this->screen = convert_to_screen( $this->screen );
     91
     92        add_filter( 'manage_' . $this->screen->id . '_columns', array( &$this, 'get_columns' ), 0 );
    9393
    9494        if ( !$args['plural'] )
    95             $args['plural'] = $this->_screen->base;
     95            $args['plural'] = $this->screen->base;
    9696
    9797        $this->_args = $args;
     
    205205    function views() {
    206206        $views = $this->get_views();
    207         $views = apply_filters( 'views_' . $this->_screen->base, $views );
     207        $views = apply_filters( 'views_' . $this->screen->base, $views );
    208208
    209209        if ( empty( $views ) )
     
    238238        if ( is_null( $this->_actions ) ) {
    239239            $this->_actions = $this->get_bulk_actions();
    240             $this->_actions = apply_filters( 'bulk_actions-' . $this->_screen->base, $this->_actions );
     240            $this->_actions = apply_filters( 'bulk_actions-' . $this->screen->base, $this->_actions );
    241241            $two = '';
    242242        }
     
    536536    function get_column_info() {
    537537        if ( !isset( $this->_column_headers ) ) {
    538             $columns = get_column_headers( $this->_screen );
    539             $hidden = get_hidden_columns( $this->_screen );
    540             $sortable = apply_filters( 'manage_' . $this->_screen->id . '_sortable_columns', $this->get_sortable_columns() );
     538            $columns = get_column_headers( $this->screen );
     539            $hidden = get_hidden_columns( $this->screen );
     540            $sortable = apply_filters( 'manage_' . $this->screen->id . '_sortable_columns', $this->get_sortable_columns() );
    541541
    542542            $this->_column_headers = array( $columns, $hidden, $sortable );
     
    555555     */
    556556    function print_column_headers( $with_id = true ) {
    557         $screen = $this->_screen;
     557        $screen = $this->screen;
    558558
    559559        list( $columns, $hidden, $sortable ) = $this->get_column_info();
     
    808808        $args = array(
    809809            'class' => get_class( $this ),
    810             'screen' => $this->_screen
     810            'screen' => $this->screen
    811811        );
    812812
  • trunk/wp-admin/includes/class-wp-media-list-table.php

    r16175 r16195  
    152152        //$posts_columns['tags'] = _x( 'Tags', 'column name' );
    153153        /* translators: column name */
    154         if ( 'upload' == $this->_screen->id ) {
     154        if ( 'upload' == $this->screen->id ) {
    155155            $posts_columns['parent'] = _x( 'Attached to', 'column name' );
    156156            $posts_columns['comments'] = '<div class="vers"><img alt="Comments" src="' . esc_url( admin_url( 'images/comment-grey-bubble.png' ) ) . '" /></div>';
     
    158158        /* translators: column name */
    159159        $posts_columns['date'] = _x( 'Date', 'column name' );
    160         $posts_columns = apply_filters( 'manage_media_columns', $posts_columns, 'upload' != $this->_screen->id );
     160        $posts_columns = apply_filters( 'manage_media_columns', $posts_columns, 'upload' != $this->screen->id );
    161161
    162162        return $posts_columns;
  • trunk/wp-admin/includes/class-wp-plugins-list-table.php

    r16194 r16195  
    5858        );
    5959
    60         if ( ! is_multisite() || ( $this->_screen->is_network && current_user_can('manage_network_plugins') ) ) {
     60        if ( ! is_multisite() || ( $this->screen->is_network && current_user_can('manage_network_plugins') ) ) {
    6161            if ( apply_filters( 'show_advanced_plugins', true, 'mustuse' ) )
    6262                $plugins['mustuse'] = get_mu_plugins();
     
    8686        foreach ( (array) $plugins['all'] as $plugin_file => $plugin_data ) {
    8787            // Filter into individual sections
    88             if ( is_plugin_active_for_network($plugin_file) && !$this->_screen->is_network ) {
     88            if ( is_plugin_active_for_network($plugin_file) && !$this->screen->is_network ) {
    8989                unset( $plugins['all'][ $plugin_file ] );
    9090                continue;
    9191            } elseif ( is_multisite() && is_network_only_plugin( $plugin_file ) && !current_user_can( 'manage_network_plugins' ) ) {
    9292                $plugins['network'][ $plugin_file ] = $plugin_data;
    93             } elseif ( ( !$this->_screen->is_network && is_plugin_active( $plugin_file ) )
    94                 || ( $this->_screen->is_network && is_plugin_active_for_network( $plugin_file ) ) ) {
     93            } elseif ( ( !$this->screen->is_network && is_plugin_active( $plugin_file ) )
     94                || ( $this->screen->is_network && is_plugin_active_for_network( $plugin_file ) ) ) {
    9595                $plugins['active'][ $plugin_file ] = $plugin_data;
    9696            } else {
    97                 if ( !$this->_screen->is_network && isset( $recently_activated[ $plugin_file ] ) ) // Was the plugin recently activated?
     97                if ( !$this->screen->is_network && isset( $recently_activated[ $plugin_file ] ) ) // Was the plugin recently activated?
    9898                    $plugins['recently_activated'][ $plugin_file ] = $plugin_data;
    9999                $plugins['inactive'][ $plugin_file ] = $plugin_data;
     
    129129        }
    130130
    131         $plugins_per_page = $this->get_items_per_page( str_replace( '-', '_', "{$this->_screen->id}_per_page" ) );
     131        $plugins_per_page = $this->get_items_per_page( str_replace( '-', '_', "{$this->screen->id}_per_page" ) );
    132132
    133133        $start = ( $page - 1 ) * $plugins_per_page;
     
    255255
    256256        if ( 'active' != $status ) {
    257             $action = $this->_screen->is_network ? 'network-activate-selected' : 'activate-selected';
     257            $action = $this->screen->is_network ? 'network-activate-selected' : 'activate-selected';
    258258            $actions[ $action ] = __( 'Activate' );
    259259        }
     
    262262            $actions['deactivate-selected'] = __( 'Deactivate' );
    263263
    264         if ( !is_multisite() || $this->_screen->is_network ) {
     264        if ( !is_multisite() || $this->screen->is_network ) {
    265265            if ( current_user_can( 'update_plugins' ) )
    266266                $actions['update-selected'] = __( 'Update' );
     
    314314
    315315            if ( 'mustuse' == $context ) {
    316                 if ( is_multisite() && !$this->_screen->is_network )
     316                if ( is_multisite() && !$this->screen->is_network )
    317317                    continue;
    318318                $is_active = true;
    319319            } elseif ( 'dropins' == $context ) {
    320                 if ( is_multisite() && !$this->_screen->is_network )
     320                if ( is_multisite() && !$this->screen->is_network )
    321321                    continue;
    322322                $dropins = _get_dropins();
     
    338338            } else {
    339339                $is_active_for_network = is_plugin_active_for_network($plugin_file);
    340                 if ( $this->_screen->is_network )
     340                if ( $this->screen->is_network )
    341341                    $is_active = $is_active_for_network;
    342342                else
    343343                    $is_active = is_plugin_active( $plugin_file );
    344344
    345                 if ( $is_active_for_network && !is_super_admin() && !$this->_screen->is_network )
     345                if ( $is_active_for_network && !is_super_admin() && !$this->screen->is_network )
    346346                    continue;
    347347
    348                 if ( $this->_screen->is_network ) {
     348                if ( $this->screen->is_network ) {
    349349                    if ( $is_active_for_network ) {
    350350                        if ( current_user_can( 'manage_network_plugins' ) )
     
    360360                        $actions['deactivate'] = '<a href="' . wp_nonce_url('plugins.php?action=deactivate&amp;plugin=' . $plugin_file . '&amp;plugin_status=' . $context . '&amp;paged=' . $page . '&amp;s=' . $s, 'deactivate-plugin_' . $plugin_file) . '" title="' . __('Deactivate this plugin') . '">' . __('Deactivate') . '</a>';
    361361                    } else {
    362                         if ( is_network_only_plugin( $plugin_file ) && !$this->_screen->is_network )
     362                        if ( is_network_only_plugin( $plugin_file ) && !$this->screen->is_network )
    363363                            continue;
    364364
     
    368368                            $actions['delete'] = '<a href="' . wp_nonce_url('plugins.php?action=delete-selected&amp;checked[]=' . $plugin_file . '&amp;plugin_status=' . $context . '&amp;paged=' . $page . '&amp;s=' . $s, 'bulk-plugins') . '" title="' . __('Delete this plugin') . '" class="delete">' . __('Delete') . '</a>';
    369369                    } // end if $is_active
    370                  } // end if $this->_screen->is_network
     370                 } // end if $this->screen->is_network
    371371
    372372                if ( current_user_can('edit_plugins') && is_writable(WP_PLUGIN_DIR . '/' . $plugin_file) )
  • trunk/wp-admin/includes/class-wp-posts-list-table.php

    r16182 r16195  
    257257
    258258    function get_columns() {
    259         $screen = $this->_screen;
     259        $screen = $this->screen;
    260260
    261261        if ( empty( $screen ) )
     
    676676        global $mode;
    677677
    678         $screen = $this->_screen;
     678        $screen = $this->screen;
    679679
    680680        $post = get_default_post_to_edit( $screen->post_type );
Note: See TracChangeset for help on using the changeset viewer.