remove_filter [ WordPress Function ]
| Parameters: |
|
| Returns: |
|
| Defined at: |
|
Removes a function from a specified filter hook.
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.
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.
Source
<?php
function remove_filter($tag, $function_to_remove, $priority = 10, $accepted_args = 1) {
$function_to_remove = _wp_filter_build_unique_id($tag, $function_to_remove, $priority);
$r = isset($GLOBALS['wp_filter'][$tag][$priority][$function_to_remove]);
if ( true === $r) {
unset($GLOBALS['wp_filter'][$tag][$priority][$function_to_remove]);
if ( empty($GLOBALS['wp_filter'][$tag][$priority]) )
unset($GLOBALS['wp_filter'][$tag][$priority]);
unset($GLOBALS['merged_filters'][$tag]);
}
return $r;
}
?>
Examples [ wp-snippets.com ]
Top Google zoekresultaten
- remove_filter - WordPress Codex
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 ...
codex.wordpress.org - Remove_filter ('the_content', 'wpautop') is not working
Jan 12, 2011 ... I've tried disabling WP's auto-paragraph thingy using. remove_filter ('the_content', 'wpautop');. but I am still getting my stuff wrapped in ...
wordpress.stackexchange.com - remove_filter() and remove_action()'s bug, bad for developers ...
Jan 25, 2011 ... A hilarious bug caused by the remove_filter or remove_action function in WordPress. Look inside for a possible work around.
betterwp.net - Wordpress - Apply remove_filter only on one page - Stack Overflow
I suggest creating a page template for the "one page includes a php file (with exec-php)". Then add an if statement around the remove_filter(.
stackoverflow.com
Gebruikersdiscussies [ wordpress.org ]
- thecoup on "remove filter - custom continue reading link"
- blk784 on "add/remove filter for custom query"
- vtxyzzy on "add/remove filter for custom query"
- blk784 on "add/remove filter for custom query"
- vtxyzzy on "add/remove filter for custom query"
- blk784 on "add/remove filter for custom query"
- vtxyzzy on "add/remove filter for custom query"
- blk784 on "add/remove filter for custom query"
- vtxyzzy on "add/remove filter for custom query"
- blk784 on "add/remove filter for custom query"