WordPress.org

Ready to get started?Download WordPress

Forums

Share Buttons by AddThis
filter doesn't apply (3 posts)

  1. tchab2
    Member
    Posted 10 months ago #

    Hi,
    My blogs are bugged because a filter seems to not work in your plugin.

    That one should replace %s for the addthis:url and addthis:title but doesn't make the job...

    addthis_social_widget.php: (line 1511)

    $custom = preg_replace( '/<\s*div\s*/', '<div %s ', $options['below_custom_string'] );
    $below = apply_filters('addthis_below_content', $custom); // Bugged

    Thanks,
    Sylvain

    http://wordpress.org/plugins/addthis/

  2. tchab2
    Member
    Posted 10 months ago #

    I add this to fix temporairly your code:

    $url = get_permalink();
    $title = get_the_title();
    $url_below = "addthis:url='$url' ";
    $url_below .= "addthis:title='". esc_attr( $title) ." '";
    $custom = str_replace('%s', $url_below, $custom);

  3. Srijith V
    AddThis Samurai
    Plugin Author

    Posted 10 months ago #

    It can happen if some other theme is processing it before we are. Your fix is ideal in your case and we have to see whether it works for all cases. Thanks for pointing it out. We will find a more viable solution and fix it.

Reply

You must log in to post.

About this Plugin

About this Topic