Home Forums Theme Support Dokan Disabling Shortcodes

This topic is: resolved

Tagged: 

This topic contains 9 replies, has 3 voices, and was last updated by  Sekander Badsha 4 years, 6 months ago.

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #30392

    Roberto
    Member
    Post count: 59

    Hello devs.

    The_content and the description fields of a product in the dashboard let users insert html, shortcodes and all kind of stuff.

    This could be a problem, is there a way to change this behaviour?

    #30398

    Roberto
    Member
    Post count: 59

    Plus, there is no way of having an edited product moved to “pending” automatically, so If i approve a product and then the seller changes the content adding shortcodes or html tag that screw up the page, how can i prevent this?

    Am i doing something wrong?

    #30408

    Nayem
    Moderator
    Post count: 6480

    Hello Roberto,

    Im cheking your issue. Please allow me some time. I will be back to you with a right solution.

    Thank you ๐Ÿ™‚

    #30415

    Nayem
    Moderator
    Post count: 6480

    Hello Roberto,

    I checked your issue but failed to reproduce the issue. Can you please provide a screenshot?.

    #30416

    Roberto
    Member
    Post count: 59

    I am using a theme called Jupiter.
    It allows a lot of custom shortcodes, like this

    [mk_chart percent=”50″ bar_color=”#00c8d7″ track_color=”#ececec” line_width=”10″ bar_size=”150″ content_type=”percent” icon=”moon-alarm-2″]

    which builds a fancy chart.

    If i enter this or other custom shortcodes, they actually appear on the frontend.
    I Believe dokan should be blocking all the shortcodes, as default behaviour, in order not to give too much “power” to the sellers.

    On the other hand, the textarea named “post_excerpt” does not parse the html. Meaning if i write “Hey” and click “update product”, the layout of the product page screws up.

    I'll post some screens asap.
    Cheers

    #30861

    Sekander Badsha
    Member
    Post count: 2067

    Hello Roberto,

    Shortcode is a feature that works on anywhere in the wordpress system, regardless the input area file or place. So there is no way to stop it from frontend or depending on user roles.

    #30878

    Roberto
    Member
    Post count: 59

    QUestion: is this

    remove_filter('the_content', 'do_shortcode', 11);

    something that may work? Just asking cuz im not an expert.
    Cheers

    #31429

    Sekander Badsha
    Member
    Post count: 2067

    Hello Roberto,

    Disabling the shortcodes is possible. But as I said earlier, it will turnoff the shortcodes globally. So the shorcodes in your site will not work any where in your website. Shotcodes can not be bound to one single page.

    Thank you for understanding. ๐Ÿ™‚

    #31599

    Roberto
    Member
    Post count: 59

    http://pixert.com/blog/disable-all-shortcodes-from-post-content/

    Here they say it's possible somehow. Would this code work with some editing or do you think it won't?

    Thank you for your help!!!

    #32137

    Sekander Badsha
    Member
    Post count: 2067

    Hello Roberto,

    We have not tried such type of codes. You may give it a try in your local/testing/staging server and see if that works or not ๐Ÿ™‚

Viewing 10 posts - 1 through 10 (of 10 total)

The topic ‘Disabling Shortcodes’ is closed to new replies.