From 6d6532bfa144f054fc788d463b38a07489605bcd Mon Sep 17 00:00:00 2001 From: nacin Date: Sat, 15 May 2010 20:49:28 +0000 Subject: [PATCH] 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 --- wp-admin/edit.php | 2 +- wp-admin/post-new.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-admin/edit.php b/wp-admin/edit.php index d309316140..3de50e5449 100644 --- a/wp-admin/edit.php +++ b/wp-admin/edit.php @@ -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') ); diff --git a/wp-admin/post-new.php b/wp-admin/post-new.php index ec85d55183..61000583ef 100644 --- a/wp-admin/post-new.php +++ b/wp-admin/post-new.php @@ -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') );