From 3f199c6e675d97dc85786ffe8c47871bee603574 Mon Sep 17 00:00:00 2001 From: Bernie Reiter Date: Mon, 4 May 2020 17:48:44 +0200 Subject: [PATCH] Add moar comments --- lib/template-loader.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/template-loader.php b/lib/template-loader.php index 76d594fe45b83..43aa362d148c2 100644 --- a/lib/template-loader.php +++ b/lib/template-loader.php @@ -90,10 +90,13 @@ function gutenberg_override_query_template( $template, $type, array $templates = $_wp_current_template_content = empty( $current_template_post->post_content ) ? __( 'Empty template.', 'gutenberg' ) : $current_template_post->post_content; } - // Add extra hooks for template canvas. + // Add hooks for template canvas. + // Add viewport meta tag. add_action( 'wp_head', 'gutenberg_viewport_meta_tag', 0 ); - remove_action( 'wp_head', '_wp_render_title_tag', 1 ); - add_action( 'wp_head', 'gutenberg_render_title_tag', 1 ); + + // Render title tag with content, regardless of whether theme has title-tag support. + remove_action( 'wp_head', '_wp_render_title_tag', 1 ); // Remove conditional title tag rendering... + add_action( 'wp_head', 'gutenberg_render_title_tag', 1 ); // ...and make it unconditional. // This file will be included instead of the theme's template file. return gutenberg_dir_path() . 'lib/template-canvas.php';