Changeset 52593
- Timestamp:
- 01/17/2022 10:40:51 PM (3 years ago)
- Location:
- trunk/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/edit-form-blocks.php
r52409 r52593 28 28 $current_screen = get_current_screen(); 29 29 $current_screen->is_block_editor( true ); 30 31 // Load block patterns from w.org. 32 _load_remote_block_patterns(); 33 _load_remote_featured_patterns(); 30 34 31 35 // Default to is-fullscreen-mode to avoid jumps in the UI. -
trunk/src/wp-admin/site-editor.php
r52372 r52593 31 31 $current_screen = get_current_screen(); 32 32 $current_screen->is_block_editor( true ); 33 34 // Load block patterns from w.org. 35 _load_remote_block_patterns(); 36 _load_remote_featured_patterns(); 33 37 34 38 // Default to is-fullscreen-mode to avoid jumps in the UI. -
trunk/src/wp-includes/block-patterns.php
r52377 r52593 49 49 * 50 50 * @since 5.8.0 51 * @since 5.9.0 The $current_screen argument was removed. 51 52 * 52 * @param WP_Screen $ current_screen The screen that the current request was triggered from.53 * @param WP_Screen $deprecated Unused. Formerly the screen that the current request was triggered from. 53 54 */ 54 function _load_remote_block_patterns( $current_screen ) { 55 if ( ! $current_screen->is_block_editor ) { 56 return; 55 function _load_remote_block_patterns( $deprecated = null ) { 56 if ( ! empty( $deprecated ) ) { 57 _deprecated_argument( __FUNCTION__, '5.9.0' ); 58 $current_screen = $deprecated; 59 if ( ! $current_screen->is_block_editor ) { 60 return; 61 } 57 62 } 58 63 … … 89 94 * 90 95 * @since 5.9.0 91 *92 * @param WP_Screen $current_screen The screen that the current request was triggered from.93 96 */ 94 function _load_remote_featured_patterns( $current_screen ) { 95 if ( ! $current_screen->is_block_editor ) { 96 return; 97 } 98 97 function _load_remote_featured_patterns() { 99 98 $supports_core_patterns = get_theme_support( 'core-block-patterns' ); 100 99 -
trunk/src/wp-includes/default-filters.php
r52437 r52593 333 333 add_action( 'wp_print_footer_scripts', '_wp_footer_scripts' ); 334 334 add_action( 'init', '_register_core_block_patterns_and_categories' ); 335 add_action( 'current_screen', '_load_remote_block_patterns' );336 add_action( 'current_screen', '_load_remote_featured_patterns' );337 335 add_action( 'init', 'check_theme_switched', 99 ); 338 336 add_action( 'init', array( 'WP_Block_Supports', 'init' ), 22 );
Note: See TracChangeset
for help on using the changeset viewer.