From d4da924446f518aaf02d07c3065ec9c46584b2c6 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sat, 2 Jul 2022 17:44:46 +0000 Subject: [PATCH] Editor: Alphabetize block lists in various places. This affects: * `wp-includes/blocks/index.php` * `tools/webpack/blocks.js` * `_unhook_block_registration()` in `tests/phpunit/includes/functions.php` Follow-up to [47250], [52069], [52730], [53157], [53278]. Fixes #56131. git-svn-id: https://develop.svn.wordpress.org/trunk@53633 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/blocks/index.php | 10 +++++----- tests/phpunit/includes/functions.php | 3 +-- tools/webpack/blocks.js | 2 +- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/wp-includes/blocks/index.php b/src/wp-includes/blocks/index.php index 6a33e8820d..396f8d82b9 100644 --- a/src/wp-includes/blocks/index.php +++ b/src/wp-includes/blocks/index.php @@ -17,10 +17,10 @@ require ABSPATH . WPINC . '/blocks/comment-date.php'; require ABSPATH . WPINC . '/blocks/comment-edit-link.php'; require ABSPATH . WPINC . '/blocks/comment-reply-link.php'; require ABSPATH . WPINC . '/blocks/comment-template.php'; +require ABSPATH . WPINC . '/blocks/comments-pagination.php'; require ABSPATH . WPINC . '/blocks/comments-pagination-next.php'; require ABSPATH . WPINC . '/blocks/comments-pagination-numbers.php'; require ABSPATH . WPINC . '/blocks/comments-pagination-previous.php'; -require ABSPATH . WPINC . '/blocks/comments-pagination.php'; require ABSPATH . WPINC . '/blocks/comments-title.php'; require ABSPATH . WPINC . '/blocks/cover.php'; require ABSPATH . WPINC . '/blocks/file.php'; @@ -31,13 +31,13 @@ require ABSPATH . WPINC . '/blocks/latest-comments.php'; require ABSPATH . WPINC . '/blocks/latest-posts.php'; require ABSPATH . WPINC . '/blocks/legacy-widget.php'; require ABSPATH . WPINC . '/blocks/loginout.php'; +require ABSPATH . WPINC . '/blocks/navigation.php'; require ABSPATH . WPINC . '/blocks/navigation-link.php'; require ABSPATH . WPINC . '/blocks/navigation-submenu.php'; -require ABSPATH . WPINC . '/blocks/navigation.php'; require ABSPATH . WPINC . '/blocks/page-list.php'; require ABSPATH . WPINC . '/blocks/pattern.php'; -require ABSPATH . WPINC . '/blocks/post-author-biography.php'; require ABSPATH . WPINC . '/blocks/post-author.php'; +require ABSPATH . WPINC . '/blocks/post-author-biography.php'; require ABSPATH . WPINC . '/blocks/post-comments.php'; require ABSPATH . WPINC . '/blocks/post-comments-form.php'; require ABSPATH . WPINC . '/blocks/post-content.php'; @@ -48,13 +48,13 @@ require ABSPATH . WPINC . '/blocks/post-navigation-link.php'; require ABSPATH . WPINC . '/blocks/post-template.php'; require ABSPATH . WPINC . '/blocks/post-terms.php'; require ABSPATH . WPINC . '/blocks/post-title.php'; +require ABSPATH . WPINC . '/blocks/query.php'; require ABSPATH . WPINC . '/blocks/query-no-results.php'; +require ABSPATH . WPINC . '/blocks/query-pagination.php'; require ABSPATH . WPINC . '/blocks/query-pagination-next.php'; require ABSPATH . WPINC . '/blocks/query-pagination-numbers.php'; require ABSPATH . WPINC . '/blocks/query-pagination-previous.php'; -require ABSPATH . WPINC . '/blocks/query-pagination.php'; require ABSPATH . WPINC . '/blocks/query-title.php'; -require ABSPATH . WPINC . '/blocks/query.php'; require ABSPATH . WPINC . '/blocks/read-more.php'; require ABSPATH . WPINC . '/blocks/rss.php'; require ABSPATH . WPINC . '/blocks/search.php'; diff --git a/tests/phpunit/includes/functions.php b/tests/phpunit/includes/functions.php index 7300abcc6d..245c37403c 100644 --- a/tests/phpunit/includes/functions.php +++ b/tests/phpunit/includes/functions.php @@ -359,11 +359,10 @@ function _unhook_block_registration() { remove_action( 'init', 'register_block_core_site_tagline' ); remove_action( 'init', 'register_block_core_site_title' ); remove_action( 'init', 'register_block_core_social_link' ); - remove_action( 'init', 'register_block_core_social_link' ); remove_action( 'init', 'register_block_core_tag_cloud' ); remove_action( 'init', 'register_block_core_template_part' ); remove_action( 'init', 'register_block_core_term_description' ); - remove_action( 'init', 'register_core_block_types_from_metadata' ); remove_action( 'init', 'register_block_core_widget_group' ); + remove_action( 'init', 'register_core_block_types_from_metadata' ); } tests_add_filter( 'init', '_unhook_block_registration', 1000 ); diff --git a/tools/webpack/blocks.js b/tools/webpack/blocks.js index 3250df5bbf..e4af5ca6a3 100644 --- a/tools/webpack/blocks.js +++ b/tools/webpack/blocks.js @@ -34,10 +34,10 @@ module.exports = function( env = { environment: 'production', watch: false, buil 'comment-reply-link', 'comment-template', 'comments-pagination', - 'comments-title', 'comments-pagination-next', 'comments-pagination-numbers', 'comments-pagination-previous', + 'comments-title', 'cover', 'file', 'gallery',