Plugin Engine by CodeBard Quickstart

(To be updated continually – for now, get in contact through github; or contact@codebard.com)

1 – Download the plugin template from github here

2 – Extract the file.

3 – Change all instances of PLUGINPREFIX in all files to your particular plugin prefix. This will be not only the class name, but also will be used in many places. Choose alphanumeric strings starting with letters.

4 – Upload the plugin folder to your development installation of WordPress

5 – Activate. Setup Wizard will run, will ask you a dud option to show how you can make users enter options during install, and complete

6 – Start developing your plugin!

Important tip:

Any function/method you need to add to your plugin needs to be added to plugin.php under plugin/ folder. Always suffix it with _p. like “public function myfunction_p($vars) {”

When calling any function you added, dont use $this->myfunction_p();

Instead use $this->myfunction(); like normal. Engine will know what to do.

You can hook to any function! Like

PLUGINPREFIX_action_before_myfunction

hook will allow you to hook another function to the function you added above, and run it before myafunction runs.

PLUGINPREFIX_filter_vars_before_myfunction

filter will allow you to filter any input vars to the function you added above

PLUGINPREFIX_filter_vars_after_myfunction

filter will allow you to filter any output of the function you added above

PLUGINPREFIX_action_after_myfunction

hook will allow you to hook another function to the function you added above, and run it after myafunction runs.