WordPress.org

Make WordPress Core

Changeset 45115


Ignore:
Timestamp:
04/05/2019 03:32:31 PM (8 months ago)
Author:
flixos90
Message:

Bootstrap/Load: Remove extension from the list of paused extensions when it is deactivated.

With this change, fatal errors recorded before a plugin was deactivated or a theme was switched away from do not persist. This ensures that re-enabling it re-checks for fatal errors correctly.

Props aandrewdixon, dhanukanuwan, henrywright.
Fixes #46812.

Location:
trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/plugin.php

    r45114 r45115  
    767767                unset( $current[ $key ] );
    768768            }
     769        }
     770
     771        if ( $do_blog && wp_is_recovery_mode() ) {
     772            list( $extension ) = explode( '/', $plugin );
     773            wp_paused_plugins()->delete( $extension );
    769774        }
    770775
  • trunk/src/wp-includes/theme.php

    r45089 r45115  
    744744    $new_theme = wp_get_theme( $stylesheet );
    745745    $template  = $new_theme->get_template();
     746
     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    }
    746752
    747753    update_option( 'template', $template );
Note: See TracChangeset for help on using the changeset viewer.