diff --git a/wp-admin/includes/theme.php b/wp-admin/includes/theme.php index 7ea20aacdc..95de9e3896 100644 --- a/wp-admin/includes/theme.php +++ b/wp-admin/includes/theme.php @@ -208,4 +208,35 @@ function _get_template_edit_filename($fullpath, $containingfolder) { return str_replace(dirname(dirname( $containingfolder )) , '', $fullpath); } +/** + * Check the current theme for reliance on deprecated theme compatibility + * + * Check to see if the current theme has all the required templates available + * from itself or its parent + * + * @return nothing + */ +function _check_theme_deprecated_files() { + $files = array( ); + + if ( ! locate_template( array( 'header.php' ) ) ) + $files[] = 'header.php'; + if ( ! locate_template( array( 'footer.php' ) ) ) + $files[] = 'footer.php'; + if ( ! locate_template( array( 'sidebar.php' ) ) ) + $files[] = 'sidebar.php'; + + // Only notify if both are missing as you can use one or the other + if ( ! ( $comment = locate_template( array( 'comments.php' ) ) ) && ! ( $comment_popup = locate_template( array( 'comments-popup.php' ) ) ) ) { + $files[] = 'comments.php'; + $files[] = 'comments-popup.php'; + } + + if ( ! empty( $files ) ) : ?> +

+ +

+ diff --git a/wp-admin/themes.php b/wp-admin/themes.php index 5a9f9e09c4..d351cbfc9c 100644 --- a/wp-admin/themes.php +++ b/wp-admin/themes.php @@ -59,8 +59,8 @@ if ( is_multisite() && current_user_can('edit_themes') ) { elseif ( isset($_GET['deleted']) ) : ?>

- name]);