[wp-trac] [WordPress Trac] #30530: Enhance privacy by hiding posts of other users

WordPress Trac noreply at wordpress.org
Thu Nov 27 16:32:56 UTC 2014


#30530: Enhance privacy by hiding posts of other users
-------------------------------+-----------------------------
 Reporter:  minderdl           |      Owner:
     Type:  enhancement        |     Status:  new
 Priority:  normal             |  Milestone:  Awaiting Review
Component:  Posts, Post Types  |    Version:
 Severity:  normal             |   Keywords:
  Focuses:                     |
-------------------------------+-----------------------------
 I haven't found an entry in Trac for this, but I know that this is
 discussed in blogs/stackexchage/... many times: A feature to hide posts of
 other authors in the admin interface.

 The proposed solutions mostly include a pre_get_posts or request filter.
 However, most comments critizise that the post counter is still wrong.
 Thus, another filter for wp_count_posts is needed, duplicating much of the
 code of wp-includes/post.php's wp_count_posts(). Moreover, the select
 query in the original wp_count_posts() is executed anyway, but the result
 is thrown away. Finally, to make caching work, a third filter for
 transition_post_status to clear the post counter cache is needed.

 An all this just to hide the posts of other users...

 There should be an easy option to achieve this provided by the Core. There
 could be a 'list_others_*' capability that is honoured by query.php's
 get_posts() and post.php's wp_count_posts(). One could argue that
 published posts could be seen anyway, so the capability could also be
 named 'list_others_protected_*' and hides/shows the posts with a
 post_status marked as protected (get_posts() includes all posts with these
 status if we are in the admin).

 That would be a great feature often requested by users and greatly
 enhancing the CMS capabilities!

--
Ticket URL: <https://core.trac.wordpress.org/ticket/30530>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list