Changeset 13841
- Timestamp:
- 03/27/2010 06:40:59 AM (15 years ago)
- Location:
- trunk/wp-admin
- Files:
-
- 2 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 ) { -
trunk/wp-admin/menu.php
r13783 r13841 119 119 120 120 $menu[$_wp_last_object_menu] = array(esc_attr($ptype_obj->label), $ptype_obj->edit_type_cap, "edit.php?post_type=$ptype", '', 'menu-top menu-icon-posts', 'menu-' . sanitize_html_class($ptype), 'div'); 121 $submenu["edit.php?post_type=$ptype"][5] = array( __('Edit'), 'edit_posts', "edit.php?post_type=$ptype");121 $submenu["edit.php?post_type=$ptype"][5] = array( __('Edit'), $ptype_obj->edit_type_cap, "edit.php?post_type=$ptype"); 122 122 /* translators: add new custom post type */ 123 $submenu["edit.php?post_type=$ptype"][10] = array( _x('Add New', 'post'), 'edit_posts', "post-new.php?post_type=$ptype" );123 $submenu["edit.php?post_type=$ptype"][10] = array( _x('Add New', 'post'), $ptype_obj->edit_type_cap, "post-new.php?post_type=$ptype" ); 124 124 125 125 $i = 15;
Note: See TracChangeset
for help on using the changeset viewer.