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:
Drew Jaynes
2016-08-22 18:24:48 +00:00
parent f9491ed8f6
commit b4fca4a558
21 changed files with 63 additions and 63 deletions

View File

@@ -209,7 +209,7 @@ if ( isset($plugin_page) ) {
*
* @since 2.1.0
*/
do_action( 'load-' . $page_hook );
do_action( "load-{$page_hook}" );
if (! isset($_GET['noheader']))
require_once(ABSPATH . 'wp-admin/admin-header.php');
@@ -239,7 +239,7 @@ if ( isset($plugin_page) ) {
*
* @since 1.5.0
*/
do_action( 'load-' . $plugin_page );
do_action( "load-{$plugin_page}" );
if ( !isset($_GET['noheader']))
require_once(ABSPATH . 'wp-admin/admin-header.php');
@@ -278,7 +278,7 @@ if ( isset($plugin_page) ) {
*
* @since 3.5.0
*/
do_action( 'load-importer-' . $importer );
do_action( "load-importer-{$importer}" );
$parent_file = 'tools.php';
$submenu_file = 'import.php';
@@ -326,7 +326,7 @@ if ( isset($plugin_page) ) {
*
* @since 2.1.0
*/
do_action( 'load-' . $pagenow );
do_action( "load-{$pagenow}" );
/*
* The following hooks are fired to ensure backward compatibility.