Provides a foundation and extensions for/to common WordPress developer functions or tasks, such as creating and installing plugins, making complex database queries, etc.
Includes – MVC
- common helpful functions:
** v (if isset use value else default)
** kv (non-destructive version of v)
** h (htmlspecialchars)
** str (check if string)
** post/get (wrapper for $_GET, $_POST or default),
** server ($_SERVER wrapper)
** url (returns current url path, optionally parsed by segment)
** mvc_filepath (get include path to mvc file)
- error handling + debugging template
- html wrapper functions
- language functions (more like loading reusable labels)
- form + validation
- the mvc stack itself
Includes – Etc
- custom exception class – extend this for easier catching
- HtmlRenderer – not actually sure this is used anywhere, it allows for the plugin-pattern to render html
- inflector – for singularizing/pluralizing stuff
- Singleton – extend this for singleton/factor instance
- states_and_countries – gives an array of states and countries
- wp_options_page – wrapper object for creating option pages
- wp_page_builder – wrapper object for creating WP pages
- wp_pagination – wrapper object for creating “1 – XYZ…” pagination links
- wp_plugin_installer – wrapper object for handling plugin installation actions – (un)install, (de)activate, upgrade
- wp_plugin_shell – extend this when making a plugin to get access to commonly used stuff for plugins
- wp_querybuilder – use this chainable object to create mysql queries, built-in
From About AtlanticBT.
Atlantic Business Technologies, Inc. has been in existence since the relative infancy of the Internet. Since March of 1998, Atlantic BT has become one of the largest and fastest growing web development companies in Raleigh, NC. While our original business goal was to develop new software and systems for the medical and pharmaceutical industries, we quickly expanded into a business that provides fully customized, functional websites and Internet solutions to small, medium and larger national businesses.
Our President, Jon Jordan, founded Atlantic BT on the philosophy that Internet solutions should be customized individually for each client’s specialized needs. Today we have expanded his vision to provide unique custom solutions to a growing account base of more than 600 clients. We offer end-to-end solutions for all clients including professional business website design, e-commerce and programming solutions, business grade web hosting, web strategy and all facets of internet marketing.
Who We Are
The Atlantic BT Team is made up of friendly and knowledgeable professionals in every department who, with their own unique talents, share a wealth of industry experience. Because of this, Atlantic BT always has a specialist on hand to address each client’s individual needs. Due to the fact that the industry is constantly changing, all of our specialists continuously study the latest trends in all aspects of internet technology. Thanks to our ongoing research in the web designing, programming, hosting and internet marketing fields, we are able to offer our clients the most recent and relevant ideas, suggestions and services.
- How do I include files?
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_Basethat exposes “hook” wrappers
add_hook_with, which internally call
add_filterusing a class function of the same name as a callback, so you don’t need to declare
- What’s the difference between the `mvc` files and `includes` files?
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.
- How do I use the Lang class for labels?
Create a language file with the extension
.lang.php. It should contain a
$langarray variable, to which you add the label key and value.
- Include the language helper
- load your label file with
Lang::load($file, $module, $rel)
then reference your label like:
sprintf( Lang::get(‘validation_required’, $module), $field)
which would return something like:
The (VALUE_OF_$field) field is required and cannot be empty.
$module is the identifier used to refer to the language group – if omitted, will use the default lang file
$rel 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.
- Include the language helper
- How do I do XYZ?
Coming soon! There’s a lot of stuff to cover – check out the files themselves, they should be decently documented.
- Fixed some conflicts between Custom User Registration and WP-Library plugins
- more authors
- turned into a plugin
- not totally tested all files
- form validation
- lang (labels)
- mvc stub
- shared stuff