Changeset 57668 for trunk/src/wp-includes/blocks.php
- Timestamp:
- 02/20/2024 03:20:39 PM (14 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/blocks.php
r57660 r57668 898 898 * @since 6.5.0 899 899 * 900 * @param array $parsed_hooked_block The parsed block array for the given hooked block type.900 * @param array|null $parsed_hooked_block The parsed block array for the given hooked block type, or null to suppress the block. 901 901 * @param string $hooked_block_type The hooked block type name. 902 902 * @param string $relative_position The relative position of the hooked block. … … 914 914 * @since 6.5.0 915 915 * 916 * @param array $parsed_hooked_block The parsed block array for the given hooked block type.916 * @param array|null $parsed_hooked_block The parsed block array for the given hooked block type, or null to suppress the block. 917 917 * @param string $hooked_block_type The hooked block type name. 918 918 * @param string $relative_position The relative position of the hooked block. … … 923 923 $parsed_hooked_block = apply_filters( "hooked_block_{$hooked_block_type}", $parsed_hooked_block, $hooked_block_type, $relative_position, $parsed_anchor_block, $context ); 924 924 925 if ( null === $parsed_hooked_block ) { 926 continue; 927 } 928 925 929 // It's possible that the filter returned a block of a different type, so we explicitly 926 930 // look for the original `$hooked_block_type` in the `ignoredHookedBlocks` metadata. … … 961 965 if ( empty( $hooked_block_types ) ) { 962 966 return ''; 967 } 968 969 foreach ( $hooked_block_types as $index => $hooked_block_type ) { 970 $parsed_hooked_block = array( 971 'blockName' => $hooked_block_type, 972 'attrs' => array(), 973 'innerBlocks' => array(), 974 'innerContent' => array(), 975 ); 976 977 /** This filter is documented in wp-includes/blocks.php */ 978 $parsed_hooked_block = apply_filters( 'hooked_block', $parsed_hooked_block, $hooked_block_type, $relative_position, $parsed_anchor_block, $context ); 979 980 /** This filter is documented in wp-includes/blocks.php */ 981 $parsed_hooked_block = apply_filters( "hooked_block_{$hooked_block_type}", $parsed_hooked_block, $hooked_block_type, $relative_position, $parsed_anchor_block, $context ); 982 983 if ( null === $parsed_hooked_block ) { 984 unset( $hooked_block_types[ $index ] ); 985 } 963 986 } 964 987
Note: See TracChangeset
for help on using the changeset viewer.