I was asked this query on Quora. I’m not a programmer, but I have some general knowledge of it. Here is the answer:
​
”If you know PHP, it’s not too hard to make a plugin for WordPress. But there are a few things you should remember.
The first is that all of your code must be in a single PHP file. You can put this file in your WordPress installation’s wp-content/plugins directory. The second thing to remember is that your plugin must have at least two functions: one that registers the plugin with WordPress and one that turns the plugin on.
On the official WordPress Plugin Developer website, you can learn more about how to make plugins for WordPress – [WordPress Plugin Development Handbook]”
​
So I need some expert opinion on whether the answer is right or not.
[ad_2]
No, that answer is not correct.
All you need for a plugin to be accessible to WordPress is a PHP file with a comment in a specific format, and for that file to be in the plugins folder. That’s it. You can also nest that file in a directory no problem, and in fact most plugins have *dozens* of files.