[wp-trac] [WordPress Trac] #41355: get_post_status filter is ignored in some cases

WordPress Trac noreply at wordpress.org
Tue Jul 18 11:55:10 UTC 2017


#41355: get_post_status filter is ignored in some cases
-------------------------------+-----------------------------
 Reporter:  zaycakitayca       |      Owner:
     Type:  defect (bug)       |     Status:  new
 Priority:  normal             |  Milestone:  Awaiting Review
Component:  Posts, Post Types  |    Version:  4.8
 Severity:  normal             |   Keywords:
  Focuses:                     |
-------------------------------+-----------------------------
 Code:
 {{{#!php
 <?php
 add_filter( 'get_post_status', function( $post_status, $post ) {
         return 'private';
 }, 10, 2 );
 }}}
 What does not work:
 For unauthourized user posts still displayed in categories, "Recent
 posts", "Recent comments" and maybe somewhere else.

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


More information about the wp-trac mailing list