WordPress.org

Make WordPress Core

Changeset 14713


Ignore:
Timestamp:
05/17/10 16:39:36 (4 years ago)
Author:
ryan
Message:

Set show_ui to true for post and page. Exclude _builtin = true from areas where we need to special case builtin types. fixes #13403

Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/edit.php

    r14674 r14713  
    1212if ( !isset($_GET['post_type']) ) 
    1313    $post_type = 'post'; 
    14 elseif ( in_array( $_GET['post_type'], get_post_types( array('show_ui' => true ) ) ) || in_array( $_GET['post_type'], array( 'post', 'page' ) ) ) 
     14elseif ( in_array( $_GET['post_type'], get_post_types( array('show_ui' => true ) ) ) ) 
    1515    $post_type = $_GET['post_type']; 
    1616else 
  • trunk/wp-admin/includes/template.php

    r14675 r14713  
    37093709        $screen = convert_to_screen($screen); 
    37103710 
    3711     $columns = array('dashboard' => 4, 'post' => 2, 'page' => 2, 'link' => 2); 
     3711    $columns = array('dashboard' => 4, 'link' => 2); 
    37123712 
    37133713    // Add custom post types 
  • trunk/wp-admin/menu.php

    r14654 r14713  
    114114$_wp_last_object_menu = 25; // The index of the last top-level menu in the object menu group 
    115115 
    116 foreach ( (array) get_post_types( array('show_ui' => true) ) as $ptype ) { 
     116foreach ( (array) get_post_types( array('show_ui' => true, '_builtin' => false) ) as $ptype ) { 
    117117    $ptype_obj = get_post_type_object( $ptype ); 
    118118    $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. 
  • trunk/wp-admin/post-new.php

    r14674 r14713  
    1212if ( !isset($_GET['post_type']) ) 
    1313    $post_type = 'post'; 
    14 elseif ( in_array( $_GET['post_type'], get_post_types( array('show_ui' => true ) ) ) || in_array( $_GET['post_type'], array( 'post', 'page' ) ) ) 
     14elseif ( in_array( $_GET['post_type'], get_post_types( array('show_ui' => true ) ) ) ) 
    1515    $post_type = $_GET['post_type']; 
    1616else 
  • trunk/wp-includes/post.php

    r14699 r14713  
    1818    register_post_type( 'post', array( 
    1919        'public'  => true, 
    20         'show_ui' => false, 
    2120        '_builtin' => true, /* internal use only. don't use this when registering your own post type. */ 
    2221        '_edit_link' => 'post.php?post=%d', /* internal use only. don't use this when registering your own post type. */ 
     
    3029    register_post_type( 'page', array( 
    3130        'public' => true, 
    32         'show_ui' => false, 
    3331        '_builtin' => true, /* internal use only. don't use this when registering your own post type. */ 
    3432        '_edit_link' => 'post.php?post=%d', /* internal use only. don't use this when registering your own post type. */ 
     
    7573        ), 
    7674        'public' => false, 
    77         'show_ui' => false, 
    7875        '_builtin' => true, /* internal use only. don't use this when registering your own post type. */ 
    7976        'capability_type' => 'post', 
Note: See TracChangeset for help on using the changeset viewer.