mirror of
git://develop.git.wordpress.org/
synced 2025-03-15 01:19:51 +01:00
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:
parent
23d6bf302c
commit
43959a6f47
@ -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…
x
Reference in New Issue
Block a user