diff --git a/wp-content/plugins/core/src/Blocks/Block_Registrar.php b/wp-content/plugins/core/src/Blocks/Block_Registrar.php index dd0a66a4..d3db7686 100644 --- a/wp-content/plugins/core/src/Blocks/Block_Registrar.php +++ b/wp-content/plugins/core/src/Blocks/Block_Registrar.php @@ -25,11 +25,15 @@ public function register( string $block_name, string $blocks_dir = self::BLOCKS_ } /** - * @param array $args + * @param array $block The block attributes. + * @param string $content The block content. + * @param bool $is_preview Whether the block is being rendered for editing preview. + * @param int $post_id The current post being edited or viewed. + * @param \WP_Block|null $wp_block The block instance (since WP 5.5). */ - public function render_template( array $args ): void { - $template = $args['render_template']; - $path = str_replace( 'dist/blocks/', 'blocks/', $args['path'] ); + public function render_template( array $block, string $content = '', bool $is_preview = false, int $post_id = 0, ?\WP_Block $wp_block = null ): void { + $template = $block['render_template']; + $path = str_replace( 'dist/blocks/', 'blocks/', $block['path'] ); if ( ! file_exists( "$path/$template" ) ) { return;