I18N: Move code out of a translatable string in WP_Theme::__construct().

Props kapilpaul, azouamauriac, SergeyBiryukov.
Fixes #55405.

git-svn-id: https://develop.svn.wordpress.org/trunk@53190 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2022-04-16 00:28:17 +00:00
parent 0626da2976
commit 23aa7715b0

View File

@ -345,11 +345,12 @@ final class WP_Theme implements ArrayAccess {
&& ! file_exists( $theme_path . '/index.php' )
) {
$error_message = sprintf(
/* translators: 1: templates/index.html, 2: index.php, 3: Documentation URL, 4: style.css */
__( 'Template is missing. Standalone themes need to have a %1$s or %2$s template file. <a href="%3$s">Child themes</a> need to have a Template header in the %4$s stylesheet.' ),
/* translators: 1: templates/index.html, 2: index.php, 3: Documentation URL, 4: Template, 5: style.css */
__( 'Template is missing. Standalone themes need to have a %1$s or %2$s template file. <a href="%3$s">Child themes</a> need to have a %4$s header in the %5$s stylesheet.' ),
'<code>templates/index.html</code>',
'<code>index.php</code>',
__( 'https://developer.wordpress.org/themes/advanced-topics/child-themes/' ),
'<code>Template</code>',
'<code>style.css</code>'
);
$this->errors = new WP_Error( 'theme_no_index', $error_message );