WordPress.org

Ready to get started?Download WordPress

Forums

Arconix Shortcodes
[resolved] toggle css attribute not working right (9 posts)

  1. jessibird
    Member
    Posted 12 months ago #

    Hi, I'm generally loving this plugin, but I'm getting problems if I try to add a class to a toggle, as in the example here: https://arconixpc.fogbugz.com/default.asp?W9

    Instead of getting a class attribute inserted into the .arconix-toggle-wrap div, I'm getting the text <div class="custom-class"> showing up on the page, above the toggle.

    http://wordpress.org/extend/plugins/arconix-shortcodes/

  2. John Gardner
    Member
    Plugin Author

    Posted 12 months ago #

    Hi Jessibird,

    I did that by design because I had trouble overriding the existing values when it was just another class in a list. Are you having troubles making the CSS customizations you'd like? If so, I might be able to help.

  3. jessibird
    Member
    Posted 12 months ago #

    Hello John,

    Thanks so much for responding!

    What you describe would be alright, if it actually created HTML markup. Instead, it's just displaying it as text. In other words, the HTML characters are encoded. At least, they are for the opening div tag; the closing div tag is working properly as actual markup.

    Take a look - I copied the exact code you have on your example page into the text view of my editor on this page: http://jessibird.net/test

    I've tested and observed this on two sites on different servers now, with different but minimal plugins.

    Thanks,

    Jessi

  4. jessibird
    Member
    Posted 12 months ago #

    Maybe the relevant code is line 554 of includes/shortcodes.php where you use esc_attr on $css_start? I think it's the esc_attr that is causing the problem.

  5. John Gardner
    Member
    Plugin Author

    Posted 12 months ago #

    Yeah, that's just dumb... I'll get that fixed asap.

  6. jessibird
    Member
    Posted 12 months ago #

    Thanks, John, that's awesome! Have a lovely weekend.

  7. John Gardner
    Member
    Plugin Author

    Posted 12 months ago #

    While I'm in here, I'm going to move the CSS to be inline... that's how I've done it on other shortcodes, and I'd prefer to keep things consistent.

  8. jessibird
    Member
    Posted 12 months ago #

    Yay, that's how I like it, too. Thanks for everything, John!

  9. Stubborn_Facts
    Member
    Posted 11 months ago #

    John,
    I don't know if you already know this or it's helpful information, but

    <div class="custom-class">

    is visible above the toggles in Firefox, but not Chrome or Safari.

    Is it just me, or is Firefox starting to become a bit of a pain? I'm noticing an increasing number of issues cropping up.

    I look forward to the fix - I have a number of uses in mind for the toggles feature that should help site visitors see and use information and really appreciate the way you've coded this - it doesn't constitute a site load burden.

    Thank you,
    Shelli

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.