Docs: Improve documentation for `deactivate_plugins()` and `activate_plugins()`.
Props marekdedic, spenserhale, SergeyBiryukov. Fixes #48352. Built from https://develop.svn.wordpress.org/trunk@46694 git-svn-id: http://core.svn.wordpress.org/trunk@46494 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
7b6d73a9ff
commit
2af39e45cb
|
@ -726,10 +726,11 @@ function activate_plugin( $plugin, $redirect = '', $network_wide = false, $silen
|
|||
*
|
||||
* @since 2.5.0
|
||||
*
|
||||
* @param string|array $plugins Single plugin or list of plugins to deactivate.
|
||||
* @param bool $silent Prevent calling deactivation hooks. Default is false.
|
||||
* @param mixed $network_wide Whether to deactivate the plugin for all sites in the network.
|
||||
* A value of null (the default) will deactivate plugins for both the site and the network.
|
||||
* @param string|string[] $plugins Single plugin or list of plugins to deactivate.
|
||||
* @param bool $silent Prevent calling deactivation hooks. Default false.
|
||||
* @param bool|null $network_wide Whether to deactivate the plugin for all sites in the network.
|
||||
* A value of null will deactivate plugins for both the network
|
||||
* and the current site. Multisite only. Default null.
|
||||
*/
|
||||
function deactivate_plugins( $plugins, $silent = false, $network_wide = null ) {
|
||||
if ( is_multisite() ) {
|
||||
|
@ -758,7 +759,7 @@ function deactivate_plugins( $plugins, $silent = false, $network_wide = null ) {
|
|||
*
|
||||
* @param string $plugin Path to the plugin file relative to the plugins directory.
|
||||
* @param bool $network_deactivating Whether the plugin is deactivated for all sites in the network
|
||||
* or just the current site. Multisite only. Default is false.
|
||||
* or just the current site. Multisite only. Default false.
|
||||
*/
|
||||
do_action( 'deactivate_plugin', $plugin, $network_deactivating );
|
||||
}
|
||||
|
@ -797,7 +798,7 @@ function deactivate_plugins( $plugins, $silent = false, $network_wide = null ) {
|
|||
* @since 2.0.0
|
||||
*
|
||||
* @param bool $network_deactivating Whether the plugin is deactivated for all sites in the network
|
||||
* or just the current site. Multisite only. Default is false.
|
||||
* or just the current site. Multisite only. Default false.
|
||||
*/
|
||||
do_action( "deactivate_{$plugin}", $network_deactivating );
|
||||
|
||||
|
@ -810,7 +811,7 @@ function deactivate_plugins( $plugins, $silent = false, $network_wide = null ) {
|
|||
* @since 2.9.0
|
||||
*
|
||||
* @param string $plugin Path to the plugin file relative to the plugins directory.
|
||||
* @param bool $network_deactivating Whether the plugin is deactivated for all sites in the network.
|
||||
* @param bool $network_deactivating Whether the plugin is deactivated for all sites in the network
|
||||
* or just the current site. Multisite only. Default false.
|
||||
*/
|
||||
do_action( 'deactivated_plugin', $plugin, $network_deactivating );
|
||||
|
@ -829,16 +830,17 @@ function deactivate_plugins( $plugins, $silent = false, $network_wide = null ) {
|
|||
* Activate multiple plugins.
|
||||
*
|
||||
* When WP_Error is returned, it does not mean that one of the plugins had
|
||||
* errors. It means that one or more of the plugins file path was invalid.
|
||||
* errors. It means that one or more of the plugin file paths were invalid.
|
||||
*
|
||||
* The execution will be halted as soon as one of the plugins has an error.
|
||||
*
|
||||
* @since 2.6.0
|
||||
*
|
||||
* @param string|array $plugins Single plugin or list of plugins to activate.
|
||||
* @param string $redirect Redirect to page after successful activation.
|
||||
* @param bool $network_wide Whether to enable the plugin for all sites in the network.
|
||||
* @param bool $silent Prevent calling activation hooks. Default is false.
|
||||
* @param string|string[] $plugins Single plugin or list of plugins to activate.
|
||||
* @param string $redirect Redirect to page after successful activation.
|
||||
* @param bool $network_wide Whether to enable the plugin for all sites in the network.
|
||||
* Default false.
|
||||
* @param bool $silent Prevent calling activation hooks. Default false.
|
||||
* @return bool|WP_Error True when finished or WP_Error if there were errors during a plugin activation.
|
||||
*/
|
||||
function activate_plugins( $plugins, $redirect = '', $network_wide = false, $silent = false ) {
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '5.4-alpha-46693';
|
||||
$wp_version = '5.4-alpha-46694';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue