WordPress.org

Ready to get started?Download WordPress

Forums

Shortcode applied to a single link issue. Bug? (2 posts)

  1. Zambrano Sergio
    Blocked
    Posted 3 years ago #

    I created a plugin and widget for adding downloads to your theme, and the shortcode button can't work properly:

    The scenario:

    You select some text in visual view and click the shortcode button. The selection gets processed and some content is returned in its place.

    The issue:

    When just one simple link is selected, the shortcode replaces the ANCHOR text only. So the WHOLE returned text (it could be a WHOLE table) ends up appearing inside A BIG LINK.

    Example:

    Having selected Anchor Text in visual view, which is
    <a>Anchor Text</a>

    whether shortcode returns
    'before ' . $content . ' after'

    returned text is:
    <a>before Anchor Text after</a>

    Is there a way to tell wordpress to grab further than the anchor text? (in html view the button won't make sense, since it's for html dummies.

    Thanks.

  2. Zambrano Sergio
    Blocked
    Posted 3 years ago #

    Anyone?
    Should I post the question somewhere else?

Topic Closed

This topic has been closed to new replies.

About this Topic