From fd9f7232e579d395e6181dcc9037b3774de81dc3 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Tue, 21 Jul 2020 13:13:54 +0000 Subject: [PATCH] Block Editor: Move the `add_action()` call for `_register_core_block_patterns_and_categories()` to `wp-includes/default-filters.php`. Follow-up to [48492]. Props desrosj. Fixes #50669. git-svn-id: https://develop.svn.wordpress.org/trunk@48531 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/block-patterns.php | 2 -- src/wp-includes/default-filters.php | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/wp-includes/block-patterns.php b/src/wp-includes/block-patterns.php index 6efc56fee7..29e6298d27 100644 --- a/src/wp-includes/block-patterns.php +++ b/src/wp-includes/block-patterns.php @@ -44,5 +44,3 @@ function _register_core_block_patterns_and_categories() { register_block_pattern_category( 'header', array( 'label' => _x( 'Headers', 'Block pattern category' ) ) ); register_block_pattern_category( 'text', array( 'label' => _x( 'Text', 'Block pattern category' ) ) ); } - -add_action( 'init', '_register_core_block_patterns_and_categories' ); diff --git a/src/wp-includes/default-filters.php b/src/wp-includes/default-filters.php index dc51908604..715d9fe8ce 100644 --- a/src/wp-includes/default-filters.php +++ b/src/wp-includes/default-filters.php @@ -302,6 +302,7 @@ add_action( 'wp_footer', 'wp_print_footer_scripts', 20 ); add_action( 'template_redirect', 'wp_shortlink_header', 11, 0 ); add_action( 'wp_print_footer_scripts', '_wp_footer_scripts' ); add_action( 'init', 'check_theme_switched', 99 ); +add_action( 'init', '_register_core_block_patterns_and_categories' ); add_action( 'after_switch_theme', '_wp_menus_changed' ); add_action( 'after_switch_theme', '_wp_sidebars_changed' ); add_action( 'wp_print_styles', 'print_emoji_styles' );