## new plugin idea – shortcode security

Question

i am not a coder so i can’t make a plugin. recently i was searching tutorials/plugins for a feature so that i can restrict the use of shortcode but i found nothing. so i think it will be good idea to share with you coders.
this plugin will allow only administrator to use shortcode,when the other users write it, it wont be taken as a shortcode but as a simple text.so even if a user finds out the algorithm they can’t effect my site.
for example. i have two content 1 and 2. content 1 is for whole world but content 2 is only for the people admin wants. now there is a shortcode to show them in anywhere. me, the admin, give the input [myshortcode = 1] the output is content 1.
now let’s think people came to know about my plugin which helps me to generate this kinds of shortcode. now they can easily show the content 2. this time your new plugin will secure the site. the user who is not an admin gives input [myshortcode = 2] but this time output will be "[myshortcode = 2]", treated as a simple text not as a shortcode.

0
8 months 2020-12-11T10:10:22-05:00 0 Answers 9 views 0