Title: Detector
Author: steve.barnett
Published: <strong>2012年7月21日</strong>
Last modified: 2012年9月10日

---

プラグインを検索

このプラグインは **WordPress の最新3回のメジャーリリースに対してテストされていま
せん**。もうメンテナンスやサポートがされていないかもしれず、最新バージョンの WordPress
で使用した場合は互換性の問題が発生する可能性があります。

![](https://s.w.org/plugins/geopattern-icon/detector.svg)

# Detector

 作者: [steve.barnett](https://profiles.wordpress.org/stevebarnett-1/)

[ダウンロード](https://downloads.wordpress.org/plugin/detector.0.9.5.zip)

 * [詳細](https://ja.wordpress.org/plugins/detector/#description)
 * [レビュー](https://ja.wordpress.org/plugins/detector/#reviews)
 *  [インストール](https://ja.wordpress.org/plugins/detector/#installation)
 * [開発](https://ja.wordpress.org/plugins/detector/#developers)

 [サポート](https://wordpress.org/support/plugin/detector/)

## 説明

[Detector](http://detector.dmolsen.com/) is a simple, PHP- and JavaScript-based 
browser- and feature-detection library that can adapt to new devices & browsers 
on its own without the need to pull from a central database of browser information.

Also available on GitHub: [https://github.com/SteveBarnett/Detector](https://github.com/SteveBarnett/Detector).

Full documentation is available at [github / dmolsen / Detector](https://github.com/dmolsen/Detector/).

### To Do

 * Add some useful responsive image handling, in the style of [picturefill.js](https://github.com/scottjehl/picturefill/).
   Based on families at first?
 * Add functions for conditional loading of content via JS, depending on screen 
   size.
 * wp_enqueue_script for Modernizr
 * Check Modernizr version, custom
 * Add option to add own [feature tests](https://github.com/dmolsen/Detector/wiki/Detector-Test-Tutorial)
   from admin area?
 * Add option to add own [families](https://github.com/dmolsen/Detector/wiki/Detector-Family-Tutorial)
   from admin area?
 * Add shortcodes?

## インストール

 1. Go to Plugins > Add New, Upload and choose detector.zip.
 2. Activate the plugin.

## FAQ

  How do I use Detector?

In order to access the features you need to use the `$ua` object that is automatically
created with the inclusion of Detector in your application. Use the `$ua` object
in a similar way that you would have used the `Modernizr` object on the client-side:

    ```
    global $ua;

    // your script

    if ($ua->svg) {
        ...
    } elseif ($ua->canvas) {
        ...
    }
    ```

See the [full list of browser features](http://detector.dmolsen.com/demo/modernizr-listing/)
that are tested by Modernizr and available with Detector. All of the features tested
with [ua-parser-php](https://github.com/dmolsen/ua-parser-php) are also available
from the `$ua` variable (e.g. `$ua->isMobile` or `$ua->browserFull`)

Some features, (in particular `video`, `audio`, `input`, and `inputtypes`) have 
sub-features, so these are available as nested PHP objects:

    ```
    if ($ua->inputtypes->search) {
        print "<input type='search' ...";
    } else {
        print "<input type='text' ...";
    }
    ```

All features are returned as integer `1` or `0` for `true` or `false`, so they can
be used in logical evaluations in PHP. Sub-features can return `1`, `0`, or a real
value (e.g. screen width).

## 評価

このプラグインにはレビューがありません。

## 貢献者と開発者

Detector はオープンソースソフトウェアです。以下の人々がこのプラグインに貢献してい
ます。

貢献者

 *   [ steve.barnett ](https://profiles.wordpress.org/stevebarnett-1/)

[“Detector” をあなたの言語に翻訳しましょう。](https://translate.wordpress.org/projects/wp-plugins/detector)

### 開発に興味がありますか ?

[コードを閲覧](https://plugins.trac.wordpress.org/browser/detector/)するか、[SVN リポジトリ](https://plugins.svn.wordpress.org/detector/)
をチェックするか、[開発ログ](https://plugins.trac.wordpress.org/log/detector/)を
[RSS](https://plugins.trac.wordpress.org/log/detector/?limit=100&mode=stop_on_copy&format=rss)
で購読してみてください。

## 変更履歴

#### 0.9.5

Updated to match dmoslen’s current Detector

#### 0.8.5

Updated to match dmoslen’s current Detector

#### 0.8.2

Updated to match dmoslen’s current Detector

#### 0.8.1

 * Initial release. [regexes.yaml from 2012/07/12: 303c8f9](https://github.com/tobie/ua-parser/commit/303c8f905aa34110467cdfe730cf066ae6f6e18e#regexes.yaml)

## メタ

 *  バージョン **0.9.5**
 *  最終更新日 **14年前**
 *  有効インストール数 **10+**
 *  WordPress バージョン ** 3.0またはそれ以降 **
 *  検証済み最新バージョン: **3.0.5**
 *  言語
 * [English (US)](https://wordpress.org/plugins/detector/)
 * タグ
 * [detector](https://ja.wordpress.org/plugins/tags/detector/)[device](https://ja.wordpress.org/plugins/tags/device/)
   [modernizr](https://ja.wordpress.org/plugins/tags/modernizr/)
 *  [詳細を表示](https://ja.wordpress.org/plugins/detector/advanced/)

## 評価

レビューはまだ送信されていません。

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

[すべてのレビューを見る](https://wordpress.org/support/plugin/detector/reviews/)

## 貢献者

 *   [ steve.barnett ](https://profiles.wordpress.org/stevebarnett-1/)

## サポート

意見や質問がありますか ?

 [サポートフォーラムを表示](https://wordpress.org/support/plugin/detector/)