The plugin is extensible enough to allow the inclusion of other mobile devices. You can also turn off mobile device checking by enabling or disabling it in the plugin’s configuration screen.
How is it done
The Kih is_mobile plugin works by comparing the “user agent” string of the browser of your blog’s visitor. If any one of the strings you inputted in the “Mobile Browser Strings” parameter is found in the visitor’s user agent string then the
is_mobile() function of the plugin returns TRUE. Otherwise it returns FALSE.
You can use the
is_mobile() function in your WordPress theme to check if the visitor is a mobile user and perform actions based on the function’s return value (e.g. load a different stylesheet for mobile browsers, load an image with a different size for mobile devices …) The possibilities are limitless, just use your imagination.
Installing the plugin
The procedure for installing the plugin is the same as any WordPress plugin. Just unzip the file into the /wp-content/plugins/ directory. Then go to the WordPress Admin panel and click on “Plugins”. From the list of plugins look for the plugin named “Kih is_mobile”. Click on the “Activate” link to enable the plugin.
Once the plugin is enabled, go to “Settings / is_mobile()”. There are currently two options that you can configure.
The first option enables or disables the plugin. The other option is a comma separated list of strings that is tested to identify your blog’s visitor. You need to update the list to include the unique string that will identify the different mobile browsers that visit your site. Don’t worry about creating a complete list. You can always add them later.
[drain file 2 show plugindownload]