• Resolved ravi121923

    (@ravi121923)


    I am using this plugin in my page like

        <?php
        echo do_shortcode('[site_reviews_form class="box-shadow-commn" assigned_posts="post_id" hide="title,email,terms"]');
        ?>

    Before the 7.x.x updates, it was working fine. But now, it add class like –

    <div class="glsr glsr-default glsr-ltr" id="glsr_fb4b17d1" data-from="shortcode" data-shortcode="site_reviews_form" data-assigned_posts="25448" data-class="box-shadow-commn" data-hide="[&quot;title&quot;,&quot;email&quot;,&quot;terms&quot;]"><div class="glsr-form-wrap">
    

    Exact Issue: It added data-class=”box-shadow-commn”
    Expected: class=”box-shadow-commn” and other classes by this plugin

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Gemini Labs

    (@geminilabs)

    Site Reviews adds the class to the .glsr-reviews element. Site Reviews has always done it like this, even in versions prior to v7.

    The data-class attribute is only used to store the class value used for pagination, etc.

    • This reply was modified 6 months, 3 weeks ago by Gemini Labs.
    Thread Starter ravi121923

    (@ravi121923)

    you did not get what I meant. I added custom class to plugin using shortcode, because i wanted to add some style using my custom class name. But instead of adding my class into class=, it added into data-class=

    i am using this plugin since a year. I downgraded to old version and its adding classname as expected. But in latest version it doesnt. Please check my query again.

    Plugin Author Gemini Labs

    (@geminilabs)

    I added custom class to plugin using shortcode, because i wanted to add some style using my custom class name.

    When you do this: [site_reviews class="xx"] , the class attribute is added to the HTML like this:

    <div class="glsr glsr-default glsr-ltr" data-shortcode="site_reviews" data-class="xx">
        <div class="glsr-reviews xx">
            ...
        </div>
    </div>

    Site Reviews has always done it this way (although the data-class attribute on the wrapper div is more recent).

    If you need to target the wrapper div with CSS, either use an id like this: [site_reviews class="xx" id="zz"]

    #zz.glsr {}

    Or if using a class, do this:

    .glsr:has(.xx) {}
    • This reply was modified 6 months, 2 weeks ago by Gemini Labs.
    Thread Starter ravi121923

    (@ravi121923)

    I disagree with you. Try yourself the same shortcode on version 6.xx

    It adds class name with class=””

    but now, it add class name with data-class=””

    it’s breaking all styling done by css after updating the plugin. It will be hassle to update my css classes again to handle data-class instead of class.

    Plugin Author Gemini Labs

    (@geminilabs)

    Ah, I misunderstood you. You are talking about the [site_reviews_form] shortcode but for some reason I misread it as the [site_reviews] shortcode.

    You’re right, there’s a bug. The class option is not being added to the <form> tag like it is supposed to. This will be fixed in the next update.

    • This reply was modified 6 months, 2 weeks ago by Gemini Labs.
    Thread Starter ravi121923

    (@ravi121923)

    Thanks. Now it seems resolved. I want to report one more bug. Because I already found the solution, I am not creating new thread. I just want to let you know the bug so you can fix it.

    I have customized stars images and used new star SVG images using the function provided in the plugin’s FAQs section. In 6.xx version, it was working fine.

    But after 7.xx version, the issue is, star images do not show. Because of new mask-size css added by plugin. To fix it, I have added CSS:

    .glsr-star-empty, .glsr-star-rating--stars[class*=" s"]>span, .glsr-star-full, .glsr-star-rating--stars[class*=" s"]>span.gl-active, .glsr-star-rating--stars[class*=" s"]>span.gl-active.gl-selected{
        -webkit-mask-size: 100% !important;
        mask-size: 100% !important;
    }
Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Class is not correctly adding by this plugin’ is closed to new replies.