mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-07 10:40:11 +00:00
Install: Prevent DB errors caused by web fonts API.
Bypass checking `theme.json` for web fonts during the installation of WordPress. During installation the active theme is considered to be Twenty Twenty-Two (the default theme). As a block theme this prompts a database call when the web fonts API checks the `theme.json` settings, this triggers a database error during installation as the database tables do not exist. Props chouby, costdev, peterwilsoncc, sergeybiryukov. Fixes #55632. git-svn-id: https://develop.svn.wordpress.org/trunk@53306 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -3057,6 +3057,11 @@ function wp_enqueue_block_style( $block_name, $args ) {
|
||||
* @access private
|
||||
*/
|
||||
function _wp_theme_json_webfonts_handler() {
|
||||
// Block themes are unavailable during installation.
|
||||
if ( wp_installing() ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Webfonts to be processed.
|
||||
$registered_webfonts = array();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user