Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
f4144d8
Add changes from #5195
mikachan Sep 20, 2023
d1960cc
Add changes from #5235
mikachan Sep 20, 2023
63217cd
Output of sync-gutenberg-packages so far
mikachan Sep 20, 2023
59dd68d
Revert comments in update-core.php
mikachan Sep 20, 2023
413751d
Update from latest sync script run
mikachan Sep 20, 2023
3adb980
Potential fix for sync sourcemap warning
mikachan Sep 21, 2023
bb55583
Always enqueue prod Interactivity API
mikachan Sep 21, 2023
22bad59
Update from successful sync packages run
mikachan Sep 21, 2023
dd177b0
Clean interactivity assets
mikachan Sep 21, 2023
f881350
Update from successful sync packages run
mikachan Sep 21, 2023
bac2694
Update src/wp-includes/script-loader.php
mikachan Sep 21, 2023
f06bde5
Merge branch 'trunk' into packpage-updates-6.4-beta1
mikachan Sep 21, 2023
ae84988
Results of sync packages script after merge with trunk
mikachan Sep 21, 2023
670ad3a
Update packages using wp-6.4 dist-tag
mikachan Sep 25, 2023
b2a22e2
Merge branch 'trunk' into packpage-updates-6.4-beta1
mikachan Sep 25, 2023
47dde56
Results of npm run build:dev
mikachan Sep 25, 2023
836b9d0
Update tools/webpack/blocks.js
mikachan Sep 25, 2023
9beee04
Re-run npm run build:dev
mikachan Sep 25, 2023
c22d71b
Remove sync pkg from sourcemap config
mikachan Sep 26, 2023
ea5bb8b
Update search/view path
mikachan Sep 26, 2023
709b604
Update src/wp-includes/script-loader.php
mikachan Sep 26, 2023
3cea4be
Docs: Correct typo in new `@since` tag.
desrosj Sep 25, 2023
219483f
Coding Standards: Fix a few newly introduced WPCS issues.
SergeyBiryukov Sep 25, 2023
75c3843
Options, Meta APIs: Improve logic to avoid unnecessary database write…
felixarntz Sep 25, 2023
1e1ed26
Script Loader: Replace hardcoded output of style tags with calls to `…
spacedmonkey Sep 25, 2023
76ea238
Editor: Introduce get_block_asset_url Utility Function.
spacedmonkey Sep 25, 2023
d87f9b8
HTML API: Remove all duplicate copies of an attribute when removing.
ockham Sep 25, 2023
4e4b94a
Docs: Revert [56679].
desrosj Sep 25, 2023
a6bf745
Script Loader: Use `wp_get_script_tag()` and `wp_get_inline_script_ta…
westonruter Sep 25, 2023
0eae815
Fonts: Get font-family name from 'fontFamily' field.
hellofromtonya Sep 25, 2023
ef7fa1c
Filesystem API: Introduce filters for before/after unzipping archives.
costdev Sep 25, 2023
6bbce3a
Media: Rely on `wp_get_loading_optimization_attributes()` to add `dec…
felixarntz Sep 25, 2023
670ab40
Filesystem API: Add missing ZIP file for unzip tests.
costdev Sep 25, 2023
f92ba90
Coding Standards: Fix a few newly introduced WPCS issues.
SergeyBiryukov Sep 26, 2023
99a2b31
Media: Ensure images within shortcodes are correctly considered for l…
felixarntz Sep 26, 2023
89f228b
Code Modernization: Rename parameters that use reserved keywords in `…
SergeyBiryukov Sep 26, 2023
6e02a73
Coding Standards: Upgrade WPCS to version 3.0.0.
SergeyBiryukov Sep 26, 2023
b7614a2
Build/Test Tools: Use the latest PHP version for the coding standards…
SergeyBiryukov Sep 26, 2023
5d0827c
Administration: Add event type to Events and News widget.
peterwilsoncc Sep 26, 2023
42eb473
Editor: make better use of Tag Processor in layout block support.
tellthemachines Sep 26, 2023
1ba9ebb
Build: Introduce SCRIPT_DEBUG global in webpack processing
gziolo Sep 26, 2023
3b6b60f
Editor: remove null coalescing operator from layout.
tellthemachines Sep 26, 2023
cf48792
Results of npm run build:dev
mikachan Sep 26, 2023
59c1099
Add sync pkg back to sourcemaps config
mikachan Sep 26, 2023
babbb7a
Add sync package to list of bundled packages
mikachan Sep 26, 2023
fce438a
Remove sync package from sourcemap config
mikachan Sep 26, 2023
6854286
Results of npm run build:dev
mikachan Sep 26, 2023
ab68c96
Revert "Results of npm run build:dev"
mikachan Sep 26, 2023
37c51de
Revert "Remove sync package from sourcemap config"
mikachan Sep 26, 2023
6c77b49
Revert "Add sync package to list of bundled packages"
mikachan Sep 26, 2023
27f9047
Revert "Add sync pkg back to sourcemaps config"
mikachan Sep 26, 2023
5fa88d6
Revert "Results of npm run build:dev"
mikachan Sep 26, 2023
ee20e57
Revert "Editor: remove null coalescing operator from layout."
mikachan Sep 26, 2023
1c1fe1b
Revert "Build: Introduce SCRIPT_DEBUG global in webpack processing"
mikachan Sep 26, 2023
3333c8d
Revert "Editor: make better use of Tag Processor in layout block supp…
mikachan Sep 26, 2023
2bec0bd
Revert "Administration: Add event type to Events and News widget."
mikachan Sep 26, 2023
5d078a5
Revert "Build/Test Tools: Use the latest PHP version for the coding s…
mikachan Sep 26, 2023
7a97b66
Revert "Coding Standards: Upgrade WPCS to version 3.0.0."
mikachan Sep 26, 2023
78f9484
Revert "Code Modernization: Rename parameters that use reserved keywo…
mikachan Sep 26, 2023
abad93f
Revert "Media: Ensure images within shortcodes are correctly consider…
mikachan Sep 26, 2023
2b1df6e
Revert "Coding Standards: Fix a few newly introduced WPCS issues."
mikachan Sep 26, 2023
bbff6d0
Revert "Filesystem API: Add missing ZIP file for unzip tests."
mikachan Sep 26, 2023
c8bd058
Revert "Media: Rely on `wp_get_loading_optimization_attributes()` to …
mikachan Sep 26, 2023
43672e6
Revert "Filesystem API: Introduce filters for before/after unzipping …
mikachan Sep 26, 2023
9c06e87
Revert "Fonts: Get font-family name from 'fontFamily' field."
mikachan Sep 26, 2023
de4ce4f
Revert "Script Loader: Use `wp_get_script_tag()` and `wp_get_inline_s…
mikachan Sep 26, 2023
2237a5d
Revert "Docs: Revert [56679]."
mikachan Sep 26, 2023
bcb6413
Revert "HTML API: Remove all duplicate copies of an attribute when re…
mikachan Sep 26, 2023
58235ef
Revert "Editor: Introduce get_block_asset_url Utility Function."
mikachan Sep 26, 2023
bdb938c
Revert "Script Loader: Replace hardcoded output of style tags with ca…
mikachan Sep 26, 2023
0b307fa
Revert "Options, Meta APIs: Improve logic to avoid unnecessary databa…
mikachan Sep 26, 2023
18ecc50
Revert "Coding Standards: Fix a few newly introduced WPCS issues."
mikachan Sep 26, 2023
291019e
Revert "Docs: Correct typo in new `@since` tag."
mikachan Sep 26, 2023
132c57c
Add sync package to list of bundled packages
mikachan Sep 26, 2023
2ae8c6d
Results of npm run build:dev
mikachan Sep 26, 2023
0587148
Cherry-pick "Results of npm run build:dev"
mikachan Sep 26, 2023
bb34412
Latest results from build:dev
mikachan Sep 26, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Revert "Coding Standards: Fix a few newly introduced WPCS issues."
This reverts commit 219483f.
  • Loading branch information
mikachan committed Sep 26, 2023
commit 18ecc5042b3f609a426f7885319f4ba3bc5b3dea
2 changes: 1 addition & 1 deletion src/wp-admin/options-general.php
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@
<?php
$new_admin_email = get_option( 'new_admin_email' );
if ( $new_admin_email && get_option( 'admin_email' ) !== $new_admin_email ) {
$pending_admin_email_message = sprintf(
$pending_admin_email_message = sprintf(
/* translators: %s: New admin email. */
__( 'There is a pending change of the admin email to %s.' ),
'<code>' . esc_html( $new_admin_email ) . '</code>'
Expand Down
2 changes: 1 addition & 1 deletion src/wp-admin/plugins.php
Original file line number Diff line number Diff line change
Expand Up @@ -690,7 +690,7 @@
);

} elseif ( isset( $_GET['deleted'] ) ) {
$delete_result = get_transient( 'plugins_delete_result_' . $user_ID );
$delete_result = get_transient( 'plugins_delete_result_' . $user_ID );
// Delete it once we're done.
delete_transient( 'plugins_delete_result_' . $user_ID );

Expand Down
2 changes: 1 addition & 1 deletion src/wp-admin/user-edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,7 @@
$new_email = get_user_meta( $current_user->ID, '_new_email', true );
if ( $new_email && $new_email['newemail'] !== $current_user->user_email && $profile_user->ID === $current_user->ID ) :

$pending_change_message = sprintf(
$pending_change_message = sprintf(
/* translators: %s: New email. */
__( 'There is a pending change of your email to %s.' ),
'<code>' . esc_html( $new_email['newemail'] ) . '</code>'
Expand Down
2 changes: 1 addition & 1 deletion src/wp-includes/block-supports/elements.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ function wp_render_elements_support( $block_content, $block ) {

foreach ( $element_config['paths'] as $path ) {
if ( null !== _wp_array_get( $block['attrs'], explode( '.', $path ), null ) ) {
++$element_colors_set;
$element_colors_set++;
}
}
}
Expand Down
33 changes: 13 additions & 20 deletions src/wp-includes/blocks.php
Original file line number Diff line number Diff line change
Expand Up @@ -790,20 +790,20 @@ function make_before_block_visitor( $context ) {
* Furthermore, prepend the markup for any blocks hooked `before` the given block and as its parent's
* `first_child`, respectively, to the serialized markup for the given block.
*
* @param array $block The block to inject the theme attribute into, and hooked blocks before.
* @param array $parent_block The parent block of the given block.
* @param array $prev The previous sibling block of the given block.
* @param array $block The block to inject the theme attribute into, and hooked blocks before.
* @param array $parent The parent block of the given block.
* @param array $prev The previous sibling block of the given block.
* @return string The serialized markup for the given block, with the markup for any hooked blocks prepended to it.
*/
return function ( &$block, $parent_block = null, $prev = null ) use ( $context ) {
return function( &$block, $parent = null, $prev = null ) use ( $context ) {
_inject_theme_attribute_in_template_part_block( $block );

$markup = '';

if ( $parent_block && ! $prev ) {
if ( $parent && ! $prev ) {
// Candidate for first-child insertion.
$relative_position = 'first_child';
$anchor_block_type = $parent_block['blockName'];
$anchor_block_type = $parent['blockName'];
$hooked_block_types = array_keys( get_hooked_blocks( $anchor_block_type, $relative_position ) );
/**
* Filters the list of hooked block types for a given anchor block type and relative position.
Expand Down Expand Up @@ -856,12 +856,12 @@ function make_after_block_visitor( $context ) {
* Append the markup for any blocks hooked `after` the given block and as its parent's
* `last_child`, respectively, to the serialized markup for the given block.
*
* @param array $block The block to inject the hooked blocks after.
* @param array $parent_block The parent block of the given block.
* @param array $next The next sibling block of the given block.
* @param array $block The block to inject the hooked blocks after.
* @param array $parent The parent block of the given block.
* @param array $next The next sibling block of the given block.
* @return string The serialized markup for the given block, with the markup for any hooked blocks appended to it.
*/
return function ( &$block, $parent_block = null, $next = null ) use ( $context ) {
return function( &$block, $parent = null, $next = null ) use ( $context ) {
$markup = '';

$relative_position = 'after';
Expand All @@ -873,10 +873,10 @@ function make_after_block_visitor( $context ) {
$markup .= get_comment_delimited_block_content( $hooked_block_type, array(), '' );
}

if ( $parent_block && ! $next ) {
if ( $parent && ! $next ) {
// Candidate for last-child insertion.
$relative_position = 'last_child';
$anchor_block_type = $parent_block['blockName'];
$anchor_block_type = $parent['blockName'];
$hooked_block_types = array_keys( get_hooked_blocks( $anchor_block_type, $relative_position ) );
/** This filter is documented in wp-includes/blocks.php */
$hooked_block_types = apply_filters( 'hooked_block_types', $hooked_block_types, $relative_position, $anchor_block_type, $context );
Expand Down Expand Up @@ -1059,7 +1059,6 @@ function traverse_and_serialize_block( $block, $pre_callback = null, $post_callb
$prev = 0 === $block_index
? null
: $block['innerBlocks'][ $block_index - 1 ];

$block_content .= call_user_func_array(
$pre_callback,
array( &$inner_block, $block, $prev )
Expand All @@ -1072,13 +1071,12 @@ function traverse_and_serialize_block( $block, $pre_callback = null, $post_callb
$next = count( $block['innerBlocks'] ) - 1 === $block_index
? null
: $block['innerBlocks'][ $block_index + 1 ];

$block_content .= call_user_func_array(
$post_callback,
array( &$inner_block, $block, $next )
);
}
++$block_index;
$block_index++;
}
}

Expand Down Expand Up @@ -1132,27 +1130,22 @@ function traverse_and_serialize_blocks( $blocks, $pre_callback = null, $post_cal
$prev = 0 === $index
? null
: $blocks[ $index - 1 ];

$result .= call_user_func_array(
$pre_callback,
array( &$block, null, $prev ) // At the top level, there is no parent block to pass to the callback.
);
}

$result .= traverse_and_serialize_block( $block, $pre_callback, $post_callback );

if ( is_callable( $post_callback ) ) {
$next = count( $blocks ) - 1 === $index
? null
: $blocks[ $index + 1 ];

$result .= call_user_func_array(
$post_callback,
array( &$block, null, $next ) // At the top level, there is no parent block to pass to the callback.
);
}
}

return $result;
}

Expand Down
2 changes: 1 addition & 1 deletion src/wp-includes/media.php
Original file line number Diff line number Diff line change
Expand Up @@ -5730,7 +5730,7 @@ function wp_get_loading_optimization_attributes( $tag_name, $attr, $context ) {
if ( null === $maybe_in_viewport ) {
$header_enforced_contexts = array(
'template_part_' . WP_TEMPLATE_PART_AREA_HEADER => true,
'get_header_image_tag' => true,
'get_header_image_tag' => true,
);

/**
Expand Down
4 changes: 2 additions & 2 deletions src/wp-includes/taxonomy.php
Original file line number Diff line number Diff line change
Expand Up @@ -231,8 +231,8 @@ function create_initial_taxonomies() {
'publicly_queryable' => false,
'hierarchical' => false,
'labels' => array(
'name' => _x( 'Pattern Categories', 'taxonomy general name' ),
'singular_name' => _x( 'Pattern Category', 'taxonomy singular name' ),
'name' => _x( 'Pattern Categories', 'taxonomy general name' ),
'singular_name' => _x( 'Pattern Category', 'taxonomy singular name' ),
),
'query_var' => false,
'rewrite' => false,
Expand Down
8 changes: 4 additions & 4 deletions tests/phpunit/tests/admin/wpTermsListTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,16 @@ public function set_up() {
/**
* Call an inaccessible (private or protected) method.
*
* @param object|string $instance Object instance or class string to call the method of.
* @param object|string $object Object instance or class string to call the method of.
* @param string $method_name Name of the method to call.
* @param array $args Optional. Array of arguments to pass to the method.
* @return mixed Return value of the method call.
* @throws ReflectionException If the object could not be reflected upon.
*/
private function call_inaccessible_method( $instance, $method_name, $args = array() ) {
$method = ( new ReflectionClass( $instance ) )->getMethod( $method_name );
private function call_inaccessible_method( $object, $method_name, $args = array() ) {
$method = ( new ReflectionClass( $object ) )->getMethod( $method_name );
$method->setAccessible( true );
return $method->invokeArgs( $instance, $args );
return $method->invokeArgs( $object, $args );
}

/**
Expand Down
1 change: 1 addition & 0 deletions tests/phpunit/tests/blocks/editor.php
Original file line number Diff line number Diff line change
Expand Up @@ -543,6 +543,7 @@ public function test_get_block_editor_settings_without_post_content_block() {
$settings = get_block_editor_settings( array(), $post_editor_context );

$this->assertArrayNotHasKey( 'postContentAttributes', $settings );

}

/**
Expand Down
4 changes: 2 additions & 2 deletions tests/phpunit/tests/media.php
Original file line number Diff line number Diff line change
Expand Up @@ -4436,7 +4436,7 @@ public function test_wp_get_loading_optimization_attributes_should_return_empty_
$result = null;
add_filter(
'the_content',
function ( $content ) use ( &$result ) {
function( $content ) use ( &$result ) {
$attr = $this->get_width_height_for_high_priority();
$result = wp_get_loading_optimization_attributes( 'img', $attr, 'something_completely_arbitrary' );
return $content;
Expand Down Expand Up @@ -4496,7 +4496,7 @@ public function test_wp_loading_optimization_force_header_contexts_filter() {

add_filter(
'wp_loading_optimization_force_header_contexts',
function ( $context ) {
function( $context ) {
$contexts['something_completely_arbitrary'] = true;
return $contexts;
}
Expand Down
10 changes: 6 additions & 4 deletions tests/phpunit/tests/vars.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public function tear_down() {
*
* @return array
*/
public function get_data_to_test_wp_is_mobile(): array {
function get_data_to_test_wp_is_mobile(): array {
return array(
'mobile client hint' => array(
'headers' => array(
Expand Down Expand Up @@ -104,6 +104,8 @@ public function get_data_to_test_wp_is_mobile(): array {
}

/**
* Tests that wp_is_mobile() .
*
* @ticket 59370
*
* @covers ::wp_is_mobile
Expand All @@ -113,7 +115,7 @@ public function get_data_to_test_wp_is_mobile(): array {
* @param array $headers Headers in $_SERVER.
* @param bool $expected Whether expected.
*/
public function test_wp_is_mobile( array $headers, bool $expected ) {
function test_wp_is_mobile( array $headers, bool $expected ) {
foreach ( $headers as $key => $value ) {
$_SERVER[ $key ] = $value;
}
Expand All @@ -125,7 +127,7 @@ public function test_wp_is_mobile( array $headers, bool $expected ) {
*
* @covers ::wp_is_mobile
*/
public function test_wp_is_mobile_is_true_with_filter() {
function test_wp_is_mobile_is_true_with_filter() {
$this->assertFalse( wp_is_mobile() );
add_filter( 'wp_is_mobile', '__return_true' );
$this->assertTrue( wp_is_mobile() );
Expand All @@ -136,7 +138,7 @@ public function test_wp_is_mobile_is_true_with_filter() {
*
* @covers ::wp_is_mobile
*/
public function test_wp_is_mobile_is_false_with_filter() {
function test_wp_is_mobile_is_false_with_filter() {
$_SERVER['HTTP_USER_AGENT'] = 'Mozilla/5.0 (Linux; Android 10) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.5938.60 Mobile Safari/537.36';
$this->assertTrue( wp_is_mobile() );
add_filter( 'wp_is_mobile', '__return_false' );
Expand Down