WordPress.org

Make WordPress Core

Opened 2 years ago

#41355 new defect (bug)

get_post_status filter is ignored in some cases

Reported by: zaycakitayca Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 4.8
Component: Posts, Post Types Keywords:
Focuses: Cc:
PR Number:

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 (0)

Note: See TracTickets for help on using tickets.