Make WordPress Core

Changeset 53306


Ignore:
Timestamp:
04/29/2022 03:48:48 AM (3 years ago)
Author:
peterwilsoncc
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/script-loader.php

    r53296 r53306  
    30583058 */
    30593059function _wp_theme_json_webfonts_handler() {
     3060    // Block themes are unavailable during installation.
     3061    if ( wp_installing() ) {
     3062        return;
     3063    }
     3064
    30603065    // Webfonts to be processed.
    30613066    $registered_webfonts = array();
Note: See TracChangeset for help on using the changeset viewer.