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-ms-themes-list-table.php

    r38071 r38307  
    519519         * @param string   $context Status of the theme.
    520520         */
    521         $actions = apply_filters( "theme_action_links_$stylesheet", $actions, $theme, $context );
     521        $actions = apply_filters( "theme_action_links_{$stylesheet}", $actions, $theme, $context );
    522522
    523523        echo $this->row_actions( $actions, true );
     
    727727         * @param string   $status     Status of the theme.
    728728         */
    729         do_action( "after_theme_row_$stylesheet", $stylesheet, $theme, $status );
     729        do_action( "after_theme_row_{$stylesheet}", $stylesheet, $theme, $status );
    730730    }
    731731}
Note: See TracChangeset for help on using the changeset viewer.