* @return string The author's display name.
*/
function get_the_modified_author() {
- global $post;
- if ( $last_id = get_post_meta($post->ID, '_edit_last', true) ) {
+ if ( $last_id = get_post_meta( get_post()->ID, '_edit_last', true) ) {
$last_user = get_userdata($last_id);
return apply_filters('the_modified_author', $last_user->display_name);
}
* @return int The number of posts by the author.
*/
function get_the_author_posts() {
- global $post;
- return count_user_posts($post->post_author);
+ return count_user_posts( get_post()->post_author );
}
/**