the_modified_author URL
-
Very simply, what I’d like to do is add the posts URL of the last editor with
get_author_posts_url
, but I can’t for the life of me figure out how to successfully extract the user ID fromget_the_modified_author
. I know how to pull it out and print it, but nothing I’ve tried has successfully promptedget_author_posts_url
to use the correct ID.Any ideas? What painfully obvious PHP magic am I missing here? For reference and convenience, I’ve pasted relevant functions below. Thanks for your help!
[code moderated - please use the pastebin for any code over 10 lines]
function get_the_modified_author() { global $post; if ( $last_id = get_post_meta($post->ID, '_edit_last', true) ) { $last_user = get_userdata($last_id); return apply_filters('the_modified_author', $last_user->display_name); } }
function the_modified_author() { echo get_the_modified_author(); }
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘the_modified_author URL’ is closed to new replies.