hooked_block_types

hooked_block_types

Hook Type: action
See hook in action

See hook in core

Displaying hooks found in version: wordpress-6.7.2

do_action('hooked_block_types') is found 2 times:

  • /wp-includes/blocks.php line 918
    914
    915
    916
    917
    918
    919
    920
    921
    922
    923
    924
    * @param string                          $anchor_block_type  The anchor block type.
     * @param WP_Block_Template|WP_Post|array $context            The block template, template part, `wp_navigation` post type,
     *                                                            or pattern that the anchor block belongs to.
     */
    $hooked_block_types = apply_filters( 'hooked_block_types', $hooked_block_types, $relative_position, $anchor_block_type, $context );
     
    $markup = '';
    foreach ( $hooked_block_types as $hooked_block_type ) {
        $parsed_hooked_block = array(
            'blockName'    => $hooked_block_type,
            'attrs'        => array(),
  • /wp-includes/blocks.php line 998
    0994
    0995
    0996
    0997
    0998
    0999
    1000
    1001
    1002
    1003
    1004
        ? $hooked_blocks[ $anchor_block_type ][ $relative_position ]
        : array();
     
    /** This filter is documented in wp-includes/blocks.php */
    $hooked_block_types = apply_filters( 'hooked_block_types', $hooked_block_types, $relative_position, $anchor_block_type, $context );
    if ( empty( $hooked_block_types ) ) {
        return '';
    }
     
    foreach ( $hooked_block_types as $index => $hooked_block_type ) {
        $parsed_hooked_block = array(

See this hook used in plugins: