WordPress.org

Make WordPress Core


Ignore:
Timestamp:
11/29/2019 10:12:10 PM (20 months ago)
Author:
SergeyBiryukov
Message:

Plugins: In _wp_filter_build_unique_id(), remove $wp_filter global and $filter_id_count static variable, unused since [46220].

See #47407, #48074.

File:
1 edited

Legend:

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

    r46801 r46805  
    903903 * @access private
    904904 *
    905  * @global array $wp_filter Stores all of the filters and actions.
    906  * @staticvar int $filter_id_count
    907  *
    908905 * @param string   $tag      Unused. The name of the filter to build ID for.
    909906 * @param callable $function The function to generate ID for.
    910  * @param int      $priority Unused. The order in which the functions associated
    911  *                           with a particular action are executed.
    912  * @return string Unique ID for usage as array key.
     907 * @param int      $priority Unused. The order in which the functions
     908 *                           associated with a particular action are executed.
     909 * @return string Unique function ID for usage as array key.
    913910 */
    914911function _wp_filter_build_unique_id( $tag, $function, $priority ) {
    915     global $wp_filter;
    916     static $filter_id_count = 0;
    917 
    918912    if ( is_string( $function ) ) {
    919913        return $function;
Note: See TracChangeset for help on using the changeset viewer.