- <?php if ( current_user_can( 'edit_themes' ) && $theme->parent() ) :
- /* translators: 1: theme title, 2: template dir, 3: stylesheet_dir, 4: theme title, 5: parent_theme */ ?>
- <p><?php printf( __( 'The template files are located in <code>%2$s</code>. The stylesheet files are located in <code>%3$s</code>. <strong>%4$s</strong> uses templates from <strong>%5$s</strong>. Changes made to the templates will affect both themes.' ),
- $title, str_replace( WP_CONTENT_DIR, '', $theme->get_template_directory() ), str_replace( WP_CONTENT_DIR, '', $theme->get_stylesheet_directory() ), $title, $theme->parent()->display('Name') ); ?></p>
- <?php else :
- /* translators: 1: theme title, 2: template dir, 3: stylesheet_dir */ ?>
- <p><?php printf( __( 'All of this theme’s files are located in <code>%2$s</code>.' ),
- $title, str_replace( WP_CONTENT_DIR, '', $theme->get_template_directory() ), str_replace( WP_CONTENT_DIR, '', $theme->get_stylesheet_directory() ) ); ?></p>
- <?php endif; ?>
+ <?php if ( $theme->parent() ) {
+ printf( ' <p class="howto">' . __( 'This <a href="%1$s">child theme</a> requires its parent theme, %2$s.' ) . '</p>',
+ __( 'https://codex.wordpress.org/Child_Themes' ),
+ $theme->parent()->display( 'Name' ) );
+ } ?>