[WordPress] 外掛分享: Scripts n Styles

WordPress 外掛 Scripts n Styles 的封面圖片。

前言介紹

  • 這款 WordPress 外掛「Scripts n Styles」是 2010-09-03 上架。
  • 目前有 30000 個安裝啟用數。
  • 上一次更新是 2023-06-06,距離現在已有 697 天。超過一年沒更新,安裝要確認版本是否可用。以及後續維護問題!
  • 外掛最低要求 WordPress 5.0 以上版本才可以安裝。
  • 外掛要求網站主機運作至少需要 PHP 版本 7.4 以上。
  • 有 28 人給過評分。
  • 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。

外掛協作開發者

captainn | wraithkenny |

外掛標籤

css | code | admin | custom | javascript |

內容簡介

這個外掛讓管理員用戶能夠將自訂的 CSS 和 JavaScript 直接添加到個別文章、頁面或任何註冊的自訂文章類型中,也可以將類別添加到 body 標籤和文章容器中。還有一個全局設置頁面,可以為整個博客編寫 Scripts n Styles。

管理員還可以將類別添加到 TinyMCE「格式」下拉菜單中,用戶可以直接對文章和頁面進行樣式設置。自 Scripts n Styles 3+ 版本起,樣式將反映在文章編輯器中。

因為只有受信任的用戶才應該被允許直接插入 JavaScript 到您的網站頁面中,因此此插件限制了僅允許管理員使用。管理員根據定義可以訪問更加敏感的區域,所以相對安全😉

實現筆記:

管理員用戶,更具體地說,任何具有 manage_options 和 unfiltered_html 能力的用戶(默認情況下僅是管理員類型用戶)可以使用此插件的功能。某些插件擴展用戶角色,因此此插件自然擴展包括具有適當的能力的角色。
CSS樣式嵌入到 head 元素底部,使用 style 標籤,並使用 wp-head。如果您的佈題沒有此掛鈎,則此插件(以及大多數其他插件)將無法正常工作。
JavaScript 嵌入到 body(或 head)元素底部,使用 script 標籤,並使用 wp-footer(或 wp-head)。如果您的佈題沒有此掛鈎,則此插件(以及大多數其他插件)將無法正常工作。
沒有輸入驗證。此插件將您在元框中輸入的內容直接放入 html 中,並且沒有錯誤檢查。您是管理員,我們相信您會小心使用。請不要弄壞任何東西。
由於使用庫的許可證,如果您關心這些事情,則此插件發布為「GPL 3.0 或更高版本」。

原文外掛簡介

This plugin allows Admin users the ability to add custom CSS and JavaScript directly into individual Post, Pages or any other registered custom post types. You can also add classes to the body tag and the post container. There is a Global settings page for which you can write Scripts n Styles for the entire blog.
Admin’s can also add classes to the TinyMCE “Formats” dropdown which users can use to style posts and pages directly. As of Scripts n Styles 3+ styles are reflected in the post editor.
Because only well trusted users should ever be allowed to insert JavaScript directly into the pages of your site, this plugin restricts usage to admin type users. Admin’s have access to even more sensitive areas by definition, so that should be relatively safe 😉
Notes about the implementation:

Admin users, or more specifically, any user with the manage_options and unfiltered_html capabilities (which by default is only the admin type user) can use this plugin’s functionality. Some plugins extend user rolls, and so this plugin would naturally extend include rolls that have the appropriate capability.
CSS Styles are embeded, not linked, at the bottom of the head element with style tags by using wp-head. If your theme doesn’t have this hook, this plugin (as well as most others) won’t work.
JavaScript is embeded, not linked, at the bottom of the body (or head) element with script tags by using wp-footer (or wp-head). If your theme doesn’t have this hook, this plugin (as well as most others) won’t work.
There is no input validation. This plugin puts exactly what you type in the meta box directly into the html with no error checking. You are an Admin, and we trust you to be carefull. Try not to break anything.
Do to the licensing of the libraries used, this plugin is released “GPL 3.0 or later” if you care about those things.

各版本下載點

  • 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
  • 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「Scripts n Styles」來進行安裝。

(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。


2 | 3 | 1.0 | 2.0 | 3.0 | 3.1 | 3.2 | 3.3 | 3.5 | 1.0.1 | 1.0.2 | 2.0.1 | 2.0.2 | 2.0.3 | 2.0.4 | 3.0.1 | 3.0.2 | 3.0.3 | 3.1.1 | 3.2.1 | 3.3.1 | 3.3.2 | 3.4.0 | 3.4.1 | 3.4.2 | 3.4.3 | 3.4.4 | 3.4.5 | 3.5.1 | 3.5.2 | 3.5.3 | 3.5.4 | 3.5.5 | 3.5.6 | 3.5.7 | 3.5.8 | trunk | 2.0.1.1 |

延伸相關外掛(你可能也想知道)

  • WPCode – Insert Headers and Footers + Custom Code Snippets – WordPress Code Manager 》插入標頭和頁腳 + 完整的 WordPress 代碼片段外掛, WPCode (前稱为 WPBeginner 的 "插入標頭和頁腳")是使用率超过 100 万个网站的 WordPress 代码片段外掛中...。
  • Code Snippets 》Code Snippets 是在您的網站上運行程式碼片段的簡單,清潔和簡單的方法。它消除了將自定義片段添加到您的佈景主題的 functions.php 檔案的需求。, 現在提供 C...。
  • Simple Custom CSS Plugin 》無需麻煩地將自訂 CSS 新增到 WordPress 網站中。, 這是一個易於使用的 WordPress 外掛,可以添加自訂 CSS 樣式以覆寫外掛和佈景主題的預設樣式。該外掛旨在...。
  • Shortcoder — Create Shortcodes for Anything 》Shortcoder 外掛可讓您建立 HTML、JavaScript、CSS 和其他代碼片段的自訂捷徑。現在,這些捷徑可以在文章/頁面中使用,並且該片段將取代其位置。, ✍ 輕鬆建立...。
  • Head & Footer Code 》Head & Footer Code 插件可以讓你在不是開發人員的情況下,添加自定義代碼片段(JavaScript、CSS 或 HTML)到網頁中。您可以將代碼放置在 (...。
  • SyntaxHighlighter Evolved 》現在支援 WordPress 5.0 中的新區塊編輯器!, SyntaxHighlighter Evolved 讓您可以輕鬆地在網站上張貼帶有語法加亮功能的程式碼,而不會失去格式或做任何手動...。
  • Code Embed 》注意: WordPress 5.0 及以上版本的使用者請查看常見問題以了解如何在區塊編輯器中使用此外掛。, Code Embed 外掛允許您在文章中嵌入程式碼(JavaScript 和 H...。
  • PHP Everywhere 》注意:此外掛更新至 3.0.0 版本是一項重大變更,將移除 [php_everywhere] 短代碼和小工具。請透過外掛設定頁面中的升級嚮導,將原本的代碼轉換為 Gutenberg ...。
  • Highlighting Code Block 》「Highlighting Code Block」外掛可讓你以一個點擊的方式添加一個有語法突顯的程式碼區塊。, 它支援「區塊編輯器」和「傳統編輯器」。, (不過,我們建議在「...。
  • CSS & JavaScript Toolbox 》感謝您查看我們的程式碼片段外掛。我相信它將完全符合您的需求。, 適用於以下情況:, , 前端修改(無需修改主題文件), 添加功能(無需修改functions.php), ...。
  • Advance Custom HTML 》這是一款用來專業編寫 HTML 代碼的高級 HTML 編輯器,提供不同的樣式、縮排與更多功能。, Advance Custom HTML 是一款功能強大、彈性十足的區塊外掛,讓您可...。
  • Code Block Pro – Beautiful Syntax Highlighting 》展示你美麗的程式碼,不僅僅是顯示它!這個版塊外掛提供編輯程式碼塊的功能,直接運行你的程式碼,使用與受歡迎的 VS Code 編輯器相同的渲染引擎。此外掛提供...。
  • Code Syntax Block 》代碼語法區塊(Code Syntax Block)擴充了 WordPress 區塊編輯器,使用 Prism 語法高亮工具為核心代碼區塊添加了語法高亮支持。, Prism 語法高亮工具在前端執...。
  • Foxtool All-in-One: Contact chat button, Custom login, Media optimize images 》總結:Foxtool 是根據管理 WordPress 網站的真實需求而開發的產品。經過一段時間的發展,Foxtool 已成為網站管理員不可或缺的外掛程式。該外掛擁有許多值得注...。
  • Advanced CSS Editor 》Advanced CSS Editor 是一個輕量級的外掛,它讓你可以在即時編輯器中為不同設備(桌面、平板、手機)撰寫不同的 CSS 代碼,並且可以即時查看結果。, 因此,只...。

文章
Filter
Apply Filters
Mastodon