Changeset 59906 for trunk/src/wp-includes/blocks/post-content.php
- Timestamp:
- 03/03/2025 06:06:16 PM (12 months ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/blocks/post-content.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/blocks/post-content.php
r59775 r59906 47 47 } 48 48 49 $ignored_hooked_blocks = get_post_meta( $post_id, '_wp_ignored_hooked_blocks', true );50 if ( ! empty( $ignored_hooked_blocks ) ) {51 $ignored_hooked_blocks = json_decode( $ignored_hooked_blocks, true );52 $attributes['metadata'] = array(53 'ignoredHookedBlocks' => $ignored_hooked_blocks,54 );55 }56 57 // Wrap in Post Content block so the Block Hooks algorithm can insert blocks58 // that are hooked as first or last child of `core/post-content`.59 $content = get_comment_delimited_block_content(60 'core/post-content',61 $attributes,62 $content63 );64 65 // We need to remove the `core/post-content` block wrapper after the Block Hooks algorithm,66 // but before `do_blocks` runs, as it would otherwise attempt to render the same block again --67 // thus recursing infinitely.68 add_filter( 'the_content', 'remove_serialized_parent_block', 8 );69 70 49 /** This filter is documented in wp-includes/post-template.php */ 71 50 $content = apply_filters( 'the_content', str_replace( ']]>', ']]>', $content ) ); 72 51 unset( $seen_ids[ $post_id ] ); 73 74 remove_filter( 'the_content', 'remove_serialized_parent_block', 8 );75 52 76 53 if ( empty( $content ) ) {
Note: See TracChangeset
for help on using the changeset viewer.