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

Customizer Responsive Server-Side Components Device Preview

説明

Read full writeup: 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). 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. Pull requests welcome. Please see issues reported there before going to the plugin forum.

評価

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

貢献者と開発者

Customizer Responsive Server-Side Components Device Preview はオープンソースソフトウェアです。以下の人々がこのプラグインに貢献しています。

貢献者

“Customizer Responsive Server-Side Components Device Preview” をあなたの言語に翻訳しましょう。

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

コードを閲覧するか、SVN リポジトリをチェックするか、開発ログRSS で購読してみてください。

変更履歴

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.