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.

Built from https://develop.svn.wordpress.org/trunk@38307


git-svn-id: http://core.svn.wordpress.org/trunk@38248 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Drew Jaynes
2016-08-22 18:25:31 +00:00
parent 02939c03e5
commit 22adda2aa0
22 changed files with 64 additions and 64 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.