I am currently no longer developing or supporting this plugin. I may resume development and support in the future, but I’m not sure when.
The Toppa Plugin Libraries for WordPress include several utilities for plugin developers. They facilitate the use of Agile coding techniques for developing WordPress plugins. This library is required for use of toppa.com plugins. The following libraries are included:
- ToppaAutoloader: gives you an easy way to autoload class files for WordPress plugins. It conforms to the PSR-0 standard for autoloading in PHP, except it does not yet support namespaces (since WordPress currently is not intended for use with features that were introduced in PHP 5.3).
- ToppaSettings: simplifies the management of plugin settings.
- ToppaFunctionsFacade: creates a facade (wrapper) for functions that are custom to WordPress, and provides enhanced functionality for certain tasks (such as multisite plugin installations). This allows you to write your plugins without calling WordPress functions directly. This gives you the power to do two things: 1. write unit tests for your plugin, and 2. make your plugin potentially usable outside of WordPress.
- ToppaDatabaseFacade: similar in concept to ToppaFunctionsFacade, but focuses on database interactions. In addition to creating wrappers for WordPress database calls, it includes enhanced functionality for tasks such as creating custom tables.
- ToppaHtmlFormField: a lightweight utility for creating HTML form fields. It is not a complete form builder. Instead it is intended to make it very easy to create form fields in a standardized way, and then lets you use them however you like.
See the Toppa Plugin Libraries for WordPress page on my website for more details and usage examples.
Upload to your plugin folder just like any other plugin, and activate.
- Requires PHP 5.1.2 or higher.
- Requires WordPress 3.0 or higher.
- See the Toppa Plugin Libraries for WordPress page on my website for more details and usage examples.
- For troubleshooting help, please post a comment in my latest post on WordPress plugins.
Contributors & Developers
“Toppa Plugins Libraries for WordPress” is open source software. The following people have contributed to this plugin.Contributors
Interested in development?
- added executeDbFunction() to ToppaDatabaseFacade
- added getTermBy() and getTermLink() to ToppaFunctionsFacade; updated getPermalink() to accept a post ID or object
- added purge() to ToppaSettings
- In the autoloader, check that a class file exists before loading, instead of just suppressing any include errors (this fixes a warnings issue with PHP on Windows)
- In the settings manager, add handling for nested arrays in settings
Bug fix: assign defualt value to $outputType param in getPost() in ToppaFunctionsFacade (was causing an error in PHP 5.2.1)
- Added registerStylesheet(), getPost(), and getScriptsObject() to ToppaFunctionsFacade
- Added default value for 2nd argument for enqueueStylesheet() in ToppaFunctionsFacade
- Added sanitizeStringCallback() to ToppaFunctions
- Removed unneeded autoLoader param in constructor for ToppaDatabaseFacade
- Added support for hidden fields to ToppaHtmlFormField
Save version number to the options table
Added createAdminHioddenInputFields() to ToppaFunctionsFacade
- Suppress $wpdb error when trying to verify if table exists in verifyTableExists()
- Append primary key sql correctly in createTable()
- Added followRedirect() to ToppaFunctions
- Added arrayMergeRecursiveForSettings() to ToppaFunctions
- Added htmlSpecialCharsOnce() to ToppaFunctionsFacade
- Cleanup of PHP warnings in ToppaHtmlFormFields when running WP in debug mode
- Cleanup createTable() in ToppaDatabaseFacade
- Added callFunctionForNetworkSites() to ToppaFunctionsFacade
- Apply wpdb charset and collate defaults, if available, when creating a table
- Better error reporting if there is a db error
Added filesystem functions to ToppaFunctionsFacade
- Added ToppaSettings interface and abstract class, for facilitating management of plugin settings
- Bug fix to ToppaFunctionsFacadeWp->getAdminUrl()
Bug fix: don’t add slashes to hardcoded quoted strings for db queries
Added getIntTypes() to ToppaDatabaseFacade
Added 9 more functions to ToppaFunctionsFacade
- More user friendly handling of activation errors
- Added .pot language translation file
- Added 6 more functions to ToppaFunctionsFacade
- Added fixed html ids for radio buttons in ToppaHtmlFormField::buildRadioGroup()
- Debugged ToppaHtmlFormField::buildCheckboxGroup()
- Debugged ToppaHtmlFormField::closeTag()
- Moved settings functions from database facade to ToppaFunctionsFacade
- Added 8 more functions to ToppaFunctionsFacade
- Added WP constants definitions
- Added activation function to make compatibility checks