WordPress.org

Make WordPress Core


Ignore:
Timestamp:
12/14/2016 04:17:38 AM (4 years ago)
Author:
johnbillion
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-customize-setting.php

    r39318 r39600  
    481481        }
    482482
     483        $id_base = $this->id_data['base'];
     484
    483485        /**
    484486         * Fires when the WP_Customize_Setting::save() method is called.
    485487         *
    486          * The dynamic portion of the hook name, `$this->id_data['base']` refers to
     488         * The dynamic portion of the hook name, `$id_base` refers to
    487489         * the base slug of the setting name.
    488490         *
     
    491493         * @param WP_Customize_Setting $this WP_Customize_Setting instance.
    492494         */
    493         do_action( 'customize_save_' . $this->id_data['base'], $this );
     495        do_action( "customize_save_{$id_base}", $this );
    494496
    495497        $this->update( $value );
Note: See TracChangeset for help on using the changeset viewer.