Foxdell Folio are pleased to present the Pico Plugin Framework. This
framework has been designed to provide the benefits of an MVC implementation
contained in one file, currently of approximately 27K.
Do we need yet another MVC framework? When looking around for an MVC
framework to use we found that the MVC frameworks as plugins for
WordPress had many features but required the implementation of a specific file
structure or needed the implementation of config files. All we wanted were a
few simple helper functions and a way of separating control logic from
presentation logic, whilst still leveraging many of the features already present
in WordPress. As we could not find one to fulfil these requirements we built
our own.
Features of the framework include
- Integration with the Settings API.
- WordPress form security using the wp_nonce set of functions.
- Ability to define models for manipulating custom data outside of the Settings API.
- Helper functions to make creating plugins simpler.
- Separation of control/data/presentation logic.
If you like this framework and it helps boost your productivity then
please consider leavinga review for this plugin.
PLEASE NOTE THERE IS A BREAKING CHANGE IN THIS RELEASE. Please see the change log and
reference implementations to see how to use the PPFCreator class to create a PPFApp
instance rather than creating a PPFApp instance directly.
1.0.0.1
1.0.0.2
PPF Changes
- Changed class name to include version number.
- Added factory class to create PPF class and hide versioning.
- Changed class variable to global for current section.
- Removed in_section_form bool from ppf_close_form when using model.
- Added check to see if field exists when getting parameters for settings section.
- Modified the check for label and div in get_input_template to see if set in options array.
- Changed ppf_close_form to take an array for the options as the second parameter.
- Made save_model function public and changed name to ppf_save_model.
- Added the ppf_register_custom_editor function to allow the addition of more complex input types such as farbtastic.
Reference Implementation Changes
- Changed ppf-ref-i.php so that save messages are checked to see if they exist.
- Modified ppf-ref-j.php to display the correct label in the admin screen
- Modified ppf-ref-j.php to pass string arguments as parameters in quotes.
- Added a Reference implemtation (Ref K) to demonstrate implementing a custom editor.
Codex Changes
- Added the action_data page.
- Added pages for ppf_save_model and ppf_register_custom_editor.
- Updated page for ppf_close_form to refelct change from parameter
$submit_value to array $submit_options.