Changeset 13841 for trunk/wp-admin/edit.php
- Timestamp:
- 03/27/2010 06:40:59 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/edit.php
r13770 r13841 9 9 /** WordPress Administration Bootstrap */ 10 10 require_once('admin.php'); 11 12 if ( !current_user_can('edit_posts') )13 wp_die(__('Cheatin’ uh?'));14 15 // Back-compat for viewing comments of an entry16 if ( $_redirect = intval( max( @$_GET['p'], @$_GET['attachment_id'], @$_GET['page_id'] ) ) ) {17 wp_redirect( admin_url('edit-comments.php?p=' . $_redirect ) );18 exit;19 } else {20 unset( $_redirect );21 }22 11 23 12 if ( !isset($_GET['post_type']) ) … … 30 19 31 20 $post_type_object = get_post_type_object($post_type); 21 22 if ( !current_user_can($post_type_object->edit_type_cap) ) 23 wp_die(__('Cheatin’ uh?')); 24 25 // Back-compat for viewing comments of an entry 26 if ( $_redirect = intval( max( @$_GET['p'], @$_GET['attachment_id'], @$_GET['page_id'] ) ) ) { 27 wp_redirect( admin_url('edit-comments.php?p=' . $_redirect ) ); 28 exit; 29 } else { 30 unset( $_redirect ); 31 } 32 32 33 33 if ( 'post' != $post_type ) {
Note: See TracChangeset
for help on using the changeset viewer.