Changeset 59775 for trunk/src/wp-includes/blocks/navigation-link.php
- Timestamp:
- 02/07/2025 03:44:07 PM (5 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/blocks/navigation-link.php
r58187 r59775 178 178 if ( $is_post_type && $navigation_link_has_id ) { 179 179 $post = get_post( $attributes['id'] ); 180 if ( ! $post || 'publish' !== $post->post_status ) { 180 /** 181 * Filter allowed post_status for navigation link block to render. 182 * 183 * @since 6.8.0 184 * 185 * @param array $post_status 186 * @param array $attributes 187 * @param WP_Block $block 188 */ 189 $allowed_post_status = (array) apply_filters( 190 'render_block_core_navigation_link_allowed_post_status', 191 array( 'publish' ), 192 $attributes, 193 $block 194 ); 195 if ( ! $post || ! in_array( $post->post_status, $allowed_post_status, true ) ) { 181 196 return ''; 182 197 }
Note: See TracChangeset
for help on using the changeset viewer.