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/plugin.php

    r38167 r38307  
    589589             *                           or just the current site. Multisite only. Default is false.
    590590             */
    591             do_action( 'activate_' . $plugin, $network_wide );
     591            do_action( "activate_{$plugin}", $network_wide );
    592592        }
    593593
     
    702702             *                                   or just the current site. Multisite only. Default is false.
    703703             */
    704             do_action( 'deactivate_' . $plugin, $network_deactivating );
     704            do_action( "deactivate_{$plugin}", $network_deactivating );
    705705
    706706            /**
Note: See TracChangeset for help on using the changeset viewer.