Ticket #54272: 54272.3.diff
File 54272.3.diff, 1.9 KB (added by , 3 years ago) |
---|
-
src/wp-includes/class-wp-theme.php
338 338 339 339 if ( ! $this->template ) { 340 340 $this->template = $this->stylesheet; 341 if ( ! file_exists( $this->theme_root . '/' . $this->stylesheet . '/index.php' ) ) { 341 $theme_path = $this->theme_root . '/' . $this->stylesheet; 342 343 if ( ! file_exists( $theme_path . '/index.php' ) 344 && ! file_exists( $theme_path . '/templates/index.html' ) 345 ) { 342 346 $error_message = sprintf( 343 /* translators: 1: index.php, 2: Documentation URL, 3: style.css */344 __( 'Template is missing. Standalone themes need to have a %1$s template file. <a href="%2$s">Child themes</a> need to have a Template header in the %3$s stylesheet.' ),347 /* translators: 1: index.php, 2: templates/index.html, 3: Documentation URL, 4: style.css */ 348 __( '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.' ), 345 349 '<code>index.php</code>', 350 '<code>templates/index.html</code>', 346 351 __( 'https://developer.wordpress.org/themes/advanced-topics/child-themes/' ), 347 352 '<code>style.css</code>' 348 353 ); -
src/wp-includes/theme.php
857 857 return true; 858 858 } 859 859 860 if ( ! file_exists( get_template_directory() . '/index.php' ) ) { 860 if ( ! file_exists( get_template_directory() . '/index.php' ) 861 && ! file_exists( get_template_directory() . '/templates/index.html' ) 862 ) { 861 863 // Invalid. 862 864 } elseif ( ! file_exists( get_template_directory() . '/style.css' ) ) { 863 865 // Invalid.