mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-01 11:14:36 +00:00
Hooks: Standardize naming of dynamic hooks to use interpolation vs concatenation.
Benefits gained in discoverability and self-documentation throughout core trump the negligible performance hit in using interpolation in hook names. Props ramiy. See #37748. git-svn-id: https://develop.svn.wordpress.org/trunk@38307 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -588,7 +588,7 @@ function activate_plugin( $plugin, $redirect = '', $network_wide = false, $silen
|
||||
* @param bool $network_wide Whether to enable the plugin for all sites in the network
|
||||
* or just the current site. Multisite only. Default is false.
|
||||
*/
|
||||
do_action( 'activate_' . $plugin, $network_wide );
|
||||
do_action( "activate_{$plugin}", $network_wide );
|
||||
}
|
||||
|
||||
if ( $network_wide ) {
|
||||
@@ -701,7 +701,7 @@ function deactivate_plugins( $plugins, $silent = false, $network_wide = null ) {
|
||||
* @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.
|
||||
*/
|
||||
do_action( 'deactivate_' . $plugin, $network_deactivating );
|
||||
do_action( "deactivate_{$plugin}", $network_deactivating );
|
||||
|
||||
/**
|
||||
* Fires after a plugin is deactivated.
|
||||
|
||||
Reference in New Issue
Block a user