diff --git a/themes/wporg-translate-events-2024/functions.php b/themes/wporg-translate-events-2024/functions.php index e6492c6f..8f56ae13 100644 --- a/themes/wporg-translate-events-2024/functions.php +++ b/themes/wporg-translate-events-2024/functions.php @@ -198,9 +198,9 @@ function render_page( string $template_path, string $title, array $attributes ): BLOCKS ); - // get block name from template path - $page_block_name = basename( dirname( $template_path ) ) === 'events' ? pathinfo( $template_path, PATHINFO_FILENAME ) : basename( dirname( $template_path ) ); - $header_json = wp_json_encode( + // get block name from template path. + $page_block_name = basename( dirname( $template_path ) ) === 'events' ? pathinfo( $template_path, PATHINFO_FILENAME ) : basename( dirname( $template_path ) ); + $header_json = wp_json_encode( array( 'title' => $title, 'page_block_name' => $page_block_name,