Changeset 46801 for trunk/src/wp-includes/plugin.php
- Timestamp:
- 11/29/2019 09:40:58 PM (6 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/plugin.php (modified) (12 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/plugin.php
r46792 r46801 94 94 * @since 0.71 95 95 * 96 * @global array $wp_filter A multidimensional array of all hooks and the callbacks hooked to them.96 * @global array $wp_filter A multidimensional array of all hooks and the callbacks hooked to them. 97 97 * 98 98 * @param string $tag The name of the filter to hook the $function_to_add callback to. 99 99 * @param callable $function_to_add The callback to be run when the filter is applied. 100 100 * @param int $priority Optional. Used to specify the order in which the functions 101 * associated with a particular action are executed. Default 10.101 * associated with a particular action are executed. 102 102 * Lower numbers correspond with earlier execution, 103 103 * and functions with the same priority are executed 104 * in the order in which they were added to the action. 104 * in the order in which they were added to the action. Default 10. 105 105 * @param int $accepted_args Optional. The number of arguments the function accepts. Default 1. 106 106 * @return true … … 120 120 * @since 2.5.0 121 121 * 122 * @global array $wp_filter Stores all of the filters .122 * @global array $wp_filter Stores all of the filters and actions. 123 123 * 124 124 * @param string $tag The name of the filter hook. … … 171 171 * @since 0.71 172 172 * 173 * @global array $wp_filter Stores all of the filters .173 * @global array $wp_filter Stores all of the filters and actions. 174 174 * @global array $wp_current_filter Stores the list of current filters with the current one last. 175 175 * … … 219 219 * functions hooked to `$tag` are supplied using an array. 220 220 * 221 * @global array $wp_filter Stores all of the filters 222 * @global array $wp_current_filter Stores the list of current filters with the current one last 221 * @global array $wp_filter Stores all of the filters and actions. 222 * @global array $wp_current_filter Stores the list of current filters with the current one last. 223 223 * 224 224 * @param string $tag The name of the filter hook. … … 267 267 * @since 1.2.0 268 268 * 269 * @global array $wp_filter Stores all of the filters269 * @global array $wp_filter Stores all of the filters and actions. 270 270 * 271 271 * @param string $tag The filter hook to which the function to be removed is hooked. … … 293 293 * @since 2.7.0 294 294 * 295 * @global array $wp_filter Stores all of the filters295 * @global array $wp_filter Stores all of the filters and actions. 296 296 * 297 297 * @param string $tag The filter to remove hooks from. … … 434 434 * by adding it to the function signature. 435 435 * 436 * @global array $wp_filter Stores all of the filters 436 * @global array $wp_filter Stores all of the filters and actions. 437 437 * @global array $wp_actions Increments the amount of times action was triggered. 438 * @global array $wp_current_filter Stores the list of current filters with the current one last 438 * @global array $wp_current_filter Stores the list of current filters with the current one last. 439 439 * 440 440 * @param string $tag The name of the action to be executed. … … 508 508 * @see do_action() This function is identical, but the arguments passed to the 509 509 * functions hooked to `$tag` are supplied using an array. 510 * @global array $wp_filter Stores all of the filters 510 * @global array $wp_filter Stores all of the filters and actions. 511 511 * @global array $wp_actions Increments the amount of times action was triggered. 512 * @global array $wp_current_filter Stores the list of current filters with the current one last 512 * @global array $wp_current_filter Stores the list of current filters with the current one last. 513 513 * 514 514 * @param string $tag The name of the action to be executed. … … 868 868 * @access private 869 869 * 870 * @global array $wp_filter Stores all of the filters870 * @global array $wp_filter Stores all of the filters and actions. 871 871 * 872 872 * @param array $args The collected parameters from the hook that was called. … … 898 898 * 899 899 * @since 2.2.3 900 * @since 5.3.0 Removed workarounds for spl_object_hash(). 901 * `$tag` and `$priority` are no longer used, 902 * and the function always returns a string. 900 903 * @access private 901 904 * 902 * @global array $wp_filter Stor age forall of the filters and actions.905 * @global array $wp_filter Stores all of the filters and actions. 903 906 * @staticvar int $filter_id_count 904 907 * 905 * @param string $tag Used in counting how many hooks were applied 906 * @param callable $function Used for creating unique id 907 * @param int|bool $priority Used in counting how many hooks were applied. If === false 908 * and $function is an object reference, we return the unique 909 * id only if it already has one, false otherwise. 910 * @return string|false Unique ID for usage as array key or false if $priority === false 911 * and $function is an object reference, and it does not already have 912 * a unique id. 908 * @param string $tag Unused. The name of the filter to build ID for. 909 * @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. 913 913 */ 914 914 function _wp_filter_build_unique_id( $tag, $function, $priority ) { … … 921 921 922 922 if ( is_object( $function ) ) { 923 // Closures are currently implemented as objects 923 // Closures are currently implemented as objects. 924 924 $function = array( $function, '' ); 925 925 } else { … … 928 928 929 929 if ( is_object( $function[0] ) ) { 930 // Object Class Calling930 // Object class calling. 931 931 return spl_object_hash( $function[0] ) . $function[1]; 932 932 } elseif ( is_string( $function[0] ) ) { 933 // Static Calling933 // Static calling. 934 934 return $function[0] . '::' . $function[1]; 935 935 }
Note: See TracChangeset
for help on using the changeset viewer.