display wordpress user who published a pending post of another user
get_the_modified_author(); isn’t going to tell you who published the post, just who last edited it. You will need to capture you publisher yourself. function post_published_notification( $ID, $post ) { $publisher = wp_get_current_user(); update_post_meta($ID,’my_publisher’,$publisher); } add_action( ‘publish_post’, ‘post_published_notification’, 10, 2 ); Then use get_post_meta($post_id,’my_publisher’) to retrieve the data. Of course there are a numerous ways to … Read more