Creating a plugin in any of the wordpress is very important. To customize whole wordress website it’s necessary that you are aware about creating plugins in wordpress. Just to come up with this, we are writing this article which will let you know how a wordpress developer can develop a plugin. Go through below steps to develop a plugin.
- To create a plug-in, you need to create a folder under
- wp-content/plugins folder.
- Give the folder name as rdisiteoptimization.
- Inside this folder create a file and named rdisiteoptimization.php.
- Open the file in any editor, and paste the following information in it:
Plugin Name: rdisiteoptimization //this should be the name of your custom plug-in
Plugin URI: http://www.riverdeltaindia.com/ //this should be the path to your custom plugin where is available or hosted
Version: Version //mention the version name in which version this plug-in has created because word press has different different vertions
Author: RDI //this should be the name of the author who has created this nplugin in your case you can write your name.
Description: What does your plug-in do and what features it provides // this can be the details regarding your plug-in.what your plug-in do which features are available in plug-in what a customer can get if he/she will use your plug-in.
From all the information above all are optional without the plug-in name.if you want to distribute your plug-in in a professionally manner then you should give all the above details.
- Go to admin section of your word press
- Click on plug-in
- Search your plug-in from the list ” rdisiteoptimization”
- Click on active
By the above steps now you have just created a blank plug-in and you have activated that .it will not do any thing because you have not coded any thing under this plug-in files.now whatever you want you can write your code and create any folder or files within this directory “rdisiteoptimization”.
When you are creating any plug-in you have to consider some basic points which will help you for distributing that plug-in on net or creating for your use.
- Structuring Plug-Ins:- When you are creating any plugin of complex functionality or for distributing it on net then splitting your plugin in multiple files and folders.
- Naming Your Plug-in And Its Functions properly:- When you are giving any name to class,functions,variable,folders or files try to give is such a way by which it will be unique and meaning full.
- Plug-in Safety:- If you are planning to distribute your plug-in then security is most important.you have to secure your plug-in or code.for security purpose there are many points what you have to consider at the time of coding.
- Cleanup the code:- After creating the plug-in before use or distributing it on net you have to cleanup your code means you have to delete unnecessary codes.