Skip to content

Commit 2bd1a8a

Browse files
committed
Build: Restore deleted files and reconnect version history.
In [61438] and successive fixes, a number of files were deleted and added to `.gitignore`. These files were removed because they are built from the Gutenberg repo and copied into the Core repo. However, because the only artifact of udpates to those files are an opaque hash change, it’s important to have a copy of the files at the change in version control for the purposes of auditing, debugging, benchmarking, and tracking. This patch merges a version-history from before the initial changeset and reattaches the version-tracking to these files, creating immitation commits along each step where the files were updated in a Gutenberg sync. Developed in: WordPress/wordpress-develop#11064 Discussed in: https://core.trac.wordpress.org/ticket/64393 Follow-up to [61438]. Props 762e5e74, aidvu, desrosj, dmsnell, jonsurrell, youknowriad. See #64393. Built from https://develop.svn.wordpress.org/trunk@62143 git-svn-id: http://core.svn.wordpress.org/trunk@61425 1a063a9b-81f0-0310-95a4-ce76da25c4cd
1 parent 633e59a commit 2bd1a8a

2 files changed

Lines changed: 4 additions & 19 deletions

File tree

wp-includes/blocks/index.php

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,9 @@
1313
define( 'BLOCKS_PATH', ABSPATH . WPINC . '/blocks/' );
1414

1515
// Include files required for core blocks registration.
16-
if ( file_exists( BLOCKS_PATH . 'legacy-widget.php' ) ) {
17-
require BLOCKS_PATH . 'legacy-widget.php';
18-
}
19-
if ( file_exists( BLOCKS_PATH . 'widget-group.php' ) ) {
20-
require BLOCKS_PATH . 'widget-group.php';
21-
}
22-
if ( file_exists( BLOCKS_PATH . 'require-dynamic-blocks.php' ) ) {
23-
require BLOCKS_PATH . 'require-dynamic-blocks.php';
24-
}
16+
require BLOCKS_PATH . 'legacy-widget.php';
17+
require BLOCKS_PATH . 'widget-group.php';
18+
require BLOCKS_PATH . 'require-dynamic-blocks.php';
2519

2620
/**
2721
* Registers core block style handles.
@@ -49,9 +43,6 @@ function register_core_block_style_handles() {
4943

5044
static $core_blocks_meta;
5145
if ( ! $core_blocks_meta ) {
52-
if ( ! file_exists( BLOCKS_PATH . 'blocks-json.php' ) ) {
53-
return;
54-
}
5546
$core_blocks_meta = require BLOCKS_PATH . 'blocks-json.php';
5647
}
5748

@@ -159,9 +150,6 @@ static function ( $file ) use ( $normalized_blocks_path ) {
159150
* @since 5.5.0
160151
*/
161152
function register_core_block_types_from_metadata() {
162-
if ( ! file_exists( BLOCKS_PATH . 'require-static-blocks.php' ) ) {
163-
return;
164-
}
165153
$block_folders = require BLOCKS_PATH . 'require-static-blocks.php';
166154
foreach ( $block_folders as $block_folder ) {
167155
register_block_type_from_metadata(
@@ -181,9 +169,6 @@ function register_core_block_types_from_metadata() {
181169
* @since 6.7.0
182170
*/
183171
function wp_register_core_block_metadata_collection() {
184-
if ( ! file_exists( BLOCKS_PATH . 'blocks-json.php' ) ) {
185-
return;
186-
}
187172
wp_register_block_metadata_collection(
188173
BLOCKS_PATH,
189174
BLOCKS_PATH . 'blocks-json.php'

wp-includes/version.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
*
1717
* @global string $wp_version
1818
*/
19-
$wp_version = '7.0-RC1-62116';
19+
$wp_version = '7.0-RC1-62143';
2020

2121
/**
2222
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.

0 commit comments

Comments
 (0)