Ticket #46187: 46187-1.diff
File 46187-1.diff, 1.5 KB (added by , 6 years ago) |
---|
-
src/wp-includes/blocks.php
200 200 */ 201 201 $block = apply_filters( 'render_block_data', $block, $source_block ); 202 202 203 $block_type = WP_Block_Type_Registry::get_instance()->get_registered( $block['blockName'] ); 204 $is_dynamic = $block['blockName'] && null !== $block_type && $block_type->is_dynamic(); 203 $block_name = $block['blockName']; 204 205 $block_type = WP_Block_Type_Registry::get_instance()->get_registered( $block_name ); 206 $is_dynamic = $block_name && null !== $block_type && $block_type->is_dynamic(); 205 207 $block_content = ''; 206 208 $index = 0; 207 209 … … 227 229 * @param string $block_content The block content about to be appended. 228 230 * @param array $block The full block, including name and attributes. 229 231 */ 230 return apply_filters( 'render_block', $block_content, $block ); 232 $block_content = apply_filters( 'render_block', $block_content, $block ); 233 234 /** 235 * Filters the content of a single block. 236 * 237 * The dynamic portion of the hook name, `$block_name`, refers to 238 * the block name - "namespace/block". 239 * 240 * @since x.y.z 241 * 242 * @param string $block_content The block content about to be appended. 243 * @param array $block The full block, including name and attributes. 244 */ 245 return apply_filters( "render_block_{$block_name}", $block_content, $block ); 231 246 } 232 247 233 248 /**