Changeset 16004
- Timestamp:
- 10/27/2010 08:48:55 AM (14 years ago)
- Location:
- trunk/wp-admin/includes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/list-table-media.php
r15958 r16004 91 91 function extra_tablenav( $which ) { 92 92 global $post_type, $detached; 93 $post_type_obj = get_post_type_object( $post_type ); 93 94 ?> 94 95 <div class="alignleft actions"> … … 105 106 if ( $detached ) { ?> 106 107 <input type="submit" id="find_detached" name="find_detached" value="<?php esc_attr_e( 'Scan for lost attachments' ); ?>" class="button-secondary" /> 107 <?php } elseif ( $this->is_trash && current_user_can( 'edit_others_posts') ) { ?>108 <?php } elseif ( $this->is_trash && current_user_can( $post_type_obj->cap->edit_others_posts ) ) { ?> 108 109 <input type="submit" id="delete_all" name="delete_all" value="<?php esc_attr_e( 'Empty Trash' ); ?>" class="button-secondary apply" /> 109 110 <?php } ?> -
trunk/wp-admin/includes/post.php
r16003 r16004 206 206 wp_set_post_lock( $post_ID, $GLOBALS['current_user']->ID ); 207 207 208 if ( current_user_can( 'edit_others_posts') ) {209 if ( ! empty($post_data['sticky']) )210 stick_post( $post_ID);208 if ( current_user_can( $ptype->cap->edit_others_posts ) ) { 209 if ( ! empty( $post_data['sticky'] ) ) 210 stick_post( $post_ID ); 211 211 else 212 unstick_post( $post_ID);212 unstick_post( $post_ID ); 213 213 } 214 214 … … 337 337 $updated[] = wp_update_post( $post_data ); 338 338 339 if ( isset( $post_data['sticky'] ) && current_user_can( 'edit_others_posts') ) {339 if ( isset( $post_data['sticky'] ) && current_user_can( $ptype->cap->edit_others_posts ) ) { 340 340 if ( 'sticky' == $post_data['sticky'] ) 341 341 stick_post( $post_ID );
Note: See TracChangeset
for help on using the changeset viewer.