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'); 

credit - wordpress forum


Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -