diff --git a/wp-admin/edit.php b/wp-admin/edit.php index 3de50e5449..da94ace60a 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('show_ui' => true ) ) ) || in_array( $_GET['post_type'], array( 'post', 'page' ) ) ) +elseif ( in_array( $_GET['post_type'], get_post_types( array('show_ui' => true ) ) ) ) $post_type = $_GET['post_type']; else wp_die( __('Invalid post type') ); diff --git a/wp-admin/includes/template.php b/wp-admin/includes/template.php index 445e1c919c..69d56b5c00 100644 --- a/wp-admin/includes/template.php +++ b/wp-admin/includes/template.php @@ -3708,7 +3708,7 @@ function screen_layout($screen) { if ( is_string($screen) ) $screen = convert_to_screen($screen); - $columns = array('dashboard' => 4, 'post' => 2, 'page' => 2, 'link' => 2); + $columns = array('dashboard' => 4, 'link' => 2); // Add custom post types foreach ( get_post_types( array('show_ui' => true) ) as $post_type ) diff --git a/wp-admin/menu.php b/wp-admin/menu.php index 37e42505e6..b436494c26 100644 --- a/wp-admin/menu.php +++ b/wp-admin/menu.php @@ -113,7 +113,7 @@ $menu[25] = array( sprintf( __('Comments %s'), " true) ) as $ptype ) { +foreach ( (array) get_post_types( array('show_ui' => true, '_builtin' => false) ) as $ptype ) { $ptype_obj = get_post_type_object( $ptype ); $ptype_menu_position = is_int( $ptype_obj->menu_position ) ? $ptype_obj->menu_position : $_wp_last_object_menu++; // If we're to use $_wp_last_object_menu, increment it first. $ptype_for_id = sanitize_html_class( $ptype ); diff --git a/wp-admin/post-new.php b/wp-admin/post-new.php index 61000583ef..93c4ffbcbd 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('show_ui' => true ) ) ) || in_array( $_GET['post_type'], array( 'post', 'page' ) ) ) +elseif ( in_array( $_GET['post_type'], get_post_types( array('show_ui' => true ) ) ) ) $post_type = $_GET['post_type']; else wp_die( __('Invalid post type') ); diff --git a/wp-includes/post.php b/wp-includes/post.php index 1efd90b2cd..ab6343cee3 100644 --- a/wp-includes/post.php +++ b/wp-includes/post.php @@ -17,7 +17,6 @@ function create_initial_post_types() { register_post_type( 'post', array( 'public' => true, - 'show_ui' => false, '_builtin' => true, /* internal use only. don't use this when registering your own post type. */ '_edit_link' => 'post.php?post=%d', /* internal use only. don't use this when registering your own post type. */ 'capability_type' => 'post', @@ -29,7 +28,6 @@ function create_initial_post_types() { register_post_type( 'page', array( 'public' => true, - 'show_ui' => false, '_builtin' => true, /* internal use only. don't use this when registering your own post type. */ '_edit_link' => 'post.php?post=%d', /* internal use only. don't use this when registering your own post type. */ 'capability_type' => 'page', @@ -74,7 +72,6 @@ function create_initial_post_types() { 'singular_name' => __( 'Navigation Menu Item' ), ), 'public' => false, - 'show_ui' => false, '_builtin' => true, /* internal use only. don't use this when registering your own post type. */ 'capability_type' => 'post', 'hierarchical' => false,