- Timestamp:
- 05/20/2022 12:59:55 AM (3 years ago)
- Location:
- branches/6.0
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/6.0
-
branches/6.0/src/wp-admin/includes/class-theme-upgrader.php
r52998 r53417 567 567 } 568 568 569 // If it's not a child theme, it must have at least an index.php to be legit. 570 if ( empty( $info['Template'] ) && ! file_exists( $working_directory . 'index.php' ) ) { 569 /* 570 * Parent themes must contain an index file: 571 * - classic themes require /index.php 572 * - block themes require /templates/index.html or block-templates/index.html (deprecated 5.9.0). 573 */ 574 if ( 575 empty( $info['Template'] ) && 576 ! file_exists( $working_directory . 'index.php' ) && 577 ! file_exists( $working_directory . 'templates/index.html' ) && 578 ! file_exists( $working_directory . 'block-templates/index.html' ) 579 ) { 571 580 return new WP_Error( 572 581 'incompatible_archive_theme_no_index', 573 582 $this->strings['incompatible_archive'], 574 583 sprintf( 575 /* translators: %s: index.php */ 576 __( 'The theme is missing the %s file.' ), 577 '<code>index.php</code>' 584 /* translators: 1: templates/index.html, 2: index.php, 3: Documentation URL, 4: Template, 5: style.css */ 585 __( '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.' ), 586 '<code>templates/index.html</code>', 587 '<code>index.php</code>', 588 __( 'https://developer.wordpress.org/themes/advanced-topics/child-themes/' ), 589 '<code>Template</code>', 590 '<code>style.css</code>' 578 591 ) 579 592 );
Note: See TracChangeset
for help on using the changeset viewer.