Make WordPress Core

Ticket #27188: 27188.r1.patch

File 27188.r1.patch, 2.3 KB (added by wpsmith, 9 years ago)

Refreshed

  • wp-admin/includes/plugin.php

     
    650650                         *                                     or just the current site. Multisite only. Default is false.
    651651                         */
    652652                        do_action( 'deactivate_plugin', $plugin, $network_deactivating );
     653
     654                        /**
     655                         * Fires as a specific plugin is being deactivated.
     656                         *
     657                         * This hook is the "deactivation" hook used internally by
     658                         * register_deactivation_hook(). The dynamic portion of the
     659                         * hook name, $plugin, refers to the plugin basename.
     660                         *
     661                         * If a plugin is silently deactivated (such as during an update),
     662                         * this hook does not fire.
     663                         *
     664                         * @since 2.0.0
     665                         *
     666                         * @param bool $network_deactivating Whether the plugin is deactivated for all sites in the network
     667                         *                                   or just the current site. Multisite only. Default is false.
     668                         */
     669                        do_action( 'deactivate_' . $plugin, $network_deactivating );
    653670                }
    654671
    655672                if ( false !== $network_wide ) {
     
    669686                        }
    670687                }
    671688
    672                 if ( ! $silent ) {
    673                         /**
    674                          * Fires as a specific plugin is being deactivated.
    675                          *
    676                          * This hook is the "deactivation" hook used internally by
    677                          * register_deactivation_hook(). The dynamic portion of the
    678                          * hook name, $plugin, refers to the plugin basename.
    679                          *
    680                          * If a plugin is silently deactivated (such as during an update),
    681                          * this hook does not fire.
    682                          *
    683                          * @since 2.0.0
    684                          *
    685                          * @param bool $network_deactivating Whether the plugin is deactivated for all sites in the network
    686                          *                                   or just the current site. Multisite only. Default is false.
    687                          */
    688                         do_action( 'deactivate_' . $plugin, $network_deactivating );
     689        }
    689690
     691        if ( $do_blog ) {
     692                update_option('active_plugins', $current);
     693        }
     694        if ( $do_network ) {
     695                update_site_option( 'active_sitewide_plugins', $network_current );
     696        }
     697
     698        if ( ! $silent ) {
     699
    690700                        /**
    691701                         * Fires after a plugin is deactivated.
    692702                         *
     
    701711                         */
    702712                        do_action( 'deactivated_plugin', $plugin, $network_deactivating );
    703713                }
    704         }
    705 
    706         if ( $do_blog )
    707                 update_option('active_plugins', $current);
    708         if ( $do_network )
    709                 update_site_option( 'active_sitewide_plugins', $network_current );
    710714}
    711715
    712716/**