Title: Device Detect
Author: Kleor
Published: <strong>2018 年 1 月 6 日</strong>
Last modified: 2025 年 12 月 15 日

---

搜索插件

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

# Device Detect

 作者：[Kleor](https://profiles.wordpress.org/kleor/)

[下载](https://downloads.wordpress.org/plugin/device-detect.2.0.1.zip)

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

 [支持](https://wordpress.org/support/plugin/device-detect/)

## 描述

Device Detect allows you to detect the device of the user, and to **easily insert**
into posts, pages and widgets of your website **some contents only for the phones,
tablets or computers**.

 * [Documentation](https://www.kleor.com/device-detect/)

### Plugins from the same author

 * [Commerce Manager, to sell your products](https://www.kleor.com/commerce-manager/en/)
 * [Affiliation Manager, to create your affiliate program](https://www.kleor.com/affiliation-manager/en/)
 * [Membership Manager, to create your members areas](https://www.kleor.com/membership-manager/en/)
 * [Optin Manager, to build your prospects lists](https://www.kleor.com/optin-manager/en/)
 * [Contact Manager, to create your contact forms](https://www.kleor.com/contact-manager/en/)
 * [Easy Timer, to display count down/up timers](https://www.kleor.com/easy-timer/en/)
 * [Content Switcher, to display random or variable contents](https://www.kleor.com/content-switcher/en/)

## 安装

You can install Device Detect through the “Add Plugins” page of the “Plugins” menu
in WordPress (Plugins => Add New => Upload Plugin). Upload the plugin file without
unzipping it. You can also install it like this:

 1. Unzip the plugin file.
 2. Upload with your FTP software the “device-detect” folder, and only this folder,
    to your plugins directory (it should be “wp-content/plugins”).

Once you have installed Device Detect, activate the plugin through the “Plugins”
menu in WordPress.

## 常见问题

### How can I use shortcodes in my WordPress theme?

Insert into the PHP files of your theme a code like this:

    ```
    <?php echo do_shortcode('[your-shortcode]'); ?>
    ```

### How to use shortcodes in comments?

Edit the “functions.php” file (create it if it doesn’t exist) of your WordPress 
theme and add this line of code:

    ```
    add_filter('comment_text', 'do_shortcode');
    ```

## 评价

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

### 󠀁[Very useful plugin to display content with different layouts](https://wordpress.org/support/topic/very-useful-plugin-to-display-content-with-different-layouts/)󠁿

 [multze](https://profiles.wordpress.org/multze/) 2025 年 7 月 7 日

‘Device Detect’ is a very easy and intuitive to use plugin to display content with
different layouts adapted for phone, tablet or computer display – depending on the
visitor’s device. Very useful!

 [ 阅读所有1条评价 ](https://wordpress.org/support/plugin/device-detect/reviews/)

## 贡献者及开发者

「Device Detect」是开源软件。 以下人员对此插件做出了贡献。

贡献者

 *   [ Kleor ](https://profiles.wordpress.org/kleor/)

「Device Detect」插件已被翻译至 1 种本地化语言。 感谢[所有译者](https://translate.wordpress.org/projects/wp-plugins/device-detect/contributors)
为本插件所做的贡献。

[帮助将「Device Detect」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/device-detect)

### 对开发感兴趣吗?

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

## 更新日志

 * Version 2.0.1
    - Fix a fatal error
 * Version 2.0
    - Remove the “mobile-detect.php” file
 * Version 1.4.6
    - Update the “mobile-detect.php” file
 * Version 1.4.5
    - Update the “mobile-detect.php” file
 * Version 1.4.4
    - Update the “mobile-detect.php” file
 * Version 1.4.3
    - Update the “mobile-detect.php” file
 * Version 1.4.2
    - Update the “mobile-detect.php” file
 * Version 1.4.1
    - Improve the security
 * Version 1.4
    - Use anonymous functions instead of “create_function”
 * Version 1.3
    - Update the “mobile-detect.php” file
 * Version 1.2
    - Update the “mobile-detect.php” file
 * Version 1.1
    - Update the “mobile-detect.php” file
 * Version 1.0
    - Initial version

## 额外信息

 *  版本 **2.0.1**
 *  最后更新：**6 月前**
 *  活跃安装数量 **20+**
 *  WordPress 版本 ** 4.6 或更高版本 **
 *  已测试的最高版本为 **6.9.4**
 *  PHP 版本 ** 5.3 或更高版本 **
 *  语言
 * [English (US)](https://wordpress.org/plugins/device-detect/) 和 [French (France)](https://fr.wordpress.org/plugins/device-detect/).
 *  [翻译成简体中文](https://translate.wordpress.org/projects/wp-plugins/device-detect)
 * 标签
 * [content](https://cn.wordpress.org/plugins/tags/content/)[detect](https://cn.wordpress.org/plugins/tags/detect/)
   [detection](https://cn.wordpress.org/plugins/tags/detection/)[device](https://cn.wordpress.org/plugins/tags/device/)
   [mobile](https://cn.wordpress.org/plugins/tags/mobile/)
 *  [高级视图](https://cn.wordpress.org/plugins/device-detect/advanced/)

## 评级

 5 星（最高 5 星）。

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

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

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

## 贡献者

 *   [ Kleor ](https://profiles.wordpress.org/kleor/)

## 支持

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

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

## 捐助

您愿意支持这个插件的发展吗?

 [ 捐助此插件 ](https://www.kleor.com/donation/)