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:
parent
051c2814da
commit
6d6532bfa1
|
@ -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') );
|
||||
|
|
|
@ -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') );
|
||||
|
|
Loading…
Reference in New Issue