mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 14:20:15 +00:00
For clarity, initialize some arrays that previously were only assigned via short circuit in loops.
See #30799. git-svn-id: https://develop.svn.wordpress.org/trunk@30982 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -430,6 +430,9 @@ function wp_prepare_themes_for_js( $themes = null ) {
|
||||
}
|
||||
|
||||
WP_Theme::sort_by_name( $themes );
|
||||
|
||||
$parents = array();
|
||||
|
||||
foreach ( $themes as $theme ) {
|
||||
$slug = $theme->get_stylesheet();
|
||||
$encoded_slug = urlencode( $slug );
|
||||
@@ -469,7 +472,7 @@ function wp_prepare_themes_for_js( $themes = null ) {
|
||||
}
|
||||
|
||||
// Remove 'delete' action if theme has an active child
|
||||
if ( isset( $parents ) && array_key_exists( $current_theme, $parents ) ) {
|
||||
if ( ! empty( $parents ) && array_key_exists( $current_theme, $parents ) ) {
|
||||
unset( $prepared_themes[ $parents[ $current_theme ] ]['actions']['delete'] );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user