Bug in remove_filter/apply_filters
-
Is it possible that remove_filter/apply filter is buggy?
I wanted to remove the wpautop filter, but its priority 30, so aremove_filter('comment_text','wpautop')
won’t remove it.remove_filter('comment_text','wpautop',30)
however will, BUT it leaves the “priority-class” 30 in thewp_filters['comment_text']
array, resulting in somthing like this:[30] => null
.
Whenapply_filters
now walks over the array, it reaches the[30]
entry and callsforeach($functions as $function)
, but since$functions
is not an array (it points tonull
) I receive an error-message.
I removed this bug by putting anif (!is_null($functions))
around theforeach($functions as $function)
.
It would be nice if this would find it’s way into the official version.
I’d also like to point out that the version 1.2 Admin interface is kinda broken in Opera with “Categories” appearing between “Title” and “Post”, not on the right-hand side of “Post”.
- The topic ‘Bug in remove_filter/apply_filters’ is closed to new replies.