Title: Customizer Responsive Server-Side Components Device Preview
Author: Weston Ruter
Published: <strong>2016 年 10 月 29 日</strong>
Last modified: 2017 年 11 月 9 日

---

搜尋外掛

這個外掛**並未在最新的 3 個 WordPress 主要版本上進行測試**。開發者可能不再對這個
外掛進行維護或提供技術支援，並可能會與更新版本的 WordPress 產生使用上的相容性問題。

![](https://s.w.org/plugins/geopattern-icon/customizer-responsive-device-preview.
svg)

# Customizer Responsive Server-Side Components Device Preview

 由 [Weston Ruter](https://profiles.wordpress.org/westonruter/) 開發

[下載](https://downloads.wordpress.org/plugin/customizer-responsive-device-preview.0.1.1.zip)

 * [詳細資料](https://tw.wordpress.org/plugins/customizer-responsive-device-preview/#description)
 * [使用者評論](https://tw.wordpress.org/plugins/customizer-responsive-device-preview/#reviews)
 * [開發資訊](https://tw.wordpress.org/plugins/customizer-responsive-device-preview/#developers)

 [技術支援](https://wordpress.org/support/plugin/customizer-responsive-device-preview/)

## 外掛說明

Read full writeup: [Previewing Themes with Adaptive Designs in the Customizer](https://make.xwp.co/2016/10/29/previewing-themes-with-adaptive-designs-in-the-customizer/).

This plugin extends the responsive device preview functionality in the customizer
which was added in 4.5 (see [#31195](https://core.trac.wordpress.org/ticket/31195)).
In core when you change the previewed device it merely changes the dimensions of
the preview, allowing you to simulate how the theme will appear on tablet or mobile
screens. What it does not do, however, is cause the preview to reload with the `
User-Agent` overridden for the current device being previewed. For themes that implement
a responsive design this core behavior is just fine since changing the dimensions
of the iframe will cause the appropriate media queries to apply. However, if you
have an adaptive design for your theme you won’t be able to see any server-side 
components that it may display when viewing a different device. For example, on 
mobile devices a theme may want to skip outputting the sidebar altogether to save
on bandwidth.

This plugin will ensure that the preview is refreshed when the previewed device 
is changed in addition to changing the preview window size. It will pass a `customize_previewed_device`
query parameter on the URL being previewed, and this parameter will be either `desktop`,`
tablet`, or `mobile`. The plugin will override the `$_SERVER['HTTP_USER_AGENT']`
to be a user agent representative of the supplied device type so that calls to `
wp_is_mobile()`, `jetpack_is_mobile()`, and `Jetpack_User_Agent_Info::is_tablet()`
will all return the expected values based on the current previewed device.

**Development of this plugin is done [on GitHub](https://github.com/xwp/wp-customizer-responsive-device-preview).
Pull requests welcome. Please see [issues](https://github.com/xwp/wp-customizer-responsive-device-preview/issues)
reported there before going to the [plugin forum](https://wordpress.org/support/plugin/customizer-responsive-device-preview).**

## 使用者評論

這個外掛目前沒有任何使用者評論。

## 參與者及開發者

以下人員參與了開源軟體〈Customizer Responsive Server-Side Components Device Preview〉
的開發相關工作。

參與者

 *   [ Weston Ruter ](https://profiles.wordpress.org/westonruter/)
 *   [ XWP ](https://profiles.wordpress.org/xwp/)

[將〈Customizer Responsive Server-Side Components Device Preview〉外掛本地化為台灣繁體中文版](https://translate.wordpress.org/projects/wp-plugins/customizer-responsive-device-preview)

### 對開發相關資訊感興趣？

任何人均可[瀏覽程式碼](https://plugins.trac.wordpress.org/browser/customizer-responsive-device-preview/)、
查看 [SVN 存放庫](https://plugins.svn.wordpress.org/customizer-responsive-device-preview/)，
或透過 [RSS](https://plugins.trac.wordpress.org/log/customizer-responsive-device-preview/?limit=100&mode=stop_on_copy&format=rss)
訂閱[開發記錄](https://plugins.trac.wordpress.org/log/customizer-responsive-device-preview/)。

## 變更記錄

#### 0.1.1 [2017-11-01]

 * Update minimum required version of WordPress to 4.7.
 * Re-use `parseQueryString` from core.
 * Explicitly require PHP 5.3.
 * Clean up JS, upgrade dev-lib.

#### 0.1.0 [2016-10-05]

Initial release.

## 中繼資料

 *  版本 **0.1.1**
 *  最後更新 **9 年前**
 *  啟用安裝數 **70+**
 *  WordPress 版本需求 ** 4.7 或更新版本 **
 *  已測試相容的 WordPress 版本 **4.9.35**
 *  PHP 版本需求 ** 5.3 或更新版本 **
 *  語言
 * [English (US)](https://wordpress.org/plugins/customizer-responsive-device-preview/)
 * 標籤:
 * [adaptive](https://tw.wordpress.org/plugins/tags/adaptive/)[customize](https://tw.wordpress.org/plugins/tags/customize/)
   [customizer](https://tw.wordpress.org/plugins/tags/customizer/)[responsive](https://tw.wordpress.org/plugins/tags/responsive/)
   [rwd](https://tw.wordpress.org/plugins/tags/rwd/)
 *  [進階檢視](https://tw.wordpress.org/plugins/customizer-responsive-device-preview/advanced/)

## 評分

這個項目尚無任何評論記錄。

[撰寫評分](https://wordpress.org/support/plugin/customizer-responsive-device-preview/reviews/#new-post)

[查看全部使用者評論](https://wordpress.org/support/plugin/customizer-responsive-device-preview/reviews/)

## 參與者

 *   [ Weston Ruter ](https://profiles.wordpress.org/westonruter/)
 *   [ XWP ](https://profiles.wordpress.org/xwp/)

## 技術支援

使用者可在技術支援論壇提出意見反應或使用問題。

 [檢視技術支援論壇](https://wordpress.org/support/plugin/customizer-responsive-device-preview/)