Changeset 47835 for trunk/src/wp-admin/includes/theme.php
- Timestamp:
- 05/20/2020 06:47:24 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/theme.php
r47819 r47835 661 661 $parents = array(); 662 662 663 $auto_updates = (array) get_site_option( 'auto_update_themes', array() ); 664 663 665 foreach ( $themes as $theme ) { 664 666 $slug = $theme->get_stylesheet(); … … 683 685 ); 684 686 } 687 688 $auto_update = in_array( $slug, $auto_updates, true ); 689 $auto_update_action = $auto_update ? 'disable-auto-update' : 'enable-auto-update'; 685 690 686 691 $prepared_themes[ $slug ] = array( … … 700 705 'hasPackage' => isset( $updates[ $slug ] ) && ! empty( $updates[ $slug ]['package'] ), 701 706 'update' => get_theme_update_available( $theme ), 707 'autoupdate' => $auto_update, 702 708 'actions' => array( 703 'activate' => current_user_can( 'switch_themes' ) ? wp_nonce_url( admin_url( 'themes.php?action=activate&stylesheet=' . $encoded_slug ), 'switch-theme_' . $slug ) : null, 704 'customize' => $customize_action, 705 'delete' => current_user_can( 'delete_themes' ) ? wp_nonce_url( admin_url( 'themes.php?action=delete&stylesheet=' . $encoded_slug ), 'delete-theme_' . $slug ) : null, 709 'activate' => current_user_can( 'switch_themes' ) ? wp_nonce_url( admin_url( 'themes.php?action=activate&stylesheet=' . $encoded_slug ), 'switch-theme_' . $slug ) : null, 710 'customize' => $customize_action, 711 'delete' => current_user_can( 'delete_themes' ) ? wp_nonce_url( admin_url( 'themes.php?action=delete&stylesheet=' . $encoded_slug ), 'delete-theme_' . $slug ) : null, 712 'autoupdate' => wp_is_auto_update_enabled_for_type( 'theme' ) && ! is_multisite() && current_user_can( 'update_themes' ) 713 ? wp_nonce_url( admin_url( 'themes.php?action=' . $auto_update_action . '&stylesheet=' . $encoded_slug ), 'updates' ) 714 : null, 706 715 ), 707 716 );
Note: See TracChangeset
for help on using the changeset viewer.