Changeset 12702 for trunk/wp-admin/post-new.php
- Timestamp:
- 01/12/2010 12:14:27 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/post-new.php
r12597 r12702 10 10 require_once('admin.php'); 11 11 12 if ( isset($_GET['post_type']) && in_array( $_GET['post_type'], get_post_types( array('_show' => true) ) ) )12 if ( isset($_GET['post_type']) && ( in_array( $_GET['post_type'], get_post_types( array('_show' => true ) ) ) || in_array( $_GET['post_type'], get_post_types( array('_builtin' => true ) ) ) ) ) 13 13 $post_type = $_GET['post_type']; 14 14 else … … 18 18 $parent_file = "edit.php?post_type=$post_type"; 19 19 $submenu_file = "post-new.php?post_type=$post_type"; 20 if ( 'page' == $post_type ) 21 $parent_file = 'edit-pages.php'; 20 22 } else { 21 23 $parent_file = 'edit.php'; … … 36 38 wp_enqueue_script('word-count'); 37 39 38 if ( !current_user_can('edit_posts') ) {40 if ( 'post' == $post_type && !current_user_can('edit_posts') ) { 39 41 require_once ('./admin-header.php'); ?> 40 42 <div class="wrap"> … … 50 52 51 53 // Show post form. 52 $post = get_default_post_to_edit(); 53 $post->post_type = $post_type; 54 include('edit-form-advanced.php'); 54 if ( current_user_can('edit_' . $post_type_object->capability_type . 's') ) { 55 $post = get_default_post_to_edit( $post_type ); 56 include('edit-form-advanced.php'); 57 } 55 58 56 59 include('admin-footer.php');
Note: See TracChangeset
for help on using the changeset viewer.