
內容簡介
這個外掛能夠輕鬆地在每篇文章中加入腳本和樣式表。這是開發人員為其客戶創建自定義頁面的優秀工具,同時也適用於博主將內聯 CSS 和 JS 與其文章內容分離的需求。
這個外掛提供了wp_enqueue_script與wp_enqueue_style函數的介面,因此這個外掛具備了開發人員在它們原先使用的所有功能。
然而,這個外掛不同於wp_localize_script的腳本本地化功能,因為在這個外掛中,您可以輸入原始的JavaScript代碼,用於腳本本地化、庫初始化等。
此外,這個外掛還可以幫助解決現代瀏覽器的XSS檢測可能會阻止潛在不安全JavaScript的問題。
外掛標籤
開發者團隊
原文外掛簡介
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.
