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

git-svn-id: https://develop.svn.wordpress.org/trunk@14674 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2010-05-15 20:49:28 +00:00
parent 23d6bf302c
commit 43959a6f47
2 changed files with 2 additions and 2 deletions

View File

@ -11,7 +11,7 @@ require_once('./admin.php');
if ( !isset($_GET['post_type']) )
$post_type = 'post';
elseif ( in_array( $_GET['post_type'], get_post_types( array('public' => true ) ) ) )
elseif ( in_array( $_GET['post_type'], get_post_types( array('show_ui' => true ) ) ) || in_array( $_GET['post_type'], array( 'post', 'page' ) ) )
$post_type = $_GET['post_type'];
else
wp_die( __('Invalid post type') );

View File

@ -11,7 +11,7 @@ require_once('./admin.php');
if ( !isset($_GET['post_type']) )
$post_type = 'post';
elseif ( in_array( $_GET['post_type'], get_post_types( array('public' => true ) ) ) )
elseif ( in_array( $_GET['post_type'], get_post_types( array('show_ui' => true ) ) ) || in_array( $_GET['post_type'], array( 'post', 'page' ) ) )
$post_type = $_GET['post_type'];
else
wp_die( __('Invalid post type') );