render_block_core_navigation_link_allowed_post_status
Filter allowed post_status for navigation link block to render.
Usage
add_filter( 'render_block_core_navigation_link_allowed_post_status', 'wp_kama_render_block_core_navigation_link_allowed_post_status_filter', 10, 3 ); /** * Function for `render_block_core_navigation_link_allowed_post_status` filter-hook. * * @param array $post_status * @param array $attributes * @param WP_Block $block * * @return array */ function wp_kama_render_block_core_navigation_link_allowed_post_status_filter( $post_status, $attributes, $block ){ // filter... return $post_status; }
- $post_status(array)
- -
- $attributes(array)
- -
- $block(WP_Block)
- -
Changelog
Since 6.8.0 | Introduced. |
Where the hook is called
render_block_core_navigation_link_allowed_post_status
wp-includes/blocks/navigation-link.php 189-194
$allowed_post_status = (array) apply_filters( 'render_block_core_navigation_link_allowed_post_status', array( 'publish' ), $attributes, $block );