
Search WordPress.org and Google to make sure someone has not already solved your problem.
The main plugin file needs to be a .php file with a unique file or folder name.
/* Plugin Name: Test Plugin
Version: 1.0
Description: Just a test plugin!
Author: Dan Rabb
Author URI: http://URI_of_plugin_author_website
Plugin URI: http://URI_of_plugin_descripion_and_updates
License: A slug describing license associated with the plugin (usually GPL2) */
Check the requirements of the plugin.
Verify that WordPress is up to snuff, and (if applicable) all dependent plugins are installed.
add-action ('hook-name', 'function-name', X,Y);
add-action('hook-name', 'function-name', X,Y);
hook-name: name of the hook you want to add the action to
add-action('hook-name', 'function-name', X,Y);
function-name: name of the function you want WordPress to call
add_action('wp_footer', 'min_quantity_javascript');
function min_quantity_javascript() {
/* echo out some javascript ... */
}
Pro-tip: if your plugin requires javascript, make sure you add an action hook for wp_footer
add-filter('hook-name', 'function-name', X,Y);
Clearly label everything that the user has to fill out