• Resolved janvitos

    (@janvitos)


    Hi,

    I’m trying to globally disable wptexturize in WordPress by using the following filter:

    add_filter( ‘run_wptexturize’, ‘__return_false’ );

    Unfortunately, Media Credit seems to break this filter somehow. After disabling the Media Credit plugin, the filter works properly.

    Thanks.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter janvitos

    (@janvitos)

    So I found the culprit.

    This is what I found in the CHANGELOG.md file:

    ## 3.0.1 (Mar. 20, 2016) ##
    *   Fixed run_wptexturize filter breakage caused by calling get_bloginfo too
        early.

    So I went ahead and searched for get_bloginfo and found the only instance in the file /media-credit/includes/media-credit/class-settings.php

    Here’s the line of code in question (line 294):

    'default' => \get_bloginfo( 'name', 'display' ),

    Changing this line to the following code fixes the issue:

    'default' => '',

    Obviously, this is a temporary fix.

    • This reply was modified 2 years, 2 months ago by janvitos.
    • This reply was modified 2 years, 2 months ago by janvitos.
    • This reply was modified 2 years, 2 months ago by janvitos.
    • This reply was modified 2 years, 2 months ago by janvitos.
    • This reply was modified 2 years, 2 months ago by janvitos.
    Plugin Author pepe

    (@pputzer)

    I’d have to investigate. Previous to 3.0.1, get_bloginfo was called on object initialization, which led to obvious issues with the filter hook. That was alleviated in 3.0.1 by moving the call to the plugin activation stage. Since then, the plugin has been extensively reworked, so that now it should only be called on demand (usually much later). But run order dependencies are tricky, so the bug may have resurfaced inadvertantly.

    Thread Starter janvitos

    (@janvitos)

    Thanks for the quick response.

    I will be awaiting the results of your investigation then.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Plugin breaks run_wptexturize’ is closed to new replies.