WordPress:Function Reference/remove filter

来自站长百科
Xxf3325讨论 | 贡献2008年7月19日 (六) 15:05的版本 (新页面: == 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 possibl...)
(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)
跳转至: 导航、​ 搜索

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. See also remove_action(), add_filter() and add_action().

Important: To remove a hook, the $function_to_remove and $priority arguments must match when the hook was added. This goes for both filters and actions. No warning will be given on removal failure.

Example

This function is identical to the remove_action() function.

<?php remove_filter($tag, $function_to_remove, $priority, $accepted_args); ?>

Parameters

Return

(boolean) Whether the function is removed.

True
The function was successfully removed.
False
The function could not be removed.