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

Protocol Relative Theme Assets

外掛說明

This plugin transforms any registered, enqueued CSS or JavaScript URLs into their “protocol-relative” equivalent.

Consider the following examples:

Protocol Relative CSS URL

<link href="//example.com/wp-content/themes/twentytwelve/style.css" />

Protocol Relative Javascript URL

<script src="//example.com/wp-includes/js/jquery/jquery.js"></script>

More appropriately called a “network-path reference” or “scheme-relative path”, a protocol-relative URL helps to avoid common scenarios such as:

  • Broken SSL padlock icon in browser’s address bar when showing mixed HTTP/HTTPS content
  • Error message in Internet Explorer saying, “This Page Contains Both Secure and Non-Secure Items”
  • Serving HTTP assets when viewing HTTPS pages

The idea of using protocol-relative URLs was popularized by Paul Irish and has become common as sites switch between serving HTTP and HTTPS assets.

This plugin will standardize all properly enqueued theme files to use protocol-relative paths, even those added from third-party plugins.

Note: This plugin does not transform any image paths that may be embedded in the WordPress editor or output as featured images or elsewhere in the theme — it presently only works on enqueued CSS/JavaScript files.

安裝方式

  1. Activate the plugin through the Plugins menu in the WordPress admin.

使用者評論

2016 年 9 月 3 日
Life saving plugin. After moving to HTTPs, a lot of the assets from Masterslider broke and caused very broken looking homepages. Installation of this plugin fixed that, no configuration required. As fabian mentioned, this won't update the images on the site to pull from HTTPs.. but it's not designed to do that, and many images are hard coded by your CSS; so it's hardly fair to give this plugin less than 5 stars as it does exactly as it promises.
閱讀全部 2 則使用者評論

參與者及開發者

以下人員參與了開源軟體〈Protocol Relative Theme Assets〉的開發相關工作。

參與者

將〈Protocol Relative Theme Assets〉外掛本地化為台灣繁體中文版

對開發相關資訊感興趣?

任何人均可瀏覽程式碼、查看 SVN 存放庫,或透過 RSS 訂閱開發記錄

變更記錄

1.0

  • Initial release