TxTu Is Mobile
TxTu Is Mobile is a Wordpress plugin that enables you to check if a visitor of your Wordpress blog is using a mobile device like for instance a Nokia, Sony Ericsson or Motorola mobile phone.
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.

Download: txtu-is-mobile.zip
Current Version: 1.0.2
Updated: June 24, 2008
Size: 10.47 KB
Downloaded: 9 times
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 “TxTu 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.
How is it done
The 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.
If you need help just post a comment here and I’ll get back to you as soon as I can.






10+Wordpress手机插件 | 帕兰映像
[...] TxTu Is Mobile TxTu Is Mobile是一个Wordpress插件, 主要用来检测用户是否使用移动手机设备访问你的网站. [...]
Romoo
I want to show an interface designed for a mobile device when visitors come to my site on a mobile device, how to modify?
Can you give me an example?
thank you very much.
txtu
@romoo: you can create something like:
if (is_mobile()) {
Load a stylesheet for mobile phones
} else {
Load a stylesheet for a standard web browser
}