[WordPress] 外掛分享: Post Head Includes

首頁外掛目錄 › Post Head Includes
WordPress 外掛 Post Head Includes 的封面圖片
10+
安裝啟用
尚無評分
4634 天前
最後更新
問題解決
v0.2.1 上架:2013-05-13

內容簡介

這個外掛能夠輕鬆地在每篇文章中加入腳本和樣式表。這是開發人員為其客戶創建自定義頁面的優秀工具,同時也適用於博主將內聯 CSS 和 JS 與其文章內容分離的需求。

這個外掛提供了wp_enqueue_script與wp_enqueue_style函數的介面,因此這個外掛具備了開發人員在它們原先使用的所有功能。

然而,這個外掛不同於wp_localize_script的腳本本地化功能,因為在這個外掛中,您可以輸入原始的JavaScript代碼,用於腳本本地化、庫初始化等。

此外,這個外掛還可以幫助解決現代瀏覽器的XSS檢測可能會阻止潛在不安全JavaScript的問題。

外掛標籤

開發者團隊

⬇ 下載最新版 (v0.2.1) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「Post Head Includes」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

Easily add scripts and stylesheets per post. This is a great tool for developers creating custom pages for their clients, but also useful for the blogger who wants to separate inline CSS & JS from their post content.
This plugin provides an interface for wp_enqueue_script and wp_enqueue_style functions, so all of the functionality that a developer would find there is available in this plugin.
However, script localization differs from wp_localize_script in that with this plugin you are allowed to input raw JavaScript code for localization, library initialization, and more.
This plugin may also help to alleviate modern browser XSS detection from blocking potentially unsafe JavaScript.

延伸相關外掛

文章
Filter
Mastodon