[wp-trac] [WordPress Trac] #33600: Add `theme_mods_{$stylesheet}` option during `populate_options()`
WordPress Trac
noreply at wordpress.org
Tue Mar 18 01:50:35 UTC 2025
#33600: Add `theme_mods_{$stylesheet}` option during `populate_options()`
-------------------------------------------------+-------------------------
Reporter: dlh | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Future
| Release
Component: Themes | Version:
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests needs- | Focuses:
testing-info |
-------------------------------------------------+-------------------------
Comment (by dlh):
The problem occurs when `get_theme_mod()` is called before
`set_theme_mod()` is, if it ever is. The behavior was described in more
detail in #14828, and it was fixed there for theme activations, but not
new installations.
The `wp_get_custom_css_post()` function, introduced in 4.7,
[https://github.com/WordPress/wordpress-
develop/blob/71732ba84e508d29ec35fb30e797653f5dd779e7/src/wp-
includes/theme.php#L2012 saves a theme mod], and since that function is
called regularly, the change proposed in this ticket has little practical
impact today, although I still think it's technically sound.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/33600#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list