WordPress.org

Make WordPress Core

Changeset 19108


Ignore:
Timestamp:
11/01/2011 09:36:04 PM (9 years ago)
Author:
nacin
Message:

Use more obvious variables in WP_Screen. see #18785.

File:
1 edited

Legend:

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

    r19098 r19108  
    420420            $id = sanitize_key( $id );
    421421            if ( post_type_exists( $id ) ) {
     422                $id = 'post'; // changes later. ends up being $base.
    422423                $post_type = $id;
    423                 $id = 'post'; // changes later. ends up being $base.
    424424            } elseif ( false !== strpos( $id, '-' ) ) {
    425                 list( $id, $second ) = explode( '-', $id, 2 );
     425                list( $first, $second ) = explode( '-', $id, 2 );
    426426                if ( taxonomy_exists( $second ) ) {
    427427                    $id = 'edit-tags';
    428428                    $taxonomy = $second;
    429429                } elseif ( post_type_exists( $second ) ) {
     430                    $id = $first;
    430431                    $post_type = $second;
    431                 } else {
    432                     $id .= '-' . $second;
    433                 }
     432                }
    434433            }
    435434        }
Note: See TracChangeset for help on using the changeset viewer.