
內容簡介
針對基於Genesis Framework的子佈景主題,根據 JavaScript 是否啟用,讓前端樣式更容易編輯。
在前端加入一個 no-js 身體類別,以及在 genesis_before 上加入一個腳本,若 JavaScript 啟用,則立即將類別更改為 js。
這是 WP 在後端做事情的方式,讓您可以針對相同的元素,根據 JavaScript 是否啟用,使用不同的樣式。
此外掛僅有在您使用 Genesis Framework 的子佈景主題時才有用,因為它使用了 genesis_before 鉤子。
外掛標籤
開發者團隊
原文外掛簡介
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.
