• Resolved mendozal

    (@mendozal)


    I used the ba_cad element but I decided to add a little Text+Html to the description field.

    In doing that I had issues using WPML to translate the field because the description field wasn’t specified to accept HTML.

    This is the original

    <shortcode>
    
                <tag>ba_card</tag>
    
                <attributes>
    
                    <attribute>photo_alt</attribute>
    
                    <attribute>badge_text</attribute>
    
                    <attribute>title</attribute>
    
                    <attribute>description</attribute>
    
                    <attribute>button_text</attribute>
    
                </attributes>
    
            </shortcode>

    Please consider changing the description field like this:

    
    <attribute encoding="allow_html_tags">description
    </attribute>

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support M. Asif Hossain

    (@asifsiam97)

    Hello mendozal,

    Kindly provide additional technical details regarding the specific implementation and the intended locations for incorporating these changes.

    Thread Starter mendozal

    (@mendozal)

    Hi.

    It would be in this file you have inside your plugin folder

    /wp-content/plugins/addons-for-divi/wpml-config.xml

    It describes how to handle the fields in WPML, for example, if the description fields will support HTML text or not. (I believe all description fields should). Otherwise WPML translates the HTML into a sanitized and codified string and not as HTML.

    For example, I altered the ba_cards shortcode to look like this:

        <shortcode>
          <tag>ba_card</tag>
          <attributes>
            <attribute type="media-url">photo</attribute>
            <attribute>badge_text</attribute>
            <attribute>title</attribute>
            <attribute encoding="allow_html_tags">description</attribute>
          </attributes>
        </shortcode>

    It’s just adding that encoding=”allow_html_tags” in the fields that would support it.

    Thanks.

    • This reply was modified 9 months, 1 week ago by mendozal.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘WPML config file, consider adding this’ is closed to new replies.