Title: isMobile() Shortcode for WordPress
Author: Jairo Ochoa
Published: <strong>2018 年 11 月 5 日</strong>
Last modified: 2025 年 8 月 30 日

---

搜索插件

![](https://ps.w.org/ismobile/assets/banner-772x250.jpg?rev=2967982)

![](https://ps.w.org/ismobile/assets/icon-256x256.png?rev=1969189)

# isMobile() Shortcode for WordPress

 作者：[Jairo Ochoa](https://profiles.wordpress.org/jairoochoa/)

[下载](https://downloads.wordpress.org/plugin/ismobile.zip)

 * [详情](https://cn.wordpress.org/plugins/ismobile/#description)
 * [评价](https://cn.wordpress.org/plugins/ismobile/#reviews)
 *  [安装](https://cn.wordpress.org/plugins/ismobile/#installation)
 * [开发进展](https://cn.wordpress.org/plugins/ismobile/#developers)

 [支持](https://wordpress.org/support/plugin/ismobile/)

## 描述

This plugin works with the open source [Mobile Detect Library](http://mobiledetect.net).
You can get further information on its website.

    ```
    [ismobile device='iphone' debug=true ] Your content [/ismobile]
    ```

#### Parameters

 1. _device_: Filters the device where you want the content to be shown. It could be
    more than one device, simply separate them with comma.
 2. _debug_: Shows Mobile Detect Library installed version. Also shows two arrays. 
    The first one contains the devices which the library detects and the second one
    contains the devices where you want to show the content.

#### Values

 * _android_: Shows content in Android devices.
 * _chrome_: Shows content on Chrome browser (Only works on mobile devices).
 * _desktop_: Shows content on a computer. Opposite to mobile option.
 * _ios_: Shows content in iOS devices.
 * _ipad_: Shows content on a iPad.
 * _iphone_: Shows content on a iPhone.
 * _mobile_: Shows content on a mobile device (includes tablets and cell phones).
   Opposite to desktop option.
 * _phone_: Shows content on a cell phone.
 * _safari_: Shows content on Safari browser (Only works on mobile devices).
 * _samsung_: Shows content on Samsung devices.
 * _tablet_: Shows content on a tablet.

## 安装

This section describes how to install the plugin and get it working.

 1. Upload the entire plugin folder to the /wp-content/plugins/ directory.
 2. Activate the plugin through the “Plugins” menu in WordPress.
 3. Go to Plugins -> isMobile() to read plugin’s help page.

#### Minimum Requirements

 * PHP version 7.4 or greater

## 评价

![](https://secure.gravatar.com/avatar/bd32ec9cd108d4da374f25e02a072568ef20be167ffcc318d2ca620be1435ec0?
s=60&d=retro&r=g)

### 󠀁[Works great!](https://wordpress.org/support/topic/works-great-9695/)󠁿

 [apollosk](https://profiles.wordpress.org/apollosk/) 2025 年 10 月 8 日

Thank you for this useful plugin. Kudos to the developers!

![](https://secure.gravatar.com/avatar/c199b0f847ab4af840a1952c0ae7d4f6f73270b9fe5d9efc629baefc82e697d4?
s=60&d=retro&r=g)

### 󠀁[Super Sache!](https://wordpress.org/support/topic/super-sache-7/)󠁿

 [vegisto](https://profiles.wordpress.org/vegisto/) 2025 年 1 月 27 日

Wunderbar.Auch das mit dem DEBUG ist sehr hilfreich.Das erspart mir jetzt die Konfiguration
über CSS. Danke dafür.

![](https://secure.gravatar.com/avatar/53711ab6a50a2cad6700b40f6a5206c12b6f5fae9ced752977a11692d3321e29?
s=60&d=retro&r=g)

### 󠀁[Fantastic](https://wordpress.org/support/topic/fantastic-2610/)󠁿

 [Josh Willett](https://profiles.wordpress.org/joshwillett/) 2020 年 10 月 22 日

Works a treat to show information based on android or ios. thank you.

 [ 阅读所有3条评价 ](https://wordpress.org/support/plugin/ismobile/reviews/)

## 贡献者及开发者

「isMobile() Shortcode for WordPress」是开源软件。 以下人员对此插件做出了贡献。

贡献者

 *   [ Jairo Ochoa ](https://profiles.wordpress.org/jairoochoa/)
 *   [ dixitalmedia ](https://profiles.wordpress.org/dixitalmedia/)

「isMobile() Shortcode for WordPress」插件已被翻译至 4 种本地化语言。 感谢[所有译者](https://translate.wordpress.org/projects/wp-plugins/ismobile/contributors)
为本插件所做的贡献。

[帮助将「isMobile() Shortcode for WordPress」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/ismobile)

### 对开发感兴趣吗?

您可以[浏览代码](https://plugins.trac.wordpress.org/browser/ismobile/)，查看[SVN仓库](https://plugins.svn.wordpress.org/ismobile/)，
或通过[RSS](https://plugins.trac.wordpress.org/log/ismobile/?limit=100&mode=stop_on_copy&format=rss)
订阅[开发日志](https://plugins.trac.wordpress.org/log/ismobile/)。

## 更新日志

#### 1.1.2

 * Updated last WordPress version tested
 * Security fixes

#### 1.1.1

 * Mobile Detect Library downgrade to Version 2.8.41

#### 1.1

 * Updated last WordPress version tested
 * Mobile Detect Library updated to Version 3.74.0
 * Minimum PHP version: 7.4

#### 1.0.3

 * Updated last WordPress version tested

#### 1.0.2

 * Mobile Detect Library updated to Version 2.8.39

#### 1.0.1

 * Mobile Detect Library updated to Version 2.8.34

#### 1.0

 * Initial Release

## 额外信息

 *  版本 **1.1.2**
 *  最后更新：**9 月前**
 *  活跃安装数量 **100+**
 *  WordPress 版本 ** 4.5 或更高版本 **
 *  已测试的最高版本为 **6.8.5**
 *  PHP 版本 ** 7.4 或更高版本 **
 *  语言
 * [Basque](https://eu.wordpress.org/plugins/ismobile/) 、 [English (US)](https://wordpress.org/plugins/ismobile/)、
   [Galician](https://gl.wordpress.org/plugins/ismobile/) 、 [Spanish (Chile)](https://cl.wordpress.org/plugins/ismobile/)
   和 [Spanish (Spain)](https://es.wordpress.org/plugins/ismobile/).
 *  [翻译成简体中文](https://translate.wordpress.org/projects/wp-plugins/ismobile)
 * 标签
 * [desktop](https://cn.wordpress.org/plugins/tags/desktop/)[ipad](https://cn.wordpress.org/plugins/tags/ipad/)
   [iphone](https://cn.wordpress.org/plugins/tags/iphone/)[mobile](https://cn.wordpress.org/plugins/tags/mobile/)
   [tablet](https://cn.wordpress.org/plugins/tags/tablet/)
 *  [高级视图](https://cn.wordpress.org/plugins/ismobile/advanced/)

## 评级

 5 星（最高 5 星）。

 *  [  3 条 5 星评价     ](https://wordpress.org/support/plugin/ismobile/reviews/?filter=5)
 *  [  0 条 4 星评价     ](https://wordpress.org/support/plugin/ismobile/reviews/?filter=4)
 *  [  0 条 3 星评价     ](https://wordpress.org/support/plugin/ismobile/reviews/?filter=3)
 *  [  0 条 2 星评价     ](https://wordpress.org/support/plugin/ismobile/reviews/?filter=2)
 *  [  0 条 1 星评价     ](https://wordpress.org/support/plugin/ismobile/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/ismobile/reviews/#new-post)

[查看全部评论](https://wordpress.org/support/plugin/ismobile/reviews/)

## 贡献者

 *   [ Jairo Ochoa ](https://profiles.wordpress.org/jairoochoa/)
 *   [ dixitalmedia ](https://profiles.wordpress.org/dixitalmedia/)

## 支持

有话要说吗？是否需要帮助？

 [查看支持论坛](https://wordpress.org/support/plugin/ismobile/)