开发者 | celloexpressions |
---|---|
更新时间 | 2024年7月13日 09:42 |
PHP版本: | 4.0 及以上 |
WordPress版本: | 6.6 |
版权: | GPLv2 |
option
. Prior to WordPress 4.7 (which introduced additional CSS in core), theme-specific CSS was stored as a theme_mod
, in 4.7 and newer this is migrated to the core CSS functionality (which is theme-specific).
/wp-content/plugins/
directoryTheme CSS was stored as a theme_mod
prior to WordPress 4.7, meaning it is a theme-specific option, part of the theme_mods_$theme option in the database. Each theme has its own theme_mod
for the custom CSS, so if you switch to a new theme, the theme-specific custom CSS will be empty. When you switch back to a previously customized theme, the CSS that you added to it will still be there. In WordPress 4.7 and newer this plugin migrates to the core CSS functionality for theme-specific CSS, which is stored with a custom post type.
Plugin CSS is stored as a regular option
in the database. It is used for every theme, so it's best used for things that are plugin-related or anything else you want to persist between different themes.
The Customizer features many improvements in WordPress 4.0, including the textarea control type that this plugin uses. WordPress 4.9 is recommended, as it includes the new CSS editor with syntax highlighting and other features.
edit_css
capability introduced in WordPress 4.7. As a result, multisite networks will need to provide this capability to site administrators for them to be able to access CSS now.