Opened 8 years ago
Closed 2 months ago
#41355 closed defect (bug) (invalid)
get_post_status filter is ignored in some cases
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | Priority: | normal | |
| Severity: | normal | Version: | 4.8 |
| Component: | Posts, Post Types | Keywords: | |
| Focuses: | Cc: |
Description
Code:
<?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.
Change History (1)
Note: See
TracTickets for help on using
tickets.
You have to edit the theme you are using or create your own theme to avoid this. By default not all themes check for this in certain templates.