General: Use interpolation instead of concatenation for all dynamic hook names.

This fixes the rendering of the hook names on developer.wordpress.org.

Props keesiemeijer
Fixes #39148

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


git-svn-id: http://core.svn.wordpress.org/trunk@39540 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
John Blackbourn
2016-12-14 04:18:42 +00:00
parent efa99585e3
commit 4548b08236
13 changed files with 32 additions and 22 deletions

View File

@@ -480,17 +480,19 @@ class WP_Customize_Setting {
return false;
}
$id_base = $this->id_data['base'];
/**
* Fires when the WP_Customize_Setting::save() method is called.
*
* The dynamic portion of the hook name, `$this->id_data['base']` refers to
* The dynamic portion of the hook name, `$id_base` refers to
* the base slug of the setting name.
*
* @since 3.4.0
*
* @param WP_Customize_Setting $this WP_Customize_Setting instance.
*/
do_action( 'customize_save_' . $this->id_data['base'], $this );
do_action( "customize_save_{$id_base}", $this );
$this->update( $value );
}