Set show_ui to true for post and page. Exclude _builtin = true from areas where we need to special case builtin types. fixes #13403
git-svn-id: http://svn.automattic.com/wordpress/trunk@14713 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
72d07941c7
commit
f0076eed1c
|
@ -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') );
|
||||
|
|
|
@ -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 )
|
||||
|
|
|
@ -113,7 +113,7 @@ $menu[25] = array( sprintf( __('Comments %s'), "<span id='awaiting-mod' class='c
|
|||
|
||||
$_wp_last_object_menu = 25; // The index of the last top-level menu in the object menu group
|
||||
|
||||
foreach ( (array) get_post_types( array('show_ui' => 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 );
|
||||
|
|
|
@ -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') );
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue