Make WordPress Core

Changeset 46694


Ignore:
Timestamp:
11/10/2019 11:03:34 PM (6 years ago)
Author:
SergeyBiryukov
Message:

Docs: Improve documentation for deactivate_plugins() and activate_plugins().

Props marekdedic, spenserhale, SergeyBiryukov.
Fixes #48352.

File:
1 edited

Legend:

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

    r46662 r46694  
    727727 * @since 2.5.0
    728728 *
    729  * @param string|array $plugins Single plugin or list of plugins to deactivate.
    730  * @param bool $silent Prevent calling deactivation hooks. Default is false.
    731  * @param mixed $network_wide Whether to deactivate the plugin for all sites in the network.
    732  *  A value of null (the default) will deactivate plugins for both the site and the network.
     729 * @param string|string[] $plugins      Single plugin or list of plugins to deactivate.
     730 * @param bool            $silent       Prevent calling deactivation hooks. Default false.
     731 * @param bool|null       $network_wide Whether to deactivate the plugin for all sites in the network.
     732 *                                      A value of null will deactivate plugins for both the network
     733 *                                      and the current site. Multisite only. Default null.
    733734 */
    734735function deactivate_plugins( $plugins, $silent = false, $network_wide = null ) {
     
    759760             * @param string $plugin               Path to the plugin file relative to the plugins directory.
    760761             * @param bool   $network_deactivating Whether the plugin is deactivated for all sites in the network
    761              *                                     or just the current site. Multisite only. Default is false.
     762             *                                     or just the current site. Multisite only. Default false.
    762763             */
    763764            do_action( 'deactivate_plugin', $plugin, $network_deactivating );
     
    798799             *
    799800             * @param bool $network_deactivating Whether the plugin is deactivated for all sites in the network
    800              *                                   or just the current site. Multisite only. Default is false.
     801             *                                   or just the current site. Multisite only. Default false.
    801802             */
    802803            do_action( "deactivate_{$plugin}", $network_deactivating );
     
    811812             *
    812813             * @param string $plugin               Path to the plugin file relative to the plugins directory.
    813              * @param bool   $network_deactivating Whether the plugin is deactivated for all sites in the network.
     814             * @param bool   $network_deactivating Whether the plugin is deactivated for all sites in the network
    814815             *                                     or just the current site. Multisite only. Default false.
    815816             */
     
    830831 *
    831832 * When WP_Error is returned, it does not mean that one of the plugins had
    832  * errors. It means that one or more of the plugins file path was invalid.
     833 * errors. It means that one or more of the plugin file paths were invalid.
    833834 *
    834835 * The execution will be halted as soon as one of the plugins has an error.
     
    836837 * @since 2.6.0
    837838 *
    838  * @param string|array $plugins Single plugin or list of plugins to activate.
    839  * @param string $redirect Redirect to page after successful activation.
    840  * @param bool $network_wide Whether to enable the plugin for all sites in the network.
    841  * @param bool $silent Prevent calling activation hooks. Default is false.
     839 * @param string|string[] $plugins      Single plugin or list of plugins to activate.
     840 * @param string          $redirect     Redirect to page after successful activation.
     841 * @param bool            $network_wide Whether to enable the plugin for all sites in the network.
     842 *                                      Default false.
     843 * @param bool $silent                  Prevent calling activation hooks. Default false.
    842844 * @return bool|WP_Error True when finished or WP_Error if there were errors during a plugin activation.
    843845 */
Note: See TracChangeset for help on using the changeset viewer.