Make WordPress Core

Ticket #46812: 46812.diff

File 46812.diff, 1.1 KB (added by flixos90, 5 years ago)
  • src/wp-admin/includes/plugin.php

    diff --git a/src/wp-admin/includes/plugin.php b/src/wp-admin/includes/plugin.php
    index 54c6db27ac..6ed9a0903d 100644
    a b function deactivate_plugins( $plugins, $silent = false, $network_wide = null ) { 
    766766                        }
    767767                }
    768768
     769                if ( $do_blog && wp_is_recovery_mode() ) {
     770                        list( $extension ) = explode( '/', $plugin );
     771                        wp_paused_plugins()->delete( $extension );
     772                }
     773
    769774                if ( ! $silent ) {
    770775                        /**
    771776                         * Fires as a specific plugin is being deactivated.
  • src/wp-includes/theme.php

    diff --git a/src/wp-includes/theme.php b/src/wp-includes/theme.php
    index e688cc66fa..eb960f8004 100644
    a b function switch_theme( $stylesheet ) { 
    744744        $new_theme = wp_get_theme( $stylesheet );
    745745        $template  = $new_theme->get_template();
    746746
     747        if ( wp_is_recovery_mode() ) {
     748                $paused_themes = wp_paused_themes();
     749                $paused_themes->delete( $old_theme->get_stylesheet() );
     750                $paused_themes->delete( $old_theme->get_template() );
     751        }
     752
    747753        update_option( 'template', $template );
    748754        update_option( 'stylesheet', $stylesheet );
    749755