Make WordPress Core

Changeset 58308


Ignore:
Timestamp:
06/03/2024 09:23:48 PM (6 months ago)
Author:
costdev
Message:

Upgrade/Install: Don't toggle maintenance mode on translation updates.

The Rollback Auto-Update feature introduced additional maintenance mode toggling.

After installing WordPress in a non-English (US) language, translation updates are performed automatically. As there may be a large number of updates for Core and bundled themes, users will be presented with a maintenance notice upon visiting the newly installed website.

To avoid concerning users that the website has failed to install correctly, this excludes translation updates from triggering the additional maintenance mode toggling.

Follow-up to [58128].

Props benniledl, afragen, rajinsharwar, costdev.
Fixes #61260. See #58281.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-automatic-updater.php

    r58285 r58308  
    471471         * the scrape to miss a fatal error in the plugin update.
    472472         */
    473         $upgrader->maintenance_mode( true );
     473        if ( 'translation' !== $type ) {
     474            $upgrader->maintenance_mode( true );
     475        }
    474476
    475477        // Boom, this site's about to get a whole new splash of paint!
     
    496498         * or while files are still being moved.
    497499         */
    498         $upgrader->maintenance_mode( true );
     500        if ( 'translation' !== $type ) {
     501            $upgrader->maintenance_mode( true );
     502        }
    499503
    500504        // If the filesystem is unavailable, false is returned.
     
    614618
    615619        // All processes are complete. Allow visitors to browse the site again.
    616         $upgrader->maintenance_mode( false );
     620        if ( 'translation' !== $type ) {
     621            $upgrader->maintenance_mode( false );
     622        }
    617623
    618624        $this->update_results[ $type ][] = (object) array(
Note: See TracChangeset for help on using the changeset viewer.