Changeset 21288
- Timestamp:
- 07/20/2012 01:54:42 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/plugin.php
r21287 r21288 81 81 * 82 82 * @param string $tag The name of the filter hook. 83 * @param callback $function_to_check optional. If specified, return the priority of that function on this hook or false if not attached. 84 * @return int|boolean Optionally returns the priority on that hook for the specified function. 83 * @param callback $function_to_check optional. 84 * @return mixed If $function_to_check is omitted, returns boolean for whether the hook has anything registered. 85 * When checking a specific function, the priority of that hook is returned, or false if the function is not attached. 86 * When using the $function_to_check argument, this function may return a non-boolean value that evaluates to false 87 * (e.g.) 0, so use the === operator for testing the return value. 85 88 */ 86 89 function has_filter($tag, $function_to_check = false) { … … 252 255 * @return boolean Whether the function existed before it was removed. 253 256 */ 254 function remove_filter( $tag, $function_to_remove, $priority = 10, $accepted_args = 1) {257 function remove_filter( $tag, $function_to_remove, $priority = 10 ) { 255 258 $function_to_remove = _wp_filter_build_unique_id($tag, $function_to_remove, $priority); 256 259 … … 495 498 * 496 499 * @param string $tag The name of the action hook. 497 * @param callback $function_to_check optional. If specified, return the priority of that function on this hook or false if not attached. 498 * @return int|boolean Optionally returns the priority on that hook for the specified function. 500 * @param callback $function_to_check optional. 501 * @return mixed If $function_to_check is omitted, returns boolean for whether the hook has anything registered. 502 * When checking a specific function, the priority of that hook is returned, or false if the function is not attached. 503 * When using the $function_to_check argument, this function may return a non-boolean value that evaluates to false 504 * (e.g.) 0, so use the === operator for testing the return value. 499 505 */ 500 506 function has_action($tag, $function_to_check = false) { … … 516 522 * @param callback $function_to_remove The name of the function which should be removed. 517 523 * @param int $priority optional The priority of the function (default: 10). 518 * @param int $accepted_args optional. The number of arguments the function accepts (default: 1).519 524 * @return boolean Whether the function is removed. 520 525 */ 521 function remove_action( $tag, $function_to_remove, $priority = 10, $accepted_args = 1) {522 return remove_filter( $tag, $function_to_remove, $priority, $accepted_args);526 function remove_action( $tag, $function_to_remove, $priority = 10 ) { 527 return remove_filter( $tag, $function_to_remove, $priority ); 523 528 } 524 529
Note: See TracChangeset
for help on using the changeset viewer.