Is it possible that remove_filter/apply filter is buggy?
I wanted to remove the wpautop filter, but its priority 30, so a
remove_filter('comment_text','wpautop')won’t remove it.
remove_filter('comment_text','wpautop',30)however will, BUT it leaves the “priority-class” 30 in the
wp_filters['comment_text']array, resulting in somthing like this:
 => null.
apply_filtersnow walks over the array, it reaches the
entry and calls
foreach($functions as $function), but since
$functionsis not an array (it points to
null) I receive an error-message.
I removed this bug by putting an
if (!is_null($functions))around the
foreach($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.