Changeset 25177
- Timestamp:
- 08/30/2013 04:00:06 AM (12 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/capabilities.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/capabilities.php
r24593 r25177 1040 1040 $post_author_id = $user_id; 1041 1041 1042 $post_author_data = $post_author_id == get_current_user_id() ? wp_get_current_user() : get_userdata( $post_author_id );1043 1044 1042 // If the user is the author... 1045 if ( is_object( $post_author_data ) && $user_id == $post_author_data->ID) {1043 if ( $user_id == $post_author_id ) { 1046 1044 // If the post is published... 1047 1045 if ( 'publish' == $post->post_status ) { … … 1090 1088 $post_author_id = $user_id; 1091 1089 1092 $post_author_data = $post_author_id == get_current_user_id() ? wp_get_current_user() : get_userdata( $post_author_id );1093 1094 1090 // If the user is the author... 1095 if ( is_object( $post_author_data ) && $user_id == $post_author_data->ID) {1091 if ( $user_id == $post_author_id ) { 1096 1092 // If the post is published... 1097 1093 if ( 'publish' == $post->post_status ) { … … 1144 1140 $post_author_id = $user_id; 1145 1141 1146 $post_author_data = $post_author_id == get_current_user_id() ? wp_get_current_user() : get_userdata( $post_author_id ); 1147 1148 if ( is_object( $post_author_data ) && $user_id == $post_author_data->ID ) 1142 if ( $user_id == $post_author_id ) 1149 1143 $caps[] = $post_type->cap->read; 1150 1144 elseif ( $status_obj->private )
Note: See TracChangeset
for help on using the changeset viewer.