Make WordPress Core


Ignore:
Timestamp:
08/22/2016 06:24:48 PM (9 years ago)
Author:
DrewAPicture
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/theme.php

    r37985 r38307  
    903903     * @param string $old_value The current value of the theme mod.
    904904     */
    905     $mods[ $name ] = apply_filters( "pre_set_theme_mod_$name", $value, $old_value );
     905    $mods[ $name ] = apply_filters( "pre_set_theme_mod_{$name}", $value, $old_value );
    906906
    907907    $theme = get_option( 'stylesheet' );
Note: See TracChangeset for help on using the changeset viewer.