Ticket #28516: 28516.diff
File 28516.diff, 3.2 KB (added by , 10 years ago) |
---|
-
wp-includes/plugin.php
93 93 * @global array $wp_filter Stores all of the filters 94 94 * 95 95 * @param string $tag The name of the filter hook. 96 * @param callback $function_to_check optional.96 * @param bool|callback $function_to_check optional. 97 97 * @return mixed If $function_to_check is omitted, returns boolean for whether the hook has anything registered. 98 98 * When checking a specific function, the priority of that hook is returned, or false if the function is not attached. 99 99 * When using the $function_to_check argument, this function may return a non-boolean value that evaluates to false … … 269 269 * @param string $tag The filter hook to which the function to be removed is hooked. 270 270 * @param callback $function_to_remove The name of the function which should be removed. 271 271 * @param int $priority optional. The priority of the function (default: 10). 272 * @param int $accepted_args optional. The number of arguments the function accepts (default: 1).273 272 * @return boolean Whether the function existed before it was removed. 274 273 */ 275 274 function remove_filter( $tag, $function_to_remove, $priority = 10 ) { … … 293 292 * @since 2.7.0 294 293 * 295 294 * @param string $tag The filter to remove hooks from. 296 * @param int $priority The priority number to remove.295 * @param bool|int $priority The priority number to remove. 297 296 * @return bool True when finished. 298 297 */ 299 298 function remove_all_filters($tag, $priority = false) { … … 397 396 * @param callback $function_to_add The name of the function you wish to be called. 398 397 * @param int $priority optional. Used to specify the order in which the functions associated with a particular action are executed (default: 10). Lower numbers correspond with earlier execution, and functions with the same priority are executed in the order in which they were added to the action. 399 398 * @param int $accepted_args optional. The number of arguments the function accept (default 1). 399 * @return bool Will always return true. 400 400 */ 401 401 function add_action($tag, $function_to_add, $priority = 10, $accepted_args = 1) { 402 402 return add_filter($tag, $function_to_add, $priority, $accepted_args); … … 558 558 * @see has_filter() has_action() is an alias of has_filter(). 559 559 * 560 560 * @param string $tag The name of the action hook. 561 * @param callback $function_to_check optional.561 * @param bool|callback $function_to_check optional. 562 562 * @return mixed If $function_to_check is omitted, returns boolean for whether the hook has anything registered. 563 563 * When checking a specific function, the priority of that hook is returned, or false if the function is not attached. 564 564 * When using the $function_to_check argument, this function may return a non-boolean value that evaluates to false … … 592 592 * @since 2.7.0 593 593 * 594 594 * @param string $tag The action to remove hooks from. 595 * @param int $priority The priority number to remove them from.595 * @param bool|int $priority The priority number to remove them from. 596 596 * @return bool True when finished. 597 597 */ 598 598 function remove_all_actions($tag, $priority = false) {