Extending the WP MobileAdmin Plugin : Section 1
The WordPress MobileAdmin plugin is designed to support a wide range of mobile browsers by default, and additionally serve more “rich” features or styles to browsers that support them, by means of a plugin system within the MobileAdmin plugin, similar to the approach used by Spam Karma 2.
Auto-loading
Plugins are automatically loaded according to whether the client device’s user agent matches what is described in the plugin (more on this matching later). If no plugins are found that match the user agent, then the default plugin will be checked to see if a match is found there. No additional configuration or registration is necessary - plugins in the appropriate directory will be loaded and used if they match.
The default plugin will match all the browsers listed in Alex King’s Mobile Edition plugin, and serve a page that’s suitable for use on most devices with limited capabilities (various phones, etc.).
Any device covered by the default plugin (or even ones that aren’t) can receive special handling by defining a plugin that matches the user agent string for that particular device. If there is overlap (ie: a device is covered by a custom plugin as well as the default plugin) the custom plugin will always be loaded.
File and Directory Structure
MobileAdmin comes bundled by default with plugins supporting the iPhone / iPod Touch devices, as well as Windows Mobile phones. These can both be used as reference implementations for building your own plugins if you desire.
You will find these plugins under the mobile_plugins directory within MobileAdmin plugin directory. Each plugin should reside within it’s own directory, and must contain one php file which will conform to the structure of the plugin (as seen in the included samples). The plugin directories may also contain optional css, js, and images directories, which should be used to contain those types of files if you want to include them with your plugin.