Make WordPress Core


Ignore:
Timestamp:
10/02/2023 10:54:29 PM (20 months ago)
Author:
danielbachhuber
Message:

Editor: Prevent possibility of a fatal error when previewing block themes.

Ensures that preview callbacks attached to the stylesheet and template filters do not run before pluggable.php has been included. These callbacks need functionality from pluggable.php.

Props scruffian, johnbillion, SergeyBiryukov, okat, azaozz.
Merges [56529] and [56757] to the 6.3 branch.
Fixes #59000.

Location:
branches/6.3
Files:
1 edited
1 copied

Legend:

Unmodified
Added
Removed
  • branches/6.3

  • branches/6.3/tests/phpunit/tests/theme-previews.php

    r56529 r56758  
    1818    public function test_initialize_theme_preview_hooks() {
    1919        $_GET['wp_theme_preview'] = 'twentytwentythree';
    20         do_action( 'plugins_loaded' ); // Ensure `plugins_loaded` triggers `initialize_theme_preview_hooks`.
     20        do_action( 'plugins_loaded' ); // Ensure `plugins_loaded` triggers `wp_initialize_theme_preview_hooks`.
    2121
    2222        $this->assertEquals( has_filter( 'stylesheet', 'wp_get_theme_preview_path' ), 10 );
Note: See TracChangeset for help on using the changeset viewer.