wp/wp-includes/blocks/block.php
changeset 19 3d72ae0968f4
parent 18 be944660c56a
child 21 48c4eec2b7e6
equal deleted inserted replaced
18:be944660c56a 19:3d72ae0968f4
    40 		return '';
    40 		return '';
    41 	}
    41 	}
    42 
    42 
    43 	$seen_refs[ $attributes['ref'] ] = true;
    43 	$seen_refs[ $attributes['ref'] ] = true;
    44 
    44 
    45 	$result = do_blocks( $reusable_block->post_content );
    45 	// Handle embeds for reusable blocks.
       
    46 	global $wp_embed;
       
    47 	$content = $wp_embed->run_shortcode( $reusable_block->post_content );
       
    48 	$content = $wp_embed->autoembed( $content );
       
    49 
       
    50 	$content = do_blocks( $content );
    46 	unset( $seen_refs[ $attributes['ref'] ] );
    51 	unset( $seen_refs[ $attributes['ref'] ] );
    47 	return $result;
    52 	return $content;
    48 }
    53 }
    49 
    54 
    50 /**
    55 /**
    51  * Registers the `core/block` block.
    56  * Registers the `core/block` block.
    52  */
    57  */