WordPress.org

Make WordPress Core


Ignore:
Timestamp:
08/22/2016 06:24:48 PM (5 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-admin/includes/class-wp-automatic-updater.php

    r38242 r38307  
    177177         * @param object $item   The update offer.
    178178         */
    179         $update = apply_filters( 'auto_update_' . $type, $update, $item );
     179        $update = apply_filters( "auto_update_{$type}", $update, $item );
    180180
    181181        if ( ! $update ) {
Note: See TracChangeset for help on using the changeset viewer.