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

git-svn-id: http://svn.automattic.com/wordpress/trunk@14674 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
nacin 2010-05-15 20:49:28 +00:00
parent 051c2814da
commit 6d6532bfa1
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') );