WordPress.org

Forums

Bug in remove_filter/apply_filters (3 posts)

  1. Jan
    Member
    Posted 11 years ago #

    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: [30] => null.
    When apply_filters now walks over the array, it reaches the [30] entry and calls foreach($functions as $function) , but since $functions is 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".

  2. Jan
    Member
    Posted 11 years ago #

    Ok
    For this and the 2 other bugs I discovered yesterday, I've put up a page with details and fixes which can be reached here:
    http://www.kackreiz.net/wordpress.php

  3. Tobias Jordans
    Member
    Posted 8 years ago #

    Jan, your links are broken:
    The articel: http://www.kackreiz.net/artikel/wordpress/
    The code: http://www.kackreiz.net/wordpress/apply_filters.html#fixed

    In WP2.0.4 your code-fix is already integrated.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.