apply_filters( 'render_block_core_navigation_link_allowed_post_status', array $post_status, array $attributes, WP_Block $block )
- Since
- 6.8.0
Filter allowed post_status for navigation link block to render.
Compatibility
- WordPress
- since 6.8.0
- 6.7.7
- 6.8.8
- 6.9.7
- 7.0.4
- 7.1.0
Present in 4 of the 5 tracked releases, added in 6.8.0.
Parameters
$post_statusarray- Array of allowed post statuses.
$attributesarray- Block attributes.
$blockWP_Block- The parsed block.
Where this hook fires · 1
wp-includes/blocks/navigation-link/shared/item-should-render.php:34block_core_shared_navigation_item_should_render()
Source code
* @since 6.8.0 * * @param array $post_status Array of allowed post statuses. * @param array $attributes Block attributes. * @param WP_Block $block The parsed block. */ $allowed_post_status = (array) apply_filters( 'render_block_core_navigation_link_allowed_post_status', array( 'publish' ), $attributes, $block ); if ( ! $post || ! in_array( $post->post_status, $allowed_post_status, true ) ) {Changelog
Introduced in 6.8.0. Unchanged from 6.8.8 through 7.1.0.
Signature, return type and hooks compared across 4 parsed releases.
About this page
- Parsed data
- Generated from the wordpress-develop 7.1.0 tag, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
- Corrections
- Something wrong on this page? Report it and it gets fixed in the next regeneration.