[WordPress] 外掛分享: Genesis JS / No JS

首頁外掛目錄 › Genesis JS / No JS
WordPress 外掛 Genesis JS / No JS 的封面圖片
100+
安裝啟用
★★★★★
5/5 分(2 則評價)
3030 天前
最後更新
問題解決
WordPress 4.6+ PHP 7.0+ v3.2.1 上架:2011-05-23

內容簡介

針對基於Genesis Framework的子佈景主題,根據 JavaScript 是否啟用,讓前端樣式更容易編輯。

在前端加入一個 no-js 身體類別,以及在 genesis_before 上加入一個腳本,若 JavaScript 啟用,則立即將類別更改為 js。
這是 WP 在後端做事情的方式,讓您可以針對相同的元素,根據 JavaScript 是否啟用,使用不同的樣式。

此外掛僅有在您使用 Genesis Framework 的子佈景主題時才有用,因為它使用了 genesis_before 鉤子。

外掛標籤

開發者團隊

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

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

原文外掛簡介

Make front end styling easier for child themes on the Genesis Framework based on whether JavaScript is enabled or not.
Adds a no-js body class to the front end, and a script on genesis_before which immediately changes the class to js if JavaScript is enabled.
This is how WP does things on the back end, to allow different styles for the same elements depending if JavaScript is active or not.
This plugin is only useful if you’re using a child theme of the Genesis Framework since it uses the genesis_before hook.

延伸相關外掛

文章
Filter
Mastodon