Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
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
Editor: Initial WordPress package updates for 6.5
  • Loading branch information
youknowriad committed Jan 29, 2024
commit 077439107110df3d930a5783059c7e9565a9d048
6,955 changes: 2,965 additions & 3,990 deletions package-lock.json

Large diffs are not rendered by default.

142 changes: 72 additions & 70 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@
"@lodder/grunt-postcss": "^3.1.1",
"@playwright/test": "1.32.0",
"@pmmmwh/react-refresh-webpack-plugin": "0.5.5",
"@wordpress/babel-preset-default": "7.26.13",
"@wordpress/dependency-extraction-webpack-plugin": "4.25.13",
"@wordpress/e2e-test-utils": "10.13.13",
"@wordpress/e2e-test-utils-playwright": "0.10.13",
"@wordpress/prettier-config": "2.25.13",
"@wordpress/scripts": "26.13.13",
"@wordpress/babel-preset-default": "7.33.0",
"@wordpress/dependency-extraction-webpack-plugin": "5.0.0",
"@wordpress/e2e-test-utils": "10.20.0",
"@wordpress/e2e-test-utils-playwright": "0.17.0",
"@wordpress/prettier-config": "3.6.0",
"@wordpress/scripts": "27.0.0",
"autoprefixer": "10.4.16",
"chalk": "5.3.0",
"check-node-version": "4.2.1",
Expand Down Expand Up @@ -80,70 +80,71 @@
"dependencies": {
"@emotion/is-prop-valid": "0.8.8",
"@emotion/memoize": "0.7.4",
"@wordpress/a11y": "3.42.13",
"@wordpress/annotations": "2.42.13",
"@wordpress/api-fetch": "6.39.13",
"@wordpress/autop": "3.42.13",
"@wordpress/blob": "3.42.13",
"@wordpress/block-directory": "4.19.16",
"@wordpress/block-editor": "12.10.14",
"@wordpress/block-library": "8.19.16",
"@wordpress/block-serialization-default-parser": "4.42.13",
"@wordpress/blocks": "12.19.13",
"@wordpress/commands": "0.13.14",
"@wordpress/components": "25.8.14",
"@wordpress/compose": "6.19.13",
"@wordpress/core-commands": "0.11.14",
"@wordpress/core-data": "6.19.14",
"@wordpress/customize-widgets": "4.19.16",
"@wordpress/data": "9.12.13",
"@wordpress/data-controls": "3.11.13",
"@wordpress/date": "4.42.13",
"@wordpress/deprecated": "3.42.13",
"@wordpress/dom": "3.42.13",
"@wordpress/dom-ready": "3.42.13",
"@wordpress/edit-post": "7.19.16",
"@wordpress/edit-site": "5.19.16",
"@wordpress/edit-widgets": "5.19.16",
"@wordpress/editor": "13.19.14",
"@wordpress/element": "5.19.13",
"@wordpress/escape-html": "2.42.13",
"@wordpress/format-library": "4.19.14",
"@wordpress/hooks": "3.42.13",
"@wordpress/html-entities": "3.42.13",
"@wordpress/i18n": "4.42.13",
"@wordpress/icons": "9.33.13",
"@wordpress/interactivity": "2.3.13",
"@wordpress/interface": "5.19.14",
"@wordpress/is-shallow-equal": "4.42.13",
"@wordpress/keyboard-shortcuts": "4.19.13",
"@wordpress/keycodes": "3.42.13",
"@wordpress/list-reusable-blocks": "4.19.14",
"@wordpress/media-utils": "4.33.13",
"@wordpress/notices": "4.10.13",
"@wordpress/nux": "8.4.14",
"@wordpress/patterns": "1.3.14",
"@wordpress/plugins": "6.10.14",
"@wordpress/preferences": "3.19.14",
"@wordpress/preferences-persistence": "1.34.13",
"@wordpress/primitives": "3.40.13",
"@wordpress/priority-queue": "2.42.13",
"@wordpress/private-apis": "0.24.13",
"@wordpress/redux-routine": "4.42.13",
"@wordpress/reusable-blocks": "4.19.14",
"@wordpress/rich-text": "6.19.13",
"@wordpress/router": "0.11.13",
"@wordpress/server-side-render": "4.19.14",
"@wordpress/shortcode": "3.42.13",
"@wordpress/style-engine": "1.25.13",
"@wordpress/sync": "0.4.13",
"@wordpress/token-list": "2.42.13",
"@wordpress/undo-manager": "0.2.13",
"@wordpress/url": "3.43.13",
"@wordpress/viewport": "5.19.13",
"@wordpress/warning": "2.42.13",
"@wordpress/widgets": "3.19.14",
"@wordpress/wordcount": "3.42.13",
"@wordpress/a11y": "3.49.0",
"@wordpress/annotations": "2.49.0",
"@wordpress/api-fetch": "6.46.0",
"@wordpress/autop": "3.49.0",
"@wordpress/blob": "3.49.0",
"@wordpress/block-directory": "4.26.0",
"@wordpress/block-editor": "12.17.0",
"@wordpress/block-library": "8.26.0",
"@wordpress/block-serialization-default-parser": "4.49.0",
"@wordpress/blocks": "12.26.0",
"@wordpress/commands": "0.20.0",
"@wordpress/components": "25.15.0",
"@wordpress/compose": "6.26.0",
"@wordpress/core-commands": "0.18.0",
"@wordpress/core-data": "6.26.0",
"@wordpress/customize-widgets": "4.26.0",
"@wordpress/data": "9.19.0",
"@wordpress/data-controls": "3.18.0",
"@wordpress/dataviews": "0.3.0",
"@wordpress/date": "4.49.0",
"@wordpress/deprecated": "3.49.0",
"@wordpress/dom": "3.49.0",
"@wordpress/dom-ready": "3.49.0",
"@wordpress/edit-post": "7.26.0",
"@wordpress/edit-site": "5.26.0",
"@wordpress/edit-widgets": "5.26.0",
"@wordpress/editor": "13.26.0",
"@wordpress/element": "5.26.0",
"@wordpress/escape-html": "2.49.0",
"@wordpress/format-library": "4.26.0",
"@wordpress/hooks": "3.49.0",
"@wordpress/html-entities": "3.49.0",
"@wordpress/i18n": "4.49.0",
"@wordpress/icons": "9.40.0",
"@wordpress/interactivity": "3.2.0",
"@wordpress/interface": "5.26.0",
"@wordpress/is-shallow-equal": "4.49.0",
"@wordpress/keyboard-shortcuts": "4.26.0",
"@wordpress/keycodes": "3.49.0",
"@wordpress/list-reusable-blocks": "4.26.0",
"@wordpress/media-utils": "4.40.0",
"@wordpress/notices": "4.17.0",
"@wordpress/nux": "8.11.0",
"@wordpress/patterns": "1.10.0",
"@wordpress/plugins": "6.17.0",
"@wordpress/preferences": "3.26.0",
"@wordpress/preferences-persistence": "1.41.0",
"@wordpress/primitives": "3.47.0",
"@wordpress/priority-queue": "2.49.0",
"@wordpress/private-apis": "0.31.0",
"@wordpress/redux-routine": "4.49.0",
"@wordpress/reusable-blocks": "4.26.0",
"@wordpress/rich-text": "6.26.0",
"@wordpress/router": "0.18.0",
"@wordpress/server-side-render": "4.26.0",
"@wordpress/shortcode": "3.49.0",
"@wordpress/style-engine": "1.32.0",
"@wordpress/sync": "0.11.0",
"@wordpress/token-list": "2.49.0",
"@wordpress/undo-manager": "0.9.0",
"@wordpress/url": "3.50.0",
"@wordpress/viewport": "5.26.0",
"@wordpress/warning": "2.49.0",
"@wordpress/widgets": "3.26.0",
"@wordpress/wordcount": "3.49.0",
"backbone": "1.5.0",
"clipboard": "2.0.11",
"core-js-url-browser": "3.6.4",
Expand All @@ -167,6 +168,7 @@
"polyfill-library": "4.8.0",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-is": "18.2.0",
"regenerator-runtime": "0.14.0",
"tslib": "2.6.2",
"underscore": "1.13.6",
Expand Down
4 changes: 2 additions & 2 deletions src/wp-includes/blocks/audio/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
"__experimentalRole": "content"
},
"caption": {
"type": "string",
"source": "html",
"type": "rich-text",
"source": "rich-text",
"selector": "figcaption",
"__experimentalRole": "content"
},
Expand Down
6 changes: 5 additions & 1 deletion src/wp-includes/blocks/avatar/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,11 @@
"alignWide": false,
"spacing": {
"margin": true,
"padding": true
"padding": true,
"__experimentalDefaultControls": {
"margin": false,
"padding": false
}
},
"__experimentalBorder": {
"__experimentalSkipSerialization": true,
Expand Down
48 changes: 48 additions & 0 deletions src/wp-includes/blocks/block.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,31 @@ function render_block_core_block( $attributes ) {
$content = $wp_embed->run_shortcode( $reusable_block->post_content );
$content = $wp_embed->autoembed( $content );

$gutenberg_experiments = get_option( 'gutenberg-experiments' );
$has_partial_synced_overrides = $gutenberg_experiments
&& array_key_exists( 'gutenberg-pattern-partial-syncing', $gutenberg_experiments )
&& isset( $attributes['overrides'] );

/**
* We set the `pattern/overrides` context through the `render_block_context`
* filter so that it is available when a pattern's inner blocks are
* rendering via do_blocks given it only receives the inner content.
*/
if ( $has_partial_synced_overrides ) {
$filter_block_context = static function ( $context ) use ( $attributes ) {
$context['pattern/overrides'] = $attributes['overrides'];
return $context;
};
add_filter( 'render_block_context', $filter_block_context, 1 );
}

$content = do_blocks( $content );
unset( $seen_refs[ $attributes['ref'] ] );

if ( $has_partial_synced_overrides ) {
remove_filter( 'render_block_context', $filter_block_context, 1 );
}

return $content;
}

Expand All @@ -63,3 +86,28 @@ function register_block_core_block() {
);
}
add_action( 'init', 'register_block_core_block' );

$gutenberg_experiments = get_option( 'gutenberg-experiments' );
if ( $gutenberg_experiments && array_key_exists( 'gutenberg-pattern-partial-syncing', $gutenberg_experiments ) ) {
/**
* Registers the overrides attribute for core/block.
*
* @param array $args Array of arguments for registering a block type.
* @param string $block_name Block name including namespace.
* @return array $args
*/
function register_block_core_block_args( $args, $block_name ) {
if ( 'core/block' === $block_name ) {
$args['attributes'] = array_merge(
$args['attributes'],
array(
'overrides' => array(
'type' => 'object',
),
)
);
}
return $args;
}
add_filter( 'register_block_type_args', 'register_block_core_block_args', 10, 2 );
}
3 changes: 2 additions & 1 deletion src/wp-includes/blocks/block/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"supports": {
"customClassName": false,
"html": false,
"inserter": false
"inserter": false,
"renaming": false
}
}
4 changes: 2 additions & 2 deletions src/wp-includes/blocks/button/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@
"__experimentalRole": "content"
},
"text": {
"type": "string",
"source": "html",
"type": "rich-text",
"source": "rich-text",
"selector": "a,button",
"__experimentalRole": "content"
},
Expand Down
8 changes: 2 additions & 6 deletions src/wp-includes/blocks/calendar.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,8 @@ function render_block_core_calendar( $attributes ) {
str_contains( $permalink_structure, '%monthnum%' ) &&
str_contains( $permalink_structure, '%year%' )
) {
// phpcs:ignore WordPress.WP.GlobalVariablesOverride.OverrideProhibited
$monthnum = $attributes['month'];
// phpcs:ignore WordPress.WP.GlobalVariablesOverride.OverrideProhibited
$year = $attributes['year'];
$year = $attributes['year'];
}
}

Expand Down Expand Up @@ -70,10 +68,8 @@ function render_block_core_calendar( $attributes ) {
$calendar
);

// phpcs:ignore WordPress.WP.GlobalVariablesOverride.OverrideProhibited
$monthnum = $previous_monthnum;
// phpcs:ignore WordPress.WP.GlobalVariablesOverride.OverrideProhibited
$year = $previous_year;
$year = $previous_year;

return $output;
}
Expand Down
6 changes: 2 additions & 4 deletions src/wp-includes/blocks/categories.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,7 @@ function render_block_core_categories( $attributes ) {
function build_dropdown_script_block_core_categories( $dropdown_id ) {
ob_start();
?>
<script type='text/javascript'>
/* <![CDATA[ */
<script>
( function() {
var dropdown = document.getElementById( '<?php echo esc_js( $dropdown_id ); ?>' );
function onCatChange() {
Expand All @@ -81,10 +80,9 @@ function onCatChange() {
}
dropdown.onchange = onCatChange;
})();
/* ]]> */
</script>
<?php
return ob_get_clean();
return wp_get_inline_script_tag( str_replace( array( '<script>', '</script>' ), '', ob_get_clean() ) );
}

/**
Expand Down
4 changes: 2 additions & 2 deletions src/wp-includes/blocks/code/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
"textdomain": "default",
"attributes": {
"content": {
"type": "string",
"source": "html",
"type": "rich-text",
"source": "rich-text",
"selector": "code",
"__unstablePreserveWhiteSpace": true
}
Expand Down
2 changes: 1 addition & 1 deletion src/wp-includes/blocks/comments-title/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"title": "Comments Title",
"category": "theme",
"ancestor": [ "core/comments" ],
"description": "Displays a title with the number of comments",
"description": "Displays a title with the number of comments.",
"textdomain": "default",
"usesContext": [ "postId", "postType" ],
"attributes": {
Expand Down
6 changes: 3 additions & 3 deletions src/wp-includes/blocks/cover/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@
},
"alt": {
"type": "string",
"source": "attribute",
"selector": "img",
"attribute": "alt",
"default": ""
},
"hasParallax": {
Expand All @@ -42,6 +39,9 @@
"customOverlayColor": {
"type": "string"
},
"isUserOverlayColor": {
"type": "boolean"
},
"backgroundType": {
"type": "string",
"default": "image"
Expand Down
4 changes: 2 additions & 2 deletions src/wp-includes/blocks/details/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
"default": false
},
"summary": {
"type": "string",
"source": "html",
"type": "rich-text",
"source": "rich-text",
"selector": "summary"
}
},
Expand Down
4 changes: 2 additions & 2 deletions src/wp-includes/blocks/embed/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
"__experimentalRole": "content"
},
"caption": {
"type": "string",
"source": "html",
"type": "rich-text",
"source": "rich-text",
"selector": "figcaption",
"__experimentalRole": "content"
},
Expand Down
Loading