[wp-trac] [WordPress Trac] #56078: PHP Warning when adding fonts to fontFamilies in wp_global_styles post
WordPress Trac
noreply at wordpress.org
Thu Nov 17 10:11:39 UTC 2022
#56078: PHP Warning when adding fonts to fontFamilies in wp_global_styles post
-----------------------------------+---------------------------------------
Reporter: domainsupport | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 6.2
Component: Editor | Version: 6.0
Severity: normal | Resolution:
Keywords: has-patch needs- | Focuses: administration, template
testing |
-----------------------------------+---------------------------------------
Comment (by domainsupport):
Sure ... so here's the post_content of a wp_global_styles post for
twentytwentytwo theme which successfully adds "La Belle Aurore" and "Open
Sans" to the Global Styles font family drop down ...
{{{
{"version":2,"isGlobalStylesUserThemeJSON":true,"settings":{"typography":{"fontFamilies":[{"fontFamily":"\"La
Belle Aurore\"","name":"La Belle Aurore","slug":"la-belle-
aurore"},{"fontFamily":"\"Open Sans\"","name":"Open Sans","slug":"open-
sans"},{"fontFamily":"\"Source Serif Pro\", serif","name":"Source Serif
Pro","slug":"source-serif-pro","fontFace":[{"fontFamily":"Source Serif
Pro","fontWeight":"200
900","fontStyle":"normal","fontStretch":"normal","src":["file:.\/assets\/fonts
\/source-serif-pro\/SourceSerif4Variable-
Roman.ttf.woff2"]},{"fontFamily":"Source Serif Pro","fontWeight":"200
900","fontStyle":"italic","fontStretch":"normal","src":["file:.\/assets\/fonts
\/source-serif-pro\/SourceSerif4Variable-Italic.ttf.woff2"]}]}]}}}
}}}
As soon as you have this in the database, the PHP notices will start.
Notice that default theme fonts are also in there.
Oliver
--
Ticket URL: <https://core.trac.wordpress.org/ticket/56078#comment:9>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list