Ticket #19131: 19131.edit-php.patch
File 19131.edit-php.patch, 834 bytes (added by , 13 years ago) |
---|
-
wp-admin/edit.php
9 9 /** WordPress Administration Bootstrap */ 10 10 require_once( './admin.php' ); 11 11 12 if ( !isset($_GET['post_type']) ) 13 $post_type = 'post'; 14 elseif ( in_array( $_GET['post_type'], get_post_types( array('show_ui' => true ) ) ) ) 15 $post_type = $_GET['post_type']; 16 else 17 wp_die( __('Invalid post type') ); 12 if ( ! $typenow ) 13 wp_die( __( 'Invalid post type' ) ); 18 14 19 $_GET['post_type'] = $post_type; 20 15 $post_type = $typenow; 21 16 $post_type_object = get_post_type_object( $post_type ); 22 17 18 if ( ! $post_type_object ) 19 wp_die( __('Invalid post type') ); 20 23 21 if ( !current_user_can($post_type_object->cap->edit_posts) ) 24 22 wp_die(__('Cheatin’ uh?')); 25 23