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-admin/admin-header.php

    r37560 r38307  
    9797 * @since 2.6.0
    9898 */
    99 do_action( "admin_print_styles-$hook_suffix" );
     99do_action( "admin_print_styles-{$hook_suffix}" );
    100100
    101101/**
     
    111111 * @since 2.1.0
    112112 */
    113 do_action( "admin_print_scripts-$hook_suffix" );
     113do_action( "admin_print_scripts-{$hook_suffix}" );
    114114
    115115/**
     
    128128 * @since 2.1.0
    129129 */
    130 do_action( "admin_head-$hook_suffix" );
     130do_action( "admin_head-{$hook_suffix}" );
    131131
    132132/**
Note: See TracChangeset for help on using the changeset viewer.