Make WordPress Core


Ignore:
Timestamp:
02/07/2025 03:44:07 PM (5 months ago)
Author:
joemcgill
Message:

Editor: Update packages for 6.8 pre-Betas.

Syncs @wordpress/* packages to the 'latest' npm tag.

Props mamaduka, joemcgill, youknowriad, swissspidy, sergiomdgomes, gziolo.
See #62887.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/blocks/navigation-link.php

    r58187 r59775  
    178178    if ( $is_post_type && $navigation_link_has_id ) {
    179179        $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 ) ) {
    181196            return '';
    182197        }
Note: See TracChangeset for help on using the changeset viewer.