mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-03 06:57:35 +01:00
Themes: Avoid PHP warnings in the admin when no theme directory exists.
Props iseulde, chris_dev, swissspidy. Fixes #35521. Built from https://develop.svn.wordpress.org/trunk@40636 git-svn-id: http://core.svn.wordpress.org/trunk@40497 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
0b1e3a05f7
commit
9af735e863
@ -28,6 +28,11 @@ if ( ! is_network_admin() ) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$installed_themes = search_theme_directories();
|
$installed_themes = search_theme_directories();
|
||||||
|
|
||||||
|
if ( false === $installed_themes ) {
|
||||||
|
$installed_themes = array();
|
||||||
|
}
|
||||||
|
|
||||||
foreach ( $installed_themes as $k => $v ) {
|
foreach ( $installed_themes as $k => $v ) {
|
||||||
if ( false !== strpos( $k, '/' ) ) {
|
if ( false !== strpos( $k, '/' ) ) {
|
||||||
unset( $installed_themes[ $k ] );
|
unset( $installed_themes[ $k ] );
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '4.8-alpha-40635';
|
$wp_version = '4.8-alpha-40636';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
Loading…
Reference in New Issue
Block a user