mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 12:20:22 +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:
@@ -95,7 +95,7 @@ if ( $tab == 'type' || $tab == 'type_url' || ! array_key_exists( $tab , media_up
|
||||
*
|
||||
* @since 2.5.0
|
||||
*/
|
||||
do_action( "media_upload_$type" );
|
||||
do_action( "media_upload_{$type}" );
|
||||
} else {
|
||||
/**
|
||||
* Fires inside limited and specific upload-tab views in the legacy
|
||||
@@ -107,6 +107,6 @@ if ( $tab == 'type' || $tab == 'type_url' || ! array_key_exists( $tab , media_up
|
||||
*
|
||||
* @since 2.5.0
|
||||
*/
|
||||
do_action( "media_upload_$tab" );
|
||||
do_action( "media_upload_{$tab}" );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user