Switch in and out of PHP to render fallback title.

The upload checks for the .org Theme Directory are rightfully strict about the contents of the title tag.
Switching in and out of PHP should make `_s`-based themes pass those tests again.

See https://github.com/Automattic/_s/pull/644#discussion-diff-22153263
See #644.
This commit is contained in:
Konstantin Obenland 2014-12-22 09:16:13 +01:00
parent 204654ac1f
commit f2d2495630
1 changed files with 3 additions and 1 deletions

View File

@ -77,7 +77,9 @@ if ( ! function_exists( '_wp_render_title_tag' ) ) :
* @todo Remove this function when WordPress 4.3 is released. * @todo Remove this function when WordPress 4.3 is released.
*/ */
function _s_render_title() { function _s_render_title() {
echo '<title>' . wp_title( '|', false, 'right' ) . "</title>\n"; ?>
<title><?php wp_title( '|', true, 'right' ); ?></title>
<?php
} }
add_action( 'wp_head', '_s_render_title' ); add_action( 'wp_head', '_s_render_title' );
endif; endif;