Skip to content

tags with attributes #30

Closed
Closed

Description

@stereonom

I created the following shortcode:

[tab title="I am the titel"]I'm the content[/tab]

The plugins tries to escape the quotation marks like this:

[tab title=\"I am the titel\"]I'm the content[/tab]

But it even renders the backslashes in the wysiwyg-editor and in the text-editor.

My shortcode than fails, because it can't find the title correctly and the fallback title is used.

function add_tab( $atts , $content = null ) {
    // Attributes
    extract( shortcode_atts(
        array(
            'title' => 'Tab',
        ), $atts )
    );
    $markup = '<div class="tabheadline">'.$title.'</div><div class="tabbody">'.apply_filters( 'box_content', $content ).'</div>';
    return $markup;
}
add_shortcode( 'tab', 'add_tab' );

Activity

  1. bueltge commented on Nov 27, 2014

    @bueltge
    Owner

    @stereonom Thanks for the feedback. I gave currently checked on my install and it works. I have add your shortcode tab as custom button in AddQuicktag settings and it is also possible to use inside the editor, see the screenshot. Can you recheck this again.

    auswahl_001

    But maybe it is a difference between activation on single or multisite. Which WP install do you have?

  2. bueltge commented on Nov 27, 2014

    @bueltge
    Owner

    @stereonom I think, that I have found a bug and fixed now inside this repository. Can you test the version from here, Download, and give feedback. Thanks.

  3. bueltge commented on Dec 18, 2014

    @bueltge
    Owner

    @stereonom Please give me a feedback about the topic. Thanks.

  4. added this to the 2.4.0 milestone on Dec 18, 2014
  5. stereonom commented on Dec 18, 2014

    @stereonom
    Author

    It works. Thanks!

  6. bueltge commented on Dec 18, 2014

    @bueltge
    Owner

    Danke für die Rückmeldung!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions