Skip to content

Commit

Permalink
Bail early if no content is given
Browse files Browse the repository at this point in the history
  • Loading branch information
ockham committed Nov 28, 2024
1 parent 0b67dea commit 41d13d0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/wp-includes/blocks.php
Original file line number Diff line number Diff line change
Expand Up @@ -1052,6 +1052,10 @@ function set_ignored_hooked_blocks_metadata( &$parsed_anchor_block, $relative_po
* @return string The serialized markup.
*/
function apply_block_hooks_to_content( $content, $context = null, $callback = 'insert_hooked_blocks' ) {
if ( ! $content ) {
return $content;
}

// Default to the current post if no context is provided.
if ( null === $context ) {
$context = get_post();
Expand Down

0 comments on commit 41d13d0

Please sign in to comment.