Make WordPress Core


Ignore:
Timestamp:
03/09/2013 03:52:27 AM (14 years ago)
Author:
SergeyBiryukov
Message:

Replace deprecated WP_Screen::is_network property with WP_Screen::in_admin( 'network' ). props bpetty. fixes #23215.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/screen.php

    r23503 r23658  
    320320        /**
    321321         * The help tab data associated with the screen, if any.
    322          *
    323          * @since 3.3.0
    324          * @var array
    325          * @access private
    326          */
     322         *
     323         * @since 3.3.0
     324         * @var array
     325         * @access private
     326         */
    327327        private $_help_tabs = array();
    328328
    329         /**
     329        /**
    330330         * The help sidebar data associated with screen, if any.
    331331         *
    … …  
    333333         * @var string
    334334         * @access private
    335          */
     335         */
    336336        private $_help_sidebar = '';
    337337
    … …  
    377377        private $_screen_settings;
    378378
    379         /**
     379        /**
    380380         * Fetches a screen object.
    381          *
    382          * @since 3.3.0
     381         *
     382         * @since 3.3.0
    383383         * @access public
    384          *
     384         *
    385385         * @param string $hook_name Optional. The hook name (also known as the hook suffix) used to determine the screen.
    386386         *      Defaults to the current $hook_suffix global.
    387387         * @return WP_Screen Screen object.
    388          */
     388         */
    389389        public static function get( $hook_name = '' ) {
    390390
    … …  
    428428                                $maybe = substr( $id, 5 );
    429429                                if ( taxonomy_exists( $maybe ) ) {
    430                                         $id = 'edit-tags';
     430                                        $id = 'edit-tags';
    431431                                        $taxonomy = $maybe;
    432432                                } elseif ( post_type_exists( $maybe ) ) {
    … …  
    434434                                        $post_type = $maybe;
    435435                                }
    436                         }
     436                        }
    437437
    438438                        if ( ! $in_admin )
    … …  
    481481                                        break;
    482482                        }
    483                 }
     483                }
    484484
    485485                switch ( $base ) {
    … …  
    514514                        $id   .= '-user';
    515515                        $base .= '-user';
    516                 }
     516                }
    517517
    518518                if ( isset( self::$_registry[ $id ] ) ) {
    … …  
    536536
    537537                return $screen;
    538         }
     538        }
    539539
    540540        /**
Note: See TracChangeset for help on using the changeset viewer.