Make WordPress Core


Ignore:
Timestamp:
12/19/2024 01:24:22 PM (21 months ago)
Author:
Bernhard Reiter
Message:

Block Hooks: Apply to synced patterns.

Apply Block Hooks to synced patterns (i.e. core/block instances).

Props bernhard-reiter, gziolo.
Fixes #62704.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/default-filters.php

    r59523 r59543  
    761761add_filter( 'rest_pre_insert_wp_template_part', 'inject_ignored_hooked_blocks_metadata_attributes' );
    762762
    763 // Update ignoredHookedBlocks postmeta for wp_navigation post type.
     763// Update ignoredHookedBlocks postmeta for some post types.
    764764add_filter( 'rest_pre_insert_page', 'update_ignored_hooked_blocks_postmeta' );
    765765add_filter( 'rest_pre_insert_post', 'update_ignored_hooked_blocks_postmeta' );
     766add_filter( 'rest_pre_insert_wp_block', 'update_ignored_hooked_blocks_postmeta' );
    766767add_filter( 'rest_pre_insert_wp_navigation', 'update_ignored_hooked_blocks_postmeta' );
    767768
     
    769770add_filter( 'rest_prepare_page', 'insert_hooked_blocks_into_rest_response', 10, 2 );
    770771add_filter( 'rest_prepare_post', 'insert_hooked_blocks_into_rest_response', 10, 2 );
     772add_filter( 'rest_prepare_wp_block', 'insert_hooked_blocks_into_rest_response', 10, 2 );
    771773add_filter( 'rest_prepare_wp_navigation', 'insert_hooked_blocks_into_rest_response', 10, 2 );
    772774
Note: See TracChangeset for help on using the changeset viewer.