Skip to content

Commit

Permalink
Editor: Update Packages with the latest bug fixes for 6.5 beta 2.
Browse files Browse the repository at this point in the history
It includes all the backports from this Gutenberg PR WordPress/gutenberg#59197

Props youknowriad, get_dave.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57663


git-svn-id: http://core.svn.wordpress.org/trunk@57164 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information
youknowriad committed Feb 20, 2024
1 parent 63656c1 commit 433fd94
Show file tree
Hide file tree
Showing 58 changed files with 588 additions and 450 deletions.
2 changes: 1 addition & 1 deletion wp-includes/assets/script-loader-packages.min.php

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion wp-includes/assets/script-loader-packages.php

Large diffs are not rendered by default.

12 changes: 2 additions & 10 deletions wp-includes/blocks/blocks-json.php
Original file line number Diff line number Diff line change
Expand Up @@ -234,9 +234,6 @@
'link'
),
'textdomain' => 'default',
'usesContext' => array(
'pattern/overrides'
),
'attributes' => array(
'tagName' => array(
'type' => 'string',
Expand Down Expand Up @@ -2218,9 +2215,6 @@
'subtitle'
),
'textdomain' => 'default',
'usesContext' => array(
'pattern/overrides'
),
'attributes' => array(
'textAlign' => array(
'type' => 'string'
Expand Down Expand Up @@ -2369,8 +2363,7 @@
'usesContext' => array(
'allowResize',
'imageCrop',
'fixedHeight',
'pattern/overrides'
'fixedHeight'
),
'description' => 'Insert an image to make a visual statement.',
'keywords' => array(
Expand Down Expand Up @@ -3621,8 +3614,7 @@
),
'textdomain' => 'default',
'usesContext' => array(
'postId',
'pattern/overrides'
'postId'
),
'attributes' => array(
'align' => array(
Expand Down
1 change: 0 additions & 1 deletion wp-includes/blocks/button/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
"description": "Prompt visitors to take action with a button-style link.",
"keywords": [ "link" ],
"textdomain": "default",
"usesContext": [ "pattern/overrides" ],
"attributes": {
"tagName": {
"type": "string",
Expand Down
35 changes: 24 additions & 11 deletions wp-includes/blocks/footnotes.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,30 @@ function render_block_core_footnotes( $attributes, $content, $block ) {
* @since 6.3.0
*/
function register_block_core_footnotes() {
$post_types = get_post_types(
register_block_type_from_metadata(
__DIR__ . '/footnotes',
array(
'show_in_rest' => true,
'public' => true,
'render_callback' => 'render_block_core_footnotes',
)
);
}
add_action( 'init', 'register_block_core_footnotes' );


/**
* Registers the footnotes meta field required for footnotes to work.
*
* @since 6.5.0
*/
function register_block_core_footnotes_post_meta() {
$post_types = get_post_types( array( 'show_in_rest' => true ) );
foreach ( $post_types as $post_type ) {
// Only register the meta field if the post type supports the editor, custom fields, and revisions.
if ( post_type_supports( $post_type, 'editor' ) && post_type_supports( $post_type, 'custom-fields' ) && post_type_supports( $post_type, 'revisions' ) ) {
if (
post_type_supports( $post_type, 'editor' ) &&
post_type_supports( $post_type, 'custom-fields' ) &&
post_type_supports( $post_type, 'revisions' )
) {
register_post_meta(
$post_type,
'footnotes',
Expand All @@ -89,14 +104,12 @@ function register_block_core_footnotes() {
);
}
}
register_block_type_from_metadata(
__DIR__ . '/footnotes',
array(
'render_callback' => 'render_block_core_footnotes',
)
);
}
add_action( 'init', 'register_block_core_footnotes' );
/**
* Most post types are registered at priority 10, so use priority 20 here in
* order to catch them.
*/
add_action( 'init', 'register_block_core_footnotes_post_meta', 20 );

/**
* Adds the footnotes field to the revisions display.
Expand Down
1 change: 0 additions & 1 deletion wp-includes/blocks/heading/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
"description": "Introduce new sections and organize content to help visitors (and search engines) understand the structure of your content.",
"keywords": [ "title", "subtitle" ],
"textdomain": "default",
"usesContext": [ "pattern/overrides" ],
"attributes": {
"textAlign": {
"type": "string"
Expand Down
7 changes: 1 addition & 6 deletions wp-includes/blocks/image/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,7 @@
"name": "core/image",
"title": "Image",
"category": "media",
"usesContext": [
"allowResize",
"imageCrop",
"fixedHeight",
"pattern/overrides"
],
"usesContext": [ "allowResize", "imageCrop", "fixedHeight" ],
"description": "Insert an image to make a visual statement.",
"keywords": [ "img", "photo", "picture" ],
"textdomain": "default",
Expand Down
4 changes: 4 additions & 0 deletions wp-includes/blocks/image/editor-rtl.css
Original file line number Diff line number Diff line change
Expand Up @@ -127,4 +127,8 @@ figure.wp-block-image:not(.wp-block){
padding-left:0;
padding-right:0;
width:36px;
}

.wp-block-image__toolbar_content_textarea{
width:250px;
}
2 changes: 1 addition & 1 deletion wp-includes/blocks/image/editor-rtl.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions wp-includes/blocks/image/editor.css
Original file line number Diff line number Diff line change
Expand Up @@ -127,4 +127,8 @@ figure.wp-block-image:not(.wp-block){
padding-left:0;
padding-right:0;
width:36px;
}

.wp-block-image__toolbar_content_textarea{
width:250px;
}
2 changes: 1 addition & 1 deletion wp-includes/blocks/image/editor.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion wp-includes/blocks/navigation-link.php
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,6 @@ function block_core_navigation_link_build_variations() {
* Registers the navigation link block.
*
* @uses render_block_core_navigation_link()
* @uses build_navigation_link_block_variations()
* @throws WP_Error An WP_Error exception parsing the block definition.
*/
function register_block_core_navigation_link() {
Expand Down
Loading

0 comments on commit 433fd94

Please sign in to comment.