WordPress.org

Ready to get started?Download WordPress

Codex

Attention Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Difference between revisions of "Function Reference/remove filter"

(remove new page created)
(Using Parameter template)
Line 4: Line 4:
   
 
== Parameters ==
 
== Parameters ==
+
{{Parameter|$tag|string|The filter hook to which the function to be removed is hooked.}}
; <tt>$tag</tt> : (''string'') The filter hook to which the function to be removed is hooked.
+
{{Parameter|$function_to_remove|callback|The name of the function which should be removed.}}
; <tt>$function_to_remove</tt> : (''callback'') The name of the function which should be removed.
+
{{Parameter|$priority|integer|The priority of the function.|optional|10}}
; <tt>$priority</tt> : (''int'') ('''optional''') The priority of the function (default: 10).
+
{{Parameter|$accepted_args|integer|The number of arguments the function accepts.|optional|1}}
; <tt>$accepted_args</tt> : (''int'') ('''optional''') The number of arguments the function accepts (default: 1).
 
   
 
== Return ==
 
== Return ==

Revision as of 02:59, 13 January 2008

Description

This function removes a function attached to a specified filter hook. This method can be used to remove default functions attached to a specific filter hook and possibly replace them with a substitute.

Parameters

$tag
(string) (required) The filter hook to which the function to be removed is hooked.
Default: None
$function_to_remove
(callback) (required) The name of the function which should be removed.
Default: None
$priority
(integer) (optional) The priority of the function.
Default: 10
$accepted_args
(integer) (optional) The number of arguments the function accepts.
Default: 1

Return

(boolean) : Whether the function is removed.

This page is marked as incomplete. You can help Codex by expanding it.