Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update @wordpress packages #2012

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
198 changes: 99 additions & 99 deletions package-lock.json

Large diffs are not rendered by default.

34 changes: 17 additions & 17 deletions package.json
Expand Up @@ -27,7 +27,7 @@
"@wordpress/babel-preset-default": "6.4.1",
"@wordpress/custom-templated-path-webpack-plugin": "2.1.0",
"@wordpress/dependency-extraction-webpack-plugin": "3.2.1",
"@wordpress/e2e-test-utils": "5.4.8",
"@wordpress/e2e-test-utils": "5.4.9",
"@wordpress/library-export-default-webpack-plugin": "2.2.0",
"@wordpress/scripts": "19.2.2",
"autoprefixer": "^9.8.8",
Expand Down Expand Up @@ -82,53 +82,53 @@
"@wordpress/api-fetch": "5.2.6",
"@wordpress/autop": "3.2.3",
"@wordpress/blob": "3.2.2",
"@wordpress/block-directory": "3.0.13",
"@wordpress/block-editor": "8.0.7",
"@wordpress/block-library": "6.0.11",
"@wordpress/block-directory": "3.0.14",
"@wordpress/block-editor": "8.0.8",
"@wordpress/block-library": "6.0.12",
"@wordpress/block-serialization-default-parser": "4.2.3",
"@wordpress/blocks": "11.1.4",
"@wordpress/components": "19.1.1",
"@wordpress/components": "19.1.2",
"@wordpress/compose": "5.0.6",
"@wordpress/core-data": "4.0.8",
"@wordpress/customize-widgets": "2.0.13",
"@wordpress/customize-widgets": "2.0.14",
"@wordpress/data": "6.1.4",
"@wordpress/data-controls": "2.2.7",
"@wordpress/date": "4.2.3",
"@wordpress/deprecated": "3.2.3",
"@wordpress/dom": "3.2.7",
"@wordpress/dom-ready": "3.2.3",
"@wordpress/edit-post": "5.0.13",
"@wordpress/edit-site": "3.0.13",
"@wordpress/edit-widgets": "3.1.8",
"@wordpress/editor": "12.0.10",
"@wordpress/edit-post": "5.0.14",
"@wordpress/edit-site": "3.0.14",
"@wordpress/edit-widgets": "3.1.9",
"@wordpress/editor": "12.0.11",
"@wordpress/element": "4.0.4",
"@wordpress/escape-html": "2.2.3",
"@wordpress/format-library": "3.0.13",
"@wordpress/format-library": "3.0.14",
"@wordpress/hooks": "3.2.2",
"@wordpress/html-entities": "3.2.3",
"@wordpress/i18n": "4.2.4",
"@wordpress/icons": "6.1.1",
"@wordpress/interface": "4.1.9",
"@wordpress/interface": "4.1.10",
"@wordpress/is-shallow-equal": "4.2.1",
"@wordpress/keyboard-shortcuts": "3.0.6",
"@wordpress/keycodes": "3.2.4",
"@wordpress/list-reusable-blocks": "3.0.11",
"@wordpress/list-reusable-blocks": "3.0.12",
"@wordpress/media-utils": "3.0.5",
"@wordpress/notices": "3.2.7",
"@wordpress/nux": "5.0.11",
"@wordpress/nux": "5.0.12",
"@wordpress/plugins": "4.0.6",
"@wordpress/primitives": "3.0.4",
"@wordpress/priority-queue": "2.2.3",
"@wordpress/redux-routine": "4.2.2",
"@wordpress/reusable-blocks": "3.0.13",
"@wordpress/reusable-blocks": "3.0.14",
"@wordpress/rich-text": "5.0.6",
"@wordpress/server-side-render": "3.0.11",
"@wordpress/server-side-render": "3.0.12",
"@wordpress/shortcode": "3.2.3",
"@wordpress/token-list": "2.2.2",
"@wordpress/url": "3.3.1",
"@wordpress/viewport": "4.0.6",
"@wordpress/warning": "2.2.2",
"@wordpress/widgets": "2.0.13",
"@wordpress/widgets": "2.0.14",
"@wordpress/wordcount": "3.2.3",
"backbone": "1.4.0",
"clipboard": "2.0.8",
Expand Down
2 changes: 1 addition & 1 deletion src/wp-includes/assets/script-loader-packages.php

Large diffs are not rendered by default.

8 changes: 6 additions & 2 deletions src/wp-includes/block-supports/layout.php
Expand Up @@ -104,6 +104,9 @@ function wp_get_layout_style( $selector, $layout, $has_block_gap_support = false
$style .= 'align-items: center;';
if ( 'horizontal' === $layout_orientation ) {
$style .= 'align-items: center;';
if ( ! empty( $layout['setCascadingProperties'] ) && $layout['setCascadingProperties'] ) {
$style .= '--layout-direction: row;';
}
/**
* Add this style only if is not empty for backwards compatibility,
* since we intend to convert blocks that had flex layout implemented
Expand All @@ -114,7 +117,6 @@ function wp_get_layout_style( $selector, $layout, $has_block_gap_support = false
if ( ! empty( $layout['setCascadingProperties'] ) && $layout['setCascadingProperties'] ) {
// --layout-justification-setting allows children to inherit the value regardless or row or column direction.
$style .= "--layout-justification-setting: {$justify_content_options[ $layout['justifyContent'] ]};";
$style .= '--layout-direction: row;';
$style .= "--layout-wrap: $flex_wrap;";
$style .= "--layout-justify: {$justify_content_options[ $layout['justifyContent'] ]};";
$style .= '--layout-align: center;';
Expand All @@ -124,10 +126,12 @@ function wp_get_layout_style( $selector, $layout, $has_block_gap_support = false
$style .= 'flex-direction: column;';
if ( ! empty( $layout['justifyContent'] ) && array_key_exists( $layout['justifyContent'], $justify_content_options ) ) {
$style .= "align-items: {$justify_content_options[ $layout['justifyContent'] ]};";
if ( ! empty( $layout['setCascadingProperties'] ) && $layout['setCascadingProperties'] ) {
$style .= '--layout-direction: column;';
}
if ( ! empty( $layout['setCascadingProperties'] ) && $layout['setCascadingProperties'] ) {
// --layout-justification-setting allows children to inherit the value regardless or row or column direction.
$style .= "--layout-justification-setting: {$justify_content_options[ $layout['justifyContent'] ]};";
$style .= '--layout-direction: column;';
$style .= '--layout-justify: initial;';
$style .= "--layout-align: {$justify_content_options[ $layout['justifyContent'] ]};";
}
Expand Down
10 changes: 5 additions & 5 deletions src/wp-includes/block-template-utils.php
Expand Up @@ -744,7 +744,7 @@ function get_block_templates( $query = array(), $template_type = 'wp_template' )
*/
function get_block_template( $id, $template_type = 'wp_template' ) {
/**
* Filters the block templates array before the query takes place.
*Filters the block template object before the query takes place.
*
* Return a non-null value to bypass the WordPress queries.
*
Expand Down Expand Up @@ -793,13 +793,13 @@ function get_block_template( $id, $template_type = 'wp_template' ) {
$block_template = get_block_file_template( $id, $template_type );

/**
* Filters the array of queried block templates array after they've been fetched.
* Filters the queried block template object after it's been fetched.
*
* @since 5.9.0
*
* @param WP_Block_Template $block_template The found block template.
* @param string $id Template unique identifier (example: theme_slug//template_slug).
* @param array $template_type Template type: `'wp_template'` or '`wp_template_part'`.
* @param WP_Block_Template|null $block_template The found block template, or null if there isn't one.
* @param string $id Template unique identifier (example: theme_slug//template_slug).
* @param array $template_type Template type: `'wp_template'` or '`wp_template_part'`.
*/
return apply_filters( 'get_block_template', $block_template, $id, $template_type );
}
Expand Down
75 changes: 30 additions & 45 deletions src/wp-includes/blocks/navigation-submenu.php
Expand Up @@ -163,7 +163,32 @@ function render_block_core_navigation_submenu( $attributes, $content, $block ) {
'style' => $style_attribute,
)
);
$html = '<li ' . $wrapper_attributes . '>';

$label = '';

if ( isset( $attributes['label'] ) ) {
$label .= wp_kses(
$attributes['label'],
array(
'code' => array(),
'em' => array(),
'img' => array(
'scale' => array(),
'class' => array(),
'style' => array(),
'src' => array(),
'alt' => array(),
),
's' => array(),
'span' => array(
'style' => array(),
),
'strong' => array(),
)
);
}

$html = '<li ' . $wrapper_attributes . '>';

// If Submenus open on hover, we render an anchor tag with attributes.
// If submenu icons are set to show, we also render a submenu button, so the submenu can be opened on click.
Expand Down Expand Up @@ -193,64 +218,24 @@ function render_block_core_navigation_submenu( $attributes, $content, $block ) {
$html .= '>';
// End appending HTML attributes to anchor tag.

if ( isset( $attributes['label'] ) ) {
$html .= wp_kses(
$attributes['label'],
array(
'code' => array(),
'em' => array(),
'img' => array(
'scale' => array(),
'class' => array(),
'style' => array(),
'src' => array(),
'alt' => array(),
),
's' => array(),
'span' => array(
'style' => array(),
),
'strong' => array(),
)
);
}
$html .= $label;

$html .= '</a>';
// End anchor tag content.

if ( $show_submenu_indicators ) {
// The submenu icon is rendered in a button here
// so that there's a clickable elment to open the submenu.
$html .= '<button class="wp-block-navigation__submenu-icon wp-block-navigation-submenu__toggle" aria-expanded="false">' . block_core_navigation_submenu_render_submenu_icon() . '</button>';
$html .= '<button aria-label="' . $label . ' ' . __( 'submenu', 'gutenberg' ) . '" class="wp-block-navigation__submenu-icon wp-block-navigation-submenu__toggle" aria-expanded="false">' . block_core_navigation_submenu_render_submenu_icon() . '</button>';
}
} else {
// If menus open on click, we render the parent as a button.
$html .= '<button class="wp-block-navigation-item__content wp-block-navigation-submenu__toggle" aria-expanded="false">';
$html .= '<button aria-label="' . $label . ' ' . __( 'submenu', 'gutenberg' ) . '" class="wp-block-navigation-item__content wp-block-navigation-submenu__toggle" aria-expanded="false">';

// Wrap title with span to isolate it from submenu icon.
$html .= '<span class="wp-block-navigation-item__label">';

if ( isset( $attributes['label'] ) ) {
$html .= wp_kses(
$attributes['label'],
array(
'code' => array(),
'em' => array(),
'img' => array(
'scale' => array(),
'class' => array(),
'style' => array(),
'src' => array(),
'alt' => array(),
),
's' => array(),
'span' => array(
'style' => array(),
),
'strong' => array(),
)
);
}
$html .= $label;

$html .= '</span>';

Expand Down