Ticket #10758: 10758-wp-includes-authortemplateandcapabilties.patch
File 10758-wp-includes-authortemplateandcapabilties.patch, 1.2 KB (added by , 14 years ago) |
---|
-
wp-includes/author-template.php
### Eclipse Workspace Patch 1.0 #P wordpress-trunk
22 22 */ 23 23 function get_the_author($deprecated = '') { 24 24 global $authordata; 25 return apply_filters('the_author', $authordata->display_name);25 return apply_filters('the_author', is_object($authordata) ? $authordata->display_name : null); 26 26 } 27 27 28 28 /** -
wp-includes/capabilities.php
833 833 $post_author_data = get_userdata( $post->post_author ); 834 834 //echo "current user id : $user_id, post author id: " . $post_author_data->ID . "<br />"; 835 835 // If the user is the author... 836 if ( $user_id == $post_author_data->ID ) {836 if ( is_object($post_author_data) && $user_id == $post_author_data->ID ) { 837 837 // If the post is published... 838 838 if ( 'publish' == $post->post_status ) { 839 839 $caps[] = 'edit_published_posts';