Provides a foundation and extensions for/to common WordPress developer functions/tasks - creating/installing plugins, complex database queries, etc
You have several options:
WP_LIBRARY_DIR: constant path to base plugin directory (where
WP_LIBRARY_URL: same as ...DIR, but public-facing URL path
wp_library_path($file): function to get library path to given file (automatically prefixes with directory slash
wp_library_url($file): same as ...path, but public-facing url to file
wp_library_include($file, $isRequired = false, $isOnce = true): function to include/require/"_once a library file, optionally require or do it once
wp_is_library($file): check whether the requested library file exists
By default, the common functions (
mvc/common_micromvc.php), are included.
There's also a really simple class
WP_Library_Base that exposes "hook" wrappers
add_hook_with, which internally call
add_filter using a class function of the same name as a callback, so you don't need to declare
MVC files include the model-view-controller stack, as well as related helper files/functions. These files/patterns have been adapted from Xeoncross's awesome MicroMVC library. You'll need to include at least the mvc-stack
The other includes are standalone helper wrappers/classes, which you can include as needed.
Create a language file with the extension
.lang.php. It should contain a
$lang array variable, to which you add the label key and value.
Lang::load($file, $module, $rel)
sprintf( Lang::get('validation_required', $module), $field)which would return something like: The (VALUE_OF_$field) field is required and cannot be empty.
is the identifier used to refer to the language group - if omitted, will use the default lang file
is used to get the language file relative to this path -- use
__FILE__ to get from the
current-dir/ui/... folder, omit to use the default lang file.
Coming soon! There's a lot of stuff to cover - check out the files themselves, they should be decently documented.
Requires: 3.0 or higher
Compatible up to: 3.2.1
Last Updated: 4 years ago
Active Installs: Less than 10
Got something to say? Need help?