Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://develop.svn.wordpress.org/trunk"
},
"gutenberg": {
"ref": "7bf80ea84eb8b62eceb1bb3fe82e42163673ca79"
"ref": "59a08c5496008ca88f4b6b86f38838c3612d88c8"
},
"engines": {
"node": ">=20.10.0",
Expand Down
4 changes: 0 additions & 4 deletions src/wp-admin/includes/update-core.php
Original file line number Diff line number Diff line change
Expand Up @@ -840,10 +840,6 @@
'wp-includes/js/dist/fields.min.js',
'wp-includes/js/dist/fields.js',
// 6.9
'wp-includes/blocks/post-author/editor.css',
'wp-includes/blocks/post-author/editor.min.css',
'wp-includes/blocks/post-author/editor-rtl.css',
'wp-includes/blocks/post-author/editor-rtl.min.css',
'wp-includes/SimplePie/src/Decode',
'wp-includes/SimplePie/src/Core.php',
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1988,7 +1988,7 @@ public function prepare_item_for_response( $item, $request ) {
add_filter(
'excerpt_length',
$override_excerpt_length,
20
PHP_INT_MAX
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

);
}

Expand All @@ -2008,7 +2008,7 @@ public function prepare_item_for_response( $item, $request ) {
remove_filter(
'excerpt_length',
$override_excerpt_length,
20
PHP_INT_MAX
);
}
}
Expand Down
4 changes: 2 additions & 2 deletions tests/phpunit/data/blocks/do-blocks-expected.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
<!--more-->


<p>First Gutenberg Paragraph</p>
<p class="wp-block-paragraph">First Gutenberg Paragraph</p>


<p>Second Auto Paragraph</p>




<p>Third Gutenberg Paragraph</p>
<p class="wp-block-paragraph">Third Gutenberg Paragraph</p>


<p>Third Auto Paragraph</p>
Expand Down
12 changes: 6 additions & 6 deletions tests/phpunit/data/blocks/fixtures/core__column.server.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@

<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow">
<p>Column One, Paragraph One</p>
<p>Column One, Paragraph Two</p>

<p class="wp-block-paragraph">Column One, Paragraph One</p>


<p class="wp-block-paragraph">Column One, Paragraph Two</p>

</div>

32 changes: 16 additions & 16 deletions tests/phpunit/data/blocks/fixtures/core__columns.server.html
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@

<div class="wp-block-columns has-3-columns is-layout-flex wp-container-1f761849 wp-block-columns-is-layout-flex">

<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow">
<p>Column One, Paragraph One</p>
<p>Column One, Paragraph Two</p>

<p class="wp-block-paragraph">Column One, Paragraph One</p>


<p class="wp-block-paragraph">Column One, Paragraph Two</p>

</div>


<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow">
<p>Column Two, Paragraph One</p>
<p>Column Three, Paragraph One</p>

<p class="wp-block-paragraph">Column Two, Paragraph One</p>


<p class="wp-block-paragraph">Column Three, Paragraph One</p>

</div>

</div>

Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@

<div class="wp-block-columns has-3-columns is-layout-flex wp-container-1f761849 wp-block-columns-is-layout-flex">
<p class="layout-column-1">Column One, Paragraph One</p>
<p class="layout-column-1">Column One, Paragraph Two</p>
<p class="layout-column-2">Column Two, Paragraph One</p>
<p class="layout-column-3">Column Three, Paragraph One</p>

<p class="layout-column-1 wp-block-paragraph">Column One, Paragraph One</p>


<p class="layout-column-1 wp-block-paragraph">Column One, Paragraph Two</p>


<p class="layout-column-2 wp-block-paragraph">Column Two, Paragraph One</p>


<p class="layout-column-3 wp-block-paragraph">Column Three, Paragraph One</p>

</div>

Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</figure>
<div class="wp-block-media-text__content">

<p class="has-large-font-size">My Content</p>
<p class="has-large-font-size wp-block-paragraph">My Content</p>

</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</figure>
<div class="wp-block-media-text__content">

<p class="has-large-font-size">Content</p>
<p class="has-large-font-size wp-block-paragraph">Content</p>

</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</figure>
<div class="wp-block-media-text__content">

<p class="has-large-font-size">My Content</p>
<p class="has-large-font-size wp-block-paragraph">My Content</p>

</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</figure>
<div class="wp-block-media-text__content">

<p style="text-align:right" class="has-large-font-size">My video</p>
<p style="text-align:right" class="has-large-font-size wp-block-paragraph">My video</p>

</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</figure>
<div class="wp-block-media-text__content">

<p class="has-large-font-size">My Content</p>
<p class="has-large-font-size wp-block-paragraph">My Content</p>

</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@

<p style="text-align:right;">... like this one, which is separate from the above and right aligned.</p>
<p class="wp-block-paragraph" style="text-align:right;">... like this one, which is separate from the above and right aligned.</p>

89 changes: 12 additions & 77 deletions tests/phpunit/includes/unregister-blocks-hooks.php
Original file line number Diff line number Diff line change
@@ -1,79 +1,14 @@
<?php

// This file was autogenerated by tools/release/sync-stable-blocks.js, do not change manually!
remove_action( 'init', 'register_block_core_accordion' );
remove_action( 'init', 'register_block_core_accordion_item' );
remove_action( 'init', 'register_block_core_archives' );
remove_action( 'init', 'register_block_core_avatar' );
remove_action( 'init', 'register_block_core_block' );
remove_action( 'init', 'register_block_core_button' );
remove_action( 'init', 'register_block_core_calendar' );
remove_action( 'init', 'register_block_core_categories' );
remove_action( 'init', 'register_block_core_comment_author_name' );
remove_action( 'init', 'register_block_core_comment_content' );
remove_action( 'init', 'register_block_core_comment_date' );
remove_action( 'init', 'register_block_core_comment_edit_link' );
remove_action( 'init', 'register_block_core_comment_reply_link' );
remove_action( 'init', 'register_block_core_comment_template' );
remove_action( 'init', 'register_block_core_comments' );
remove_action( 'init', 'register_block_core_comments_pagination' );
remove_action( 'init', 'register_block_core_comments_pagination_next' );
remove_action( 'init', 'register_block_core_comments_pagination_numbers' );
remove_action( 'init', 'register_block_core_comments_pagination_previous' );
remove_action( 'init', 'register_block_core_comments_title' );
remove_action( 'init', 'register_block_core_cover' );
remove_action( 'init', 'register_block_core_file' );
remove_action( 'init', 'register_block_core_footnotes' );
remove_action( 'init', 'register_block_core_gallery' );
remove_action( 'init', 'register_block_core_heading' );
remove_action( 'init', 'register_block_core_home_link' );
remove_action( 'init', 'register_block_core_image' );
remove_action( 'init', 'register_block_core_latest_comments' );
remove_action( 'init', 'register_block_core_latest_posts' );
remove_action( 'init', 'register_block_core_list' );
remove_action( 'init', 'register_block_core_loginout' );
remove_action( 'init', 'register_block_core_media_text' );
remove_action( 'init', 'register_block_core_navigation' );
remove_action( 'init', 'register_block_core_navigation_link' );
remove_action( 'init', 'register_block_core_navigation_submenu' );
remove_action( 'init', 'register_block_core_page_list' );
remove_action( 'init', 'register_block_core_page_list_item' );
remove_action( 'init', 'register_block_core_pattern' );
remove_action( 'init', 'register_block_core_post_author' );
remove_action( 'init', 'register_block_core_post_author_biography' );
remove_action( 'init', 'register_block_core_post_author_name' );
remove_action( 'init', 'register_block_core_post_comments_count' );
remove_action( 'init', 'register_block_core_post_comments_form' );
remove_action( 'init', 'register_block_core_post_comments_link' );
remove_action( 'init', 'register_block_core_post_content' );
remove_action( 'init', 'register_block_core_post_date' );
remove_action( 'init', 'register_block_core_post_excerpt' );
remove_action( 'init', 'register_block_core_post_featured_image' );
remove_action( 'init', 'register_block_core_post_navigation_link' );
remove_action( 'init', 'register_block_core_post_template' );
remove_action( 'init', 'register_block_core_post_terms' );
remove_action( 'init', 'register_block_core_post_time_to_read' );
remove_action( 'init', 'register_block_core_post_title' );
remove_action( 'init', 'register_block_core_query' );
remove_action( 'init', 'register_block_core_query_no_results' );
remove_action( 'init', 'register_block_core_query_pagination' );
remove_action( 'init', 'register_block_core_query_pagination_next' );
remove_action( 'init', 'register_block_core_query_pagination_numbers' );
remove_action( 'init', 'register_block_core_query_pagination_previous' );
remove_action( 'init', 'register_block_core_query_title' );
remove_action( 'init', 'register_block_core_query_total' );
remove_action( 'init', 'register_block_core_read_more' );
remove_action( 'init', 'register_block_core_rss' );
remove_action( 'init', 'register_block_core_search' );
remove_action( 'init', 'register_block_core_shortcode' );
remove_action( 'init', 'register_block_core_site_logo' );
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_tag_cloud' );
remove_action( 'init', 'register_block_core_template_part' );
remove_action( 'init', 'register_block_core_term_count' );
remove_action( 'init', 'register_block_core_term_description' );
remove_action( 'init', 'register_block_core_term_name' );
remove_action( 'init', 'register_block_core_term_template' );
remove_action( 'init', 'register_block_core_video' );
// Unhook block registration functions to prevent _doing_it_wrong warnings
// when tests re-trigger the init action. See _unhook_block_registration().
$blocks_dir = ABSPATH . WPINC . '/blocks/';
foreach ( glob( $blocks_dir . '*.php' ) as $block_file ) {
$block_name = basename( $block_file, '.php' );

if ( ! is_dir( $blocks_dir . $block_name ) ) {
continue;
}

remove_action( 'init', 'register_block_core_' . str_replace( '-', '_', $block_name ) );
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this :)

18 changes: 9 additions & 9 deletions tests/phpunit/tests/block-bindings/postMetaSource.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public function test_custom_field_value_is_rendered() {

$content = $this->get_modified_post_content( '<!-- wp:paragraph {"metadata":{"bindings":{"content":{"source":"core/post-meta","args":{"key":"tests_custom_field"}}}}} --><p>Fallback value</p><!-- /wp:paragraph -->' );
$this->assertSame(
'<p>Custom field value</p>',
'<p class="wp-block-paragraph">Custom field value</p>',
$content,
'The post content should show the value of the custom field . '
);
Expand Down Expand Up @@ -123,7 +123,7 @@ public function test_custom_field_value_is_not_shown_in_password_protected_posts
remove_filter( 'post_password_required', '__return_true' );

$this->assertSame(
'<p>Fallback value</p>',
'<p class="wp-block-paragraph">Fallback value</p>',
$content,
'The post content should show the fallback value instead of the custom field value.'
);
Expand Down Expand Up @@ -153,7 +153,7 @@ public function test_custom_field_value_is_not_shown_in_non_viewable_posts() {
remove_filter( 'is_post_status_viewable', '__return_false' );

$this->assertSame(
'<p>Fallback value</p>',
'<p class="wp-block-paragraph">Fallback value</p>',
$content,
'The post content should show the fallback value instead of the custom field value.'
);
Expand All @@ -168,7 +168,7 @@ public function test_binding_to_non_existing_meta_key() {
$content = $this->get_modified_post_content( '<!-- wp:paragraph {"metadata":{"bindings":{"content":{"source":"core/post-meta","args":{"key":"tests_non_existing_field"}}}}} --><p>Fallback value</p><!-- /wp:paragraph -->' );

$this->assertSame(
'<p>Fallback value</p>',
'<p class="wp-block-paragraph">Fallback value</p>',
$content,
'The post content should show the fallback value.'
);
Expand All @@ -183,7 +183,7 @@ public function test_binding_without_key_renders_the_fallback() {
$content = $this->get_modified_post_content( '<!-- wp:paragraph {"metadata":{"bindings":{"content":{"source":"core/post-meta"}}}} --><p>Fallback value</p><!-- /wp:paragraph -->' );

$this->assertSame(
'<p>Fallback value</p>',
'<p class="wp-block-paragraph">Fallback value</p>',
$content,
'The post content should show the fallback value.'
);
Expand All @@ -209,7 +209,7 @@ public function test_protected_field_value_is_not_shown() {
$content = $this->get_modified_post_content( '<!-- wp:paragraph {"metadata":{"bindings":{"content":{"source":"core/post-meta","args":{"key":"_tests_protected_field"}}}}} --><p>Fallback value</p><!-- /wp:paragraph -->' );

$this->assertSame(
'<p>Fallback value</p>',
'<p class="wp-block-paragraph">Fallback value</p>',
$content,
'The post content should show the fallback value instead of the protected value.'
);
Expand All @@ -235,7 +235,7 @@ public function test_custom_field_not_exposed_in_rest_api_is_not_shown() {
$content = $this->get_modified_post_content( '<!-- wp:paragraph {"metadata":{"bindings":{"content":{"source":"core/post-meta","args":{"key":"tests_show_in_rest_false_field"}}}}} --><p>Fallback value</p><!-- /wp:paragraph -->' );

$this->assertSame(
'<p>Fallback value</p>',
'<p class="wp-block-paragraph">Fallback value</p>',
$content,
'The post content should show the fallback value instead of the protected value.'
);
Expand All @@ -261,7 +261,7 @@ public function test_custom_field_with_unsafe_html_is_sanitized() {
$content = $this->get_modified_post_content( '<!-- wp:paragraph {"metadata":{"bindings":{"content":{"source":"core/post-meta","args":{"key":"tests_unsafe_html_field"}}}}} --><p>Fallback value</p><!-- /wp:paragraph -->' );

$this->assertSame(
'<p>alert(&#8220;Unsafe HTML&#8221;)</p>',
'<p class="wp-block-paragraph">alert(&#8220;Unsafe HTML&#8221;)</p>',
$content,
'The post content should not include the script tag.'
);
Expand Down Expand Up @@ -298,7 +298,7 @@ public function test_filter_block_bindings_source_value() {
remove_filter( 'block_bindings_source_value', $filter_value );

$this->assertSame(
'<p>Filtered value: tests_filter_field</p>',
'<p class="wp-block-paragraph">Filtered value: tests_filter_field</p>',
$content,
'The post content should show the filtered value.'
);
Expand Down
Loading
Loading