mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-05 21:24:35 +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:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user