Page History: Plugin development checklist
Compare Page Revisions
Compare revision
to revision
List of revisions
Page Revision: 2013/11/06 15:23
Checklist
Get a unique and descriptive name
Create a unique prefix for functions and classes
Create an appropriate plugin folder structure
- Keep Images in an images directory
- Keep Javascript files in a js (javascript) directory
Create the default plugin files with necessary content
- Php-file with the same name as the plugin ( directory name ).
- Add the header text as needed to this file
- Plugin name
- Language
- Description
- version
- possibly links to plugin and its author
- Add an uninstall.php file to clear all traces of your plugin when being uninstalled.
Include a license text if needed
- Directly after the header in the plugin php-file.
Create activation function
- If needed, verify correct version of WP.
- Set default options so the plugin works directly after activation.
- Create the register_activation_hook() to start your activation function.
Create deactivation function
- Usually don't clean up to much so that a reactivation will be able to continue as when it was deactivated.
- Create the register_deactivation_hook() to start your deactivation function.
Code for multilingual use
- Use __('my text', 'textdomain') and the likes for all texts to be output.
- Use Poedit or similar tool to generate a pot-file and any language files (.po /.mo) for languages you support out of the box.
- Use english in your code and translate to your language.
Use WP-provided functions and constants to generate correct paths
- These provide proper paths to places in WP even when these are non-standard
- Also for proper paths in your plugin if necessary.