Changeset 13537
- Timestamp:
- 03/01/2010 08:33:03 PM (15 years ago)
- Location:
- trunk/wp-admin
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/edit.php
r13273 r13537 21 21 } 22 22 23 if ( isset($_GET['post_type']) && ( in_array( $_GET['post_type'], get_post_types( array('public' => true ) ) ) ) ) 23 if ( !isset($_GET['post_type']) ) 24 $post_type = 'post'; 25 elseif ( in_array( $_GET['post_type'], get_post_types( array('public' => true ) ) ) ) 24 26 $post_type = $_GET['post_type']; 25 27 else 26 $post_type = 'post';28 wp_die( __('Invalid post type') ); 27 29 $_GET['post_type'] = $post_type; 28 30 -
trunk/wp-admin/post-new.php
r13101 r13537 10 10 require_once('admin.php'); 11 11 12 if ( isset($_GET['post_type']) && ( in_array( $_GET['post_type'], get_post_types( array('public' => true ) ) ) ) ) 12 if ( !isset($_GET['post_type']) ) 13 $post_type = 'post'; 14 elseif ( in_array( $_GET['post_type'], get_post_types( array('public' => true ) ) ) ) 13 15 $post_type = $_GET['post_type']; 14 16 else 15 $post_type = 'post';17 wp_die( __('Invalid post type') ); 16 18 17 19 if ( 'post' != $post_type ) {
Note: See TracChangeset
for help on using the changeset viewer.