First of all we must have a idea what we want to develop, in this case:
- We want to develop a password generator.
- Generator must be useable in front and backend of the website.
- Shortcodes has to be for frontend available.
- User can choose which type of encryption he or she want to use.
- User can set how many repeats the plugin use.
- Documentation available in menu.
WordPress plugin Initialisation:
/* Plugin Name: opasswords Plugin URI : http://www.abs-hosting.nl/cms/new-password/ Description: Encrypted Passwords plugin. Author : CS ABS-Hosting.nl Author : CS : ABS-Hosting.nl / Walchum.net Version : 1.0 Author URI : http://www.abs-hosting.nl */
Thats all !,
if the above text is saved as passwords.php and installed as plugin it will do nothing only it will show your information. In WordPress it is a valid plugin and will apear in the plugin list.
- Pluginname is now called opasswords.
- Url to plugin form or download file.
- Short description
- Version is of your choice, 1, 0.1 etc.etc.
- Author Url, link to your own website
A litle strange is it that the file-name and class-name do not have to be the same!
The actual class :
This class is center point of the plugin. All functions, who are called in this class, must be available and give correct responses otherwise the plugin will not be INSTALLED by WordPress.