Coding Standards: Dynamic hooks should be named using interpolation not concatenation.

Props arena, desrosj.
Fixes #47052.
Built from https://develop.svn.wordpress.org/trunk@45881


git-svn-id: http://core.svn.wordpress.org/trunk@45692 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
desrosj 2019-08-22 19:08:55 +00:00
parent d309715a95
commit e7c8b21e71
7 changed files with 19 additions and 19 deletions

View File

@ -67,12 +67,12 @@ class Custom_Background {
return;
}
add_action( "load-$page", array( $this, 'admin_load' ) );
add_action( "load-$page", array( $this, 'take_action' ), 49 );
add_action( "load-$page", array( $this, 'handle_upload' ), 49 );
add_action( "load-{$page}", array( $this, 'admin_load' ) );
add_action( "load-{$page}", array( $this, 'take_action' ), 49 );
add_action( "load-{$page}", array( $this, 'handle_upload' ), 49 );
if ( $this->admin_header_callback ) {
add_action( "admin_head-$page", $this->admin_header_callback, 51 );
add_action( "admin_head-{$page}", $this->admin_header_callback, 51 );
}
}

View File

@ -75,13 +75,13 @@ class Custom_Image_Header {
return;
}
add_action( "admin_print_scripts-$page", array( $this, 'js_includes' ) );
add_action( "admin_print_styles-$page", array( $this, 'css_includes' ) );
add_action( "admin_head-$page", array( $this, 'help' ) );
add_action( "admin_head-$page", array( $this, 'take_action' ), 50 );
add_action( "admin_head-$page", array( $this, 'js' ), 50 );
add_action( "admin_print_scripts-{$page}", array( $this, 'js_includes' ) );
add_action( "admin_print_styles-{$page}", array( $this, 'css_includes' ) );
add_action( "admin_head-{$page}", array( $this, 'help' ) );
add_action( "admin_head-{$page}", array( $this, 'take_action' ), 50 );
add_action( "admin_head-{$page}", array( $this, 'js' ), 50 );
if ( $this->admin_header_callback ) {
add_action( "admin_head-$page", $this->admin_header_callback, 51 );
add_action( "admin_head-{$page}", $this->admin_header_callback, 51 );
}
}

View File

@ -204,7 +204,7 @@ class WP_Themes_List_Table extends WP_List_Table {
$actions = apply_filters( 'theme_action_links', $actions, $theme, 'all' );
/** This filter is documented in wp-admin/includes/class-wp-ms-themes-list-table.php */
$actions = apply_filters( "theme_action_links_$stylesheet", $actions, $theme, 'all' );
$actions = apply_filters( "theme_action_links_{$stylesheet}", $actions, $theme, 'all' );
$delete_action = isset( $actions['delete'] ) ? '<div class="delete-theme">' . $actions['delete'] . '</div>' : '';
unset( $actions['delete'] );

View File

@ -1958,19 +1958,19 @@ var ajaxurl = '<?php echo admin_url( 'admin-ajax.php', 'relative' ); ?>',
do_action( 'admin_enqueue_scripts', $hook_suffix );
/** This action is documented in wp-admin/admin-header.php */
do_action( "admin_print_styles-$hook_suffix" ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
do_action( "admin_print_styles-{$hook_suffix}" ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
/** This action is documented in wp-admin/admin-header.php */
do_action( 'admin_print_styles' );
/** This action is documented in wp-admin/admin-header.php */
do_action( "admin_print_scripts-$hook_suffix" ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
do_action( "admin_print_scripts-{$hook_suffix}" ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
/** This action is documented in wp-admin/admin-header.php */
do_action( 'admin_print_scripts' );
/** This action is documented in wp-admin/admin-header.php */
do_action( "admin_head-$hook_suffix" ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
do_action( "admin_head-{$hook_suffix}" ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
/** This action is documented in wp-admin/admin-header.php */
do_action( 'admin_head' );
@ -2027,7 +2027,7 @@ function iframe_footer() {
do_action( 'admin_footer', $hook_suffix );
/** This action is documented in wp-admin/admin-footer.php */
do_action( "admin_print_footer_scripts-$hook_suffix" ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
do_action( "admin_print_footer_scripts-{$hook_suffix}" ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
/** This action is documented in wp-admin/admin-footer.php */
do_action( 'admin_print_footer_scripts' );

View File

@ -357,7 +357,7 @@ function wp_plugin_update_rows() {
if ( isset( $plugins->response ) && is_array( $plugins->response ) ) {
$plugins = array_keys( $plugins->response );
foreach ( $plugins as $plugin_file ) {
add_action( "after_plugin_row_$plugin_file", 'wp_plugin_update_row', 10, 2 );
add_action( "after_plugin_row_{$plugin_file}", 'wp_plugin_update_row', 10, 2 );
}
}
}
@ -545,7 +545,7 @@ function wp_theme_update_rows() {
$themes = array_keys( $themes->response );
foreach ( $themes as $theme ) {
add_action( "after_theme_row_$theme", 'wp_theme_update_row', 10, 2 );
add_action( "after_theme_row_{$theme}", 'wp_theme_update_row', 10, 2 );
}
}
}

View File

@ -103,7 +103,7 @@ function twentyeleven_theme_options_add_page() {
return;
}
add_action( "load-$theme_page", 'twentyeleven_theme_options_help' );
add_action( "load-{$theme_page}", 'twentyeleven_theme_options_help' );
}
add_action( 'admin_menu', 'twentyeleven_theme_options_add_page' );

View File

@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.3-alpha-45877';
$wp_version = '5.3-alpha-45881';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.