Show only author's own activity (Recently Published) post in wordpress dashboard -
i'm working on multi author blog. in dashboard wordpress shows users post, activity , comment. need show author's own post, comment , activity of own post only.
i've searched , found codes, working on showing user's own comment , post. http://pastebin.com/pcbsrpyy
but in activity tab (recently published) shows other users post. there filter function, show author's own activity , list of own published posts in wordpress dashboard?
this solution you....
function posts_for_current_author($query) { global $user_level; if($query->is_admin && $user_level < 5) { global $user_id; $query->set('author', $user_id); unset($user_id); } unset($user_level); return $query; } add_filter('pre_get_posts', 'posts_for_current_author');
Comments
Post a Comment