• Resolved dvdufo

    (@dvdufo)


    This plugin is amazing and found thousands of unused shortcodes in my website. But will I have to remove the found shortcodes one by one manually?
    It seems that Deleteing is the second step after Finding. will this plugin help for Deleting too?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter dvdufo

    (@dvdufo)

    Thanks to your plugin I could manually bulk remove all found unused shortcodes using these in phpMyAdmin:

    UPDATE wp_posts SET post_content = replace(post_content, '[do_widget id=text-10]', '' ) ;

    or

    UPDATE wp_posts SET post_content = REGEXP_REPLACE(post_content, "\\[do_widget id=text-10]", "");

    If unwanted shortcodes are not solid and have variations, for example, different numbers or links or names, this code below will remove all shortcodes starting with for example [cz_ and will clear what it has inside ignoring any number or link.

    UPDATE wp_posts SET post_content = REGEXP_REPLACE(post_content, "\\[cz_(.*?)]", "");`

    I wrote here because I thought it may help someone.

    • This reply was modified 3 years ago by dvdufo.
    • This reply was modified 3 years ago by dvdufo.
    • This reply was modified 3 years ago by dvdufo.
    • This reply was modified 3 years ago by dvdufo.
    Plugin Author Scribit

    (@scribit)

    Hi @dvdufo and thanks for your topic.
    Deleting contents is always a very delicate operation. For this reason, instead of deleting, I preferred to insert an option to hide the unused/orphan shortcodes without removing it.
    It’s less risky, you have more control over them, and there’s a chance to go back in case of false positives.

    But I am sure your suggestions will be useful to someone.

    Finally..do you want to leave a review for the plugin? ??

    Thread Starter dvdufo

    (@dvdufo)

    Thanks for your support and nice plugin. I reviewed it with 5 stars. ??

    Plugin Author Scribit

    (@scribit)

    Very very kind ??
    See you in the next version!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Is there “Delete” capability of found shortcodes in this plugin?’ is closed to new replies.