Changeset 52819 for trunk/src/wp-admin/includes/ajax-actions.php
- Timestamp:
- 03/04/2022 02:37:58 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/ajax-actions.php
r52170 r52819 3569 3569 $update_php = network_admin_url( 'update.php?action=install-theme' ); 3570 3570 3571 $installed_themes = search_theme_directories(); 3572 3573 if ( false === $installed_themes ) { 3574 $installed_themes = array(); 3575 } 3576 3577 foreach ( $installed_themes as $theme_slug => $theme_data ) { 3578 // Ignore child themes. 3579 if ( str_contains( $theme_slug, '/' ) ) { 3580 unset( $installed_themes[ $theme_slug ] ); 3581 } 3582 } 3583 3571 3584 foreach ( $api->themes as &$theme ) { 3572 3585 $theme->install_url = add_query_arg( … … 3600 3613 } 3601 3614 3615 $is_theme_installed = array_key_exists( $theme->slug, $installed_themes ); 3616 3617 // We only care about installed themes. 3618 $theme->block_theme = $is_theme_installed && wp_get_theme( $theme->slug )->is_block_theme(); 3619 3602 3620 if ( ! is_multisite() && current_user_can( 'edit_theme_options' ) && current_user_can( 'customize' ) ) { 3621 $customize_url = $theme->block_theme ? admin_url( 'site-editor.php' ) : wp_customize_url( $theme->slug ); 3622 3603 3623 $theme->customize_url = add_query_arg( 3604 3624 array( 3605 3625 'return' => urlencode( network_admin_url( 'theme-install.php', 'relative' ) ), 3606 3626 ), 3607 wp_customize_url( $theme->slug )3627 $customize_url 3608 3628 ); 3609 3629 } … … 4139 4159 } 4140 4160 } 4161 4162 $theme = wp_get_theme( $slug ); 4163 $status['blockTheme'] = $theme->is_block_theme(); 4141 4164 4142 4165 if ( ! is_multisite() && current_user_can( 'edit_theme_options' ) && current_user_can( 'customize' ) ) {
Note: See TracChangeset
for help on using the changeset viewer.