mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 20:30:23 +00:00
Avoid notice when themes dir is empty or missing. Don't reset current theme in current_theme_info() if there are no themes. Show warning in Right Now if there are no themes. Props azaozz. fixes #19089
git-svn-id: https://develop.svn.wordpress.org/trunk@19251 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -518,12 +518,13 @@ function get_current_theme() {
|
||||
return $theme;
|
||||
|
||||
$themes = get_themes();
|
||||
$theme_names = array_keys($themes);
|
||||
$current_template = get_option('template');
|
||||
$current_stylesheet = get_option('stylesheet');
|
||||
$current_theme = 'Twenty Ten';
|
||||
$current_theme = 'Twenty Eleven';
|
||||
|
||||
if ( $themes ) {
|
||||
$theme_names = array_keys( $themes );
|
||||
$current_template = get_option( 'template' );
|
||||
$current_stylesheet = get_option( 'stylesheet' );
|
||||
|
||||
foreach ( (array) $theme_names as $theme_name ) {
|
||||
if ( $themes[$theme_name]['Stylesheet'] == $current_stylesheet &&
|
||||
$themes[$theme_name]['Template'] == $current_template ) {
|
||||
|
||||
Reference in New Issue
Block a user