Make WordPress Core


Ignore:
Timestamp:
05/26/2021 01:10:57 AM (4 years ago)
Author:
ryelle
Message:

Block Editor: Add support for the pattern directory.

Add an endpoint for fetching block patterns from WordPress.org, and load the block patterns from this new API. Remove the block patterns that have already been moved to WordPress.org/patterns.

Props ryelle, iandunn, youknowriad, timothyblynjacobs.
Fixes #53246.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/default-filters.php

    r51019 r51021  
    316316add_action( 'wp_print_footer_scripts', '_wp_footer_scripts' );
    317317add_action( 'init', '_register_core_block_patterns_and_categories' );
     318add_action( 'current_screen', '_load_remote_block_patterns' );
    318319add_action( 'init', 'check_theme_switched', 99 );
    319320add_action( 'init', array( 'WP_Block_Supports', 'init' ), 22 );
Note: See TracChangeset for help on using the changeset viewer.