WordPress.org

Make WordPress Core

Changeset 14674


Ignore:
Timestamp:
05/15/10 20:49:28 (4 years ago)
Author:
nacin
Message:

Use show_ui instead of public flag to check whether the post type uses post-new and edit.php. see #13403.

Location:
trunk/wp-admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/edit.php

    r14627 r14674  
    1212if ( !isset($_GET['post_type']) ) 
    1313    $post_type = 'post'; 
    14 elseif ( in_array( $_GET['post_type'], get_post_types( array('public' => true ) ) ) ) 
     14elseif ( in_array( $_GET['post_type'], get_post_types( array('show_ui' => true ) ) ) || in_array( $_GET['post_type'], array( 'post', 'page' ) ) ) 
    1515    $post_type = $_GET['post_type']; 
    1616else 
  • trunk/wp-admin/post-new.php

    r14585 r14674  
    1212if ( !isset($_GET['post_type']) ) 
    1313    $post_type = 'post'; 
    14 elseif ( in_array( $_GET['post_type'], get_post_types( array('public' => true ) ) ) ) 
     14elseif ( in_array( $_GET['post_type'], get_post_types( array('show_ui' => true ) ) ) || in_array( $_GET['post_type'], array( 'post', 'page' ) ) ) 
    1515    $post_type = $_GET['post_type']; 
    1616else 
Note: See TracChangeset for help on using the changeset viewer.