WordPress.org

Ready to get started?Download WordPress

Forums

WP-TopBar
[resolved] Social Button links (6 posts)

  1. l w
    Member
    Posted 10 months ago #

    Social Button links are set to "_blank" but they are defaulting to "_self"

    What is causing this?

    http://wordpress.org/plugins/wp-topbar/

  2. Bob
    Member
    Plugin Author

    Posted 10 months ago #

    Thanks -- found a defect.

    look in wp-topbar.php

    There are two places that you have to change this:

    echo '<a href="'.$wptbOptions['social_icon'.$i.'_link'].'" target="_'.$wptbOptions['link_target'].'"><img src="'.$wptbOptions['social_icon'.$i.'_image'].'" style="'.trim($wptbOptions['social_icon'.$i.'_css']).'"/></a>';

    to this:

    echo '<a href="'.$wptbOptions['social_icon'.$i.'_link'].'" target="_'.$wptbOptions['social_icon'.$i.'_link'_target].'"><img src="'.$wptbOptions['social_icon'.$i.'_image'].'" style="'.trim($wptbOptions['social_icon'.$i.'_css']).'"/></a>';

    Again, you have to do this in two places.

    I will fix it in the next release.

    Thanks for finding this!

  3. l w
    Member
    Posted 10 months ago #

    Thanks, Bob but Dreamweaver shows the new line of code as an error. What can be causing that?

  4. Bob
    Member
    Plugin Author

    Posted 10 months ago #

    Hmm.. try this... single quote was in the wrong place.

    echo '<a href="'.$wptbOptions['social_icon'.$i.'_link'].'" target="_'.$wptbOptions['social_icon'.$i.'_link_target'].'"><img src="'.$wptbOptions['social_icon'.$i.'_image'].'" style="'.trim($wptbOptions['social_icon'.$i.'_css']).'"/></a>';

    I'll be posting a new version with this fix over the weekend.

    Bob

  5. l w
    Member
    Posted 10 months ago #

    That did it, Bob! Thank you.

  6. Bob
    Member
    Plugin Author

    Posted 10 months ago #

    Great!

Reply

You must log in to post.

About this Plugin

About this Topic