mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-03 15:08:10 +01:00
Editor: Update WordPress packages for 6.0 Beta 4
Included cherry-picked commits from the Gutenberg plugin that fix bugs discovere after WordPress 6.0 Beta 3. Props zieladam, ndiego, darerodz. See #55567. Built from https://develop.svn.wordpress.org/trunk@53329 git-svn-id: http://core.svn.wordpress.org/trunk@52918 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
0fcdd744c1
commit
afd35d1958
File diff suppressed because one or more lines are too long
@ -19,16 +19,15 @@ function render_block_core_comment_author_name( $attributes, $content, $block )
|
||||
}
|
||||
|
||||
$comment = get_comment( $block->context['commentId'] );
|
||||
$commenter = wp_get_current_commenter();
|
||||
$show_pending_links = isset( $commenter['comment_author'] ) && $commenter['comment_author'];
|
||||
if ( empty( $comment ) ) {
|
||||
return '';
|
||||
}
|
||||
|
||||
$classes = '';
|
||||
if ( isset( $attributes['textAlign'] ) ) {
|
||||
$classes .= 'has-text-align-' . esc_attr( $attributes['textAlign'] );
|
||||
}
|
||||
if ( isset( $attributes['fontSize'] ) ) {
|
||||
$classes .= 'has-' . esc_attr( $attributes['fontSize'] ) . '-font-size';
|
||||
$classes .= 'has-text-align-' . $attributes['textAlign'];
|
||||
}
|
||||
|
||||
$wrapper_attributes = get_block_wrapper_attributes( array( 'class' => $classes ) );
|
||||
@ -38,6 +37,9 @@ function render_block_core_comment_author_name( $attributes, $content, $block )
|
||||
if ( ! empty( $attributes['isLink'] ) && ! empty( $attributes['linkTarget'] ) ) {
|
||||
$comment_author = sprintf( '<a rel="external nofollow ugc" href="%1s" target="%2s" >%3s</a>', esc_url( $link ), esc_attr( $attributes['linkTarget'] ), $comment_author );
|
||||
}
|
||||
if ( '0' === $comment->comment_approved && ! $show_pending_links ) {
|
||||
$comment_author = wp_kses( $comment_author, array() );
|
||||
}
|
||||
|
||||
return sprintf(
|
||||
'<div %1$s>%2$s</div>',
|
||||
|
@ -19,15 +19,36 @@ function render_block_core_comment_content( $attributes, $content, $block ) {
|
||||
}
|
||||
|
||||
$comment = get_comment( $block->context['commentId'] );
|
||||
$commenter = wp_get_current_commenter();
|
||||
$show_pending_links = isset( $commenter['comment_author'] ) && $commenter['comment_author'];
|
||||
if ( empty( $comment ) ) {
|
||||
return '';
|
||||
}
|
||||
|
||||
$comment_text = get_comment_text( $comment );
|
||||
$args = array();
|
||||
$comment_text = get_comment_text( $comment, $args );
|
||||
if ( ! $comment_text ) {
|
||||
return '';
|
||||
}
|
||||
|
||||
/** This filter is documented in wp-includes/comment-template.php */
|
||||
$comment_text = apply_filters( 'comment_text', $comment_text, $comment, $args );
|
||||
|
||||
$moderation_note = '';
|
||||
if ( '0' === $comment->comment_approved ) {
|
||||
$commenter = wp_get_current_commenter();
|
||||
|
||||
if ( $commenter['comment_author_email'] ) {
|
||||
$moderation_note = __( 'Your comment is awaiting moderation.' );
|
||||
} else {
|
||||
$moderation_note = __( 'Your comment is awaiting moderation. This is a preview; your comment will be visible after it has been approved.' );
|
||||
}
|
||||
$moderation_note = '<p><em class="comment-awaiting-moderation">' . $moderation_note . '</em></p>';
|
||||
if ( ! $show_pending_links ) {
|
||||
$comment_text = wp_kses( $comment_text, array() );
|
||||
}
|
||||
}
|
||||
|
||||
$classes = '';
|
||||
if ( isset( $attributes['textAlign'] ) ) {
|
||||
$classes .= 'has-text-align-' . $attributes['textAlign'];
|
||||
@ -36,8 +57,9 @@ function render_block_core_comment_content( $attributes, $content, $block ) {
|
||||
$wrapper_attributes = get_block_wrapper_attributes( array( 'class' => $classes ) );
|
||||
|
||||
return sprintf(
|
||||
'<div %1$s>%2$s</div>',
|
||||
'<div %1$s>%2$s%3$s</div>',
|
||||
$wrapper_attributes,
|
||||
$moderation_note,
|
||||
$comment_text
|
||||
);
|
||||
}
|
||||
|
81
wp-includes/blocks/comment-content/style-rtl.css
Normal file
81
wp-includes/blocks/comment-content/style-rtl.css
Normal file
@ -0,0 +1,81 @@
|
||||
/**
|
||||
* Colors
|
||||
*/
|
||||
/**
|
||||
* Breakpoints & Media Queries
|
||||
*/
|
||||
/**
|
||||
* SCSS Variables.
|
||||
*
|
||||
* Please use variables from this sheet to ensure consistency across the UI.
|
||||
* Don't add to this sheet unless you're pretty sure the value will be reused in many places.
|
||||
* For example, don't add rules to this sheet that affect block visuals. It's purely for UI.
|
||||
*/
|
||||
/**
|
||||
* Colors
|
||||
*/
|
||||
/**
|
||||
* Fonts & basic variables.
|
||||
*/
|
||||
/**
|
||||
* Grid System.
|
||||
* https://make.wordpress.org/design/2019/10/31/proposal-a-consistent-spacing-system-for-wordpress/
|
||||
*/
|
||||
/**
|
||||
* Dimensions.
|
||||
*/
|
||||
/**
|
||||
* Shadows.
|
||||
*/
|
||||
/**
|
||||
* Editor widths.
|
||||
*/
|
||||
/**
|
||||
* Block & Editor UI.
|
||||
*/
|
||||
/**
|
||||
* Block paddings.
|
||||
*/
|
||||
/**
|
||||
* React Native specific.
|
||||
* These variables do not appear to be used anywhere else.
|
||||
*/
|
||||
/**
|
||||
* Converts a hex value into the rgb equivalent.
|
||||
*
|
||||
* @param {string} hex - the hexadecimal value to convert
|
||||
* @return {string} comma separated rgb values
|
||||
*/
|
||||
/**
|
||||
* Breakpoint mixins
|
||||
*/
|
||||
/**
|
||||
* Long content fade mixin
|
||||
*
|
||||
* Creates a fading overlay to signify that the content is longer
|
||||
* than the space allows.
|
||||
*/
|
||||
/**
|
||||
* Focus styles.
|
||||
*/
|
||||
/**
|
||||
* Applies editor left position to the selector passed as argument
|
||||
*/
|
||||
/**
|
||||
* Styles that are reused verbatim in a few places
|
||||
*/
|
||||
/**
|
||||
* Allows users to opt-out of animations via OS-level preferences.
|
||||
*/
|
||||
/**
|
||||
* Reset default styles for JavaScript UI based pages.
|
||||
* This is a WP-admin agnostic reset
|
||||
*/
|
||||
/**
|
||||
* Reset the WP Admin page styles for Gutenberg-like pages.
|
||||
*/
|
||||
.comment-awaiting-moderation {
|
||||
display: block;
|
||||
font-size: 0.875em;
|
||||
line-height: 1.5;
|
||||
}
|
1
wp-includes/blocks/comment-content/style-rtl.min.css
vendored
Normal file
1
wp-includes/blocks/comment-content/style-rtl.min.css
vendored
Normal file
@ -0,0 +1 @@
|
||||
.comment-awaiting-moderation{display:block;font-size:.875em;line-height:1.5}
|
81
wp-includes/blocks/comment-content/style.css
Normal file
81
wp-includes/blocks/comment-content/style.css
Normal file
@ -0,0 +1,81 @@
|
||||
/**
|
||||
* Colors
|
||||
*/
|
||||
/**
|
||||
* Breakpoints & Media Queries
|
||||
*/
|
||||
/**
|
||||
* SCSS Variables.
|
||||
*
|
||||
* Please use variables from this sheet to ensure consistency across the UI.
|
||||
* Don't add to this sheet unless you're pretty sure the value will be reused in many places.
|
||||
* For example, don't add rules to this sheet that affect block visuals. It's purely for UI.
|
||||
*/
|
||||
/**
|
||||
* Colors
|
||||
*/
|
||||
/**
|
||||
* Fonts & basic variables.
|
||||
*/
|
||||
/**
|
||||
* Grid System.
|
||||
* https://make.wordpress.org/design/2019/10/31/proposal-a-consistent-spacing-system-for-wordpress/
|
||||
*/
|
||||
/**
|
||||
* Dimensions.
|
||||
*/
|
||||
/**
|
||||
* Shadows.
|
||||
*/
|
||||
/**
|
||||
* Editor widths.
|
||||
*/
|
||||
/**
|
||||
* Block & Editor UI.
|
||||
*/
|
||||
/**
|
||||
* Block paddings.
|
||||
*/
|
||||
/**
|
||||
* React Native specific.
|
||||
* These variables do not appear to be used anywhere else.
|
||||
*/
|
||||
/**
|
||||
* Converts a hex value into the rgb equivalent.
|
||||
*
|
||||
* @param {string} hex - the hexadecimal value to convert
|
||||
* @return {string} comma separated rgb values
|
||||
*/
|
||||
/**
|
||||
* Breakpoint mixins
|
||||
*/
|
||||
/**
|
||||
* Long content fade mixin
|
||||
*
|
||||
* Creates a fading overlay to signify that the content is longer
|
||||
* than the space allows.
|
||||
*/
|
||||
/**
|
||||
* Focus styles.
|
||||
*/
|
||||
/**
|
||||
* Applies editor left position to the selector passed as argument
|
||||
*/
|
||||
/**
|
||||
* Styles that are reused verbatim in a few places
|
||||
*/
|
||||
/**
|
||||
* Allows users to opt-out of animations via OS-level preferences.
|
||||
*/
|
||||
/**
|
||||
* Reset default styles for JavaScript UI based pages.
|
||||
* This is a WP-admin agnostic reset
|
||||
*/
|
||||
/**
|
||||
* Reset the WP Admin page styles for Gutenberg-like pages.
|
||||
*/
|
||||
.comment-awaiting-moderation {
|
||||
display: block;
|
||||
font-size: 0.875em;
|
||||
line-height: 1.5;
|
||||
}
|
1
wp-includes/blocks/comment-content/style.min.css
vendored
Normal file
1
wp-includes/blocks/comment-content/style.min.css
vendored
Normal file
@ -0,0 +1 @@
|
||||
.comment-awaiting-moderation{display:block;font-size:.875em;line-height:1.5}
|
@ -29,10 +29,17 @@ function render_block_core_comments_title( $attributes ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$single_default_comment_label = $show_post_title ? __( 'Response to' ) : __( 'Response' );
|
||||
if ( $show_comments_count ) {
|
||||
$single_default_comment_label = $show_post_title ? __( 'One response to' ) : __( 'One response' );
|
||||
}
|
||||
$single_comment_label = ! empty( $attributes['singleCommentLabel'] ) ? $attributes['singleCommentLabel'] : $single_default_comment_label;
|
||||
|
||||
$multiple_default_comment_label = $show_post_title ? __( 'Responses to' ) : __( 'Responses' );
|
||||
if ( $show_comments_count ) {
|
||||
$multiple_default_comment_label = $show_post_title ? __( 'responses to' ) : __( 'responses' );
|
||||
}
|
||||
|
||||
$multiple_comment_label = ! empty( $attributes['multipleCommentsLabel'] ) ? $attributes['multipleCommentsLabel'] : $multiple_default_comment_label;
|
||||
|
||||
$comments_title = '%1$s %2$s %3$s';
|
||||
|
@ -101,7 +101,7 @@
|
||||
.wp-block-cover.has-parallax {
|
||||
background-attachment: fixed;
|
||||
}
|
||||
@supports (-webkit-overflow-scrolling: touch) {
|
||||
@supports (-webkit-touch-callout: inherit) {
|
||||
.wp-block-cover-image.has-parallax,
|
||||
.wp-block-cover.has-parallax {
|
||||
background-attachment: scroll;
|
||||
|
2
wp-includes/blocks/cover/style-rtl.min.css
vendored
2
wp-includes/blocks/cover/style-rtl.min.css
vendored
File diff suppressed because one or more lines are too long
@ -101,7 +101,7 @@
|
||||
.wp-block-cover.has-parallax {
|
||||
background-attachment: fixed;
|
||||
}
|
||||
@supports (-webkit-overflow-scrolling: touch) {
|
||||
@supports (-webkit-touch-callout: inherit) {
|
||||
.wp-block-cover-image.has-parallax,
|
||||
.wp-block-cover.has-parallax {
|
||||
background-attachment: scroll;
|
||||
|
2
wp-includes/blocks/cover/style.min.css
vendored
2
wp-includes/blocks/cover/style.min.css
vendored
File diff suppressed because one or more lines are too long
@ -150,9 +150,11 @@
|
||||
}
|
||||
.wp-block-latest-posts__featured-image.alignleft {
|
||||
margin-right: 1em;
|
||||
float: left;
|
||||
}
|
||||
.wp-block-latest-posts__featured-image.alignright {
|
||||
margin-left: 1em;
|
||||
float: right;
|
||||
}
|
||||
.wp-block-latest-posts__featured-image.aligncenter {
|
||||
margin-bottom: 1em;
|
||||
|
@ -1 +1 @@
|
||||
.wp-block-latest-posts.alignleft{margin-right:2em}.wp-block-latest-posts.alignright{margin-left:2em}.wp-block-latest-posts.wp-block-latest-posts__list{list-style:none;padding-right:0}.wp-block-latest-posts.wp-block-latest-posts__list li{clear:both}.wp-block-latest-posts.is-grid{display:flex;flex-wrap:wrap;padding:0}.wp-block-latest-posts.is-grid li{margin:0 0 1.25em 1.25em;width:100%}@media (min-width:600px){.wp-block-latest-posts.columns-2 li{width:calc(50% - .625em)}.wp-block-latest-posts.columns-2 li:nth-child(2n){margin-left:0}.wp-block-latest-posts.columns-3 li{width:calc(33.33333% - .83333em)}.wp-block-latest-posts.columns-3 li:nth-child(3n){margin-left:0}.wp-block-latest-posts.columns-4 li{width:calc(25% - .9375em)}.wp-block-latest-posts.columns-4 li:nth-child(4n){margin-left:0}.wp-block-latest-posts.columns-5 li{width:calc(20% - 1em)}.wp-block-latest-posts.columns-5 li:nth-child(5n){margin-left:0}.wp-block-latest-posts.columns-6 li{width:calc(16.66667% - 1.04167em)}.wp-block-latest-posts.columns-6 li:nth-child(6n){margin-left:0}}.wp-block-latest-posts__post-author,.wp-block-latest-posts__post-date{display:block;font-size:.8125em}.wp-block-latest-posts__post-excerpt{margin-top:.5em;margin-bottom:1em}.wp-block-latest-posts__featured-image a{display:inline-block}.wp-block-latest-posts__featured-image img{height:auto;width:auto;max-width:100%}.wp-block-latest-posts__featured-image.alignleft{margin-right:1em}.wp-block-latest-posts__featured-image.alignright{margin-left:1em}.wp-block-latest-posts__featured-image.aligncenter{margin-bottom:1em;text-align:center}
|
||||
.wp-block-latest-posts.alignleft{margin-right:2em}.wp-block-latest-posts.alignright{margin-left:2em}.wp-block-latest-posts.wp-block-latest-posts__list{list-style:none;padding-right:0}.wp-block-latest-posts.wp-block-latest-posts__list li{clear:both}.wp-block-latest-posts.is-grid{display:flex;flex-wrap:wrap;padding:0}.wp-block-latest-posts.is-grid li{margin:0 0 1.25em 1.25em;width:100%}@media (min-width:600px){.wp-block-latest-posts.columns-2 li{width:calc(50% - .625em)}.wp-block-latest-posts.columns-2 li:nth-child(2n){margin-left:0}.wp-block-latest-posts.columns-3 li{width:calc(33.33333% - .83333em)}.wp-block-latest-posts.columns-3 li:nth-child(3n){margin-left:0}.wp-block-latest-posts.columns-4 li{width:calc(25% - .9375em)}.wp-block-latest-posts.columns-4 li:nth-child(4n){margin-left:0}.wp-block-latest-posts.columns-5 li{width:calc(20% - 1em)}.wp-block-latest-posts.columns-5 li:nth-child(5n){margin-left:0}.wp-block-latest-posts.columns-6 li{width:calc(16.66667% - 1.04167em)}.wp-block-latest-posts.columns-6 li:nth-child(6n){margin-left:0}}.wp-block-latest-posts__post-author,.wp-block-latest-posts__post-date{display:block;font-size:.8125em}.wp-block-latest-posts__post-excerpt{margin-top:.5em;margin-bottom:1em}.wp-block-latest-posts__featured-image a{display:inline-block}.wp-block-latest-posts__featured-image img{height:auto;width:auto;max-width:100%}.wp-block-latest-posts__featured-image.alignleft{margin-right:1em;float:left}.wp-block-latest-posts__featured-image.alignright{margin-left:1em;float:right}.wp-block-latest-posts__featured-image.aligncenter{margin-bottom:1em;text-align:center}
|
@ -153,10 +153,14 @@
|
||||
.wp-block-latest-posts__featured-image.alignleft {
|
||||
/*rtl:ignore*/
|
||||
margin-right: 1em;
|
||||
/*rtl:ignore*/
|
||||
float: left;
|
||||
}
|
||||
.wp-block-latest-posts__featured-image.alignright {
|
||||
/*rtl:ignore*/
|
||||
margin-left: 1em;
|
||||
/*rtl:ignore*/
|
||||
float: right;
|
||||
}
|
||||
.wp-block-latest-posts__featured-image.aligncenter {
|
||||
margin-bottom: 1em;
|
||||
|
@ -1 +1 @@
|
||||
.wp-block-latest-posts.alignleft{margin-right:2em}.wp-block-latest-posts.alignright{margin-left:2em}.wp-block-latest-posts.wp-block-latest-posts__list{list-style:none;padding-left:0}.wp-block-latest-posts.wp-block-latest-posts__list li{clear:both}.wp-block-latest-posts.is-grid{display:flex;flex-wrap:wrap;padding:0}.wp-block-latest-posts.is-grid li{margin:0 1.25em 1.25em 0;width:100%}@media (min-width:600px){.wp-block-latest-posts.columns-2 li{width:calc(50% - .625em)}.wp-block-latest-posts.columns-2 li:nth-child(2n){margin-right:0}.wp-block-latest-posts.columns-3 li{width:calc(33.33333% - .83333em)}.wp-block-latest-posts.columns-3 li:nth-child(3n){margin-right:0}.wp-block-latest-posts.columns-4 li{width:calc(25% - .9375em)}.wp-block-latest-posts.columns-4 li:nth-child(4n){margin-right:0}.wp-block-latest-posts.columns-5 li{width:calc(20% - 1em)}.wp-block-latest-posts.columns-5 li:nth-child(5n){margin-right:0}.wp-block-latest-posts.columns-6 li{width:calc(16.66667% - 1.04167em)}.wp-block-latest-posts.columns-6 li:nth-child(6n){margin-right:0}}.wp-block-latest-posts__post-author,.wp-block-latest-posts__post-date{display:block;font-size:.8125em}.wp-block-latest-posts__post-excerpt{margin-top:.5em;margin-bottom:1em}.wp-block-latest-posts__featured-image a{display:inline-block}.wp-block-latest-posts__featured-image img{height:auto;width:auto;max-width:100%}.wp-block-latest-posts__featured-image.alignleft{margin-right:1em}.wp-block-latest-posts__featured-image.alignright{margin-left:1em}.wp-block-latest-posts__featured-image.aligncenter{margin-bottom:1em;text-align:center}
|
||||
.wp-block-latest-posts.alignleft{margin-right:2em}.wp-block-latest-posts.alignright{margin-left:2em}.wp-block-latest-posts.wp-block-latest-posts__list{list-style:none;padding-left:0}.wp-block-latest-posts.wp-block-latest-posts__list li{clear:both}.wp-block-latest-posts.is-grid{display:flex;flex-wrap:wrap;padding:0}.wp-block-latest-posts.is-grid li{margin:0 1.25em 1.25em 0;width:100%}@media (min-width:600px){.wp-block-latest-posts.columns-2 li{width:calc(50% - .625em)}.wp-block-latest-posts.columns-2 li:nth-child(2n){margin-right:0}.wp-block-latest-posts.columns-3 li{width:calc(33.33333% - .83333em)}.wp-block-latest-posts.columns-3 li:nth-child(3n){margin-right:0}.wp-block-latest-posts.columns-4 li{width:calc(25% - .9375em)}.wp-block-latest-posts.columns-4 li:nth-child(4n){margin-right:0}.wp-block-latest-posts.columns-5 li{width:calc(20% - 1em)}.wp-block-latest-posts.columns-5 li:nth-child(5n){margin-right:0}.wp-block-latest-posts.columns-6 li{width:calc(16.66667% - 1.04167em)}.wp-block-latest-posts.columns-6 li:nth-child(6n){margin-right:0}}.wp-block-latest-posts__post-author,.wp-block-latest-posts__post-date{display:block;font-size:.8125em}.wp-block-latest-posts__post-excerpt{margin-top:.5em;margin-bottom:1em}.wp-block-latest-posts__featured-image a{display:inline-block}.wp-block-latest-posts__featured-image img{height:auto;width:auto;max-width:100%}.wp-block-latest-posts__featured-image.alignleft{margin-right:1em;float:left}.wp-block-latest-posts__featured-image.alignright{margin-left:1em;float:right}.wp-block-latest-posts__featured-image.aligncenter{margin-bottom:1em;text-align:center}
|
@ -25,10 +25,14 @@ function render_block_core_post_comments_form( $attributes, $content, $block ) {
|
||||
|
||||
$wrapper_attributes = get_block_wrapper_attributes( array( 'class' => $classes ) );
|
||||
|
||||
add_filter( 'comment_form_defaults', 'post_comments_form_block_form_defaults' );
|
||||
|
||||
ob_start();
|
||||
comment_form( array(), $block->context['postId'] );
|
||||
$form = ob_get_clean();
|
||||
|
||||
remove_filter( 'comment_form_defaults', 'post_comments_form_block_form_defaults' );
|
||||
|
||||
// We use the outermost wrapping `<div />` returned by `comment_form()`
|
||||
// which is identified by its default classname `comment-respond` to inject
|
||||
// our wrapper attributes. This way, it is guaranteed that all styling applied
|
||||
@ -70,4 +74,3 @@ function post_comments_form_block_form_defaults( $fields ) {
|
||||
|
||||
return $fields;
|
||||
}
|
||||
add_filter( 'comment_form_defaults', 'post_comments_form_block_form_defaults' );
|
||||
|
@ -112,11 +112,15 @@
|
||||
.wp-block-post-comments .comment-meta {
|
||||
font-size: 0.875em;
|
||||
line-height: 1.5;
|
||||
margin-right: -3.25em;
|
||||
}
|
||||
.wp-block-post-comments .comment-meta b {
|
||||
font-weight: normal;
|
||||
}
|
||||
.wp-block-post-comments .comment-meta .comment-awaiting-moderation {
|
||||
margin-top: 1em;
|
||||
margin-bottom: 1em;
|
||||
display: block;
|
||||
}
|
||||
.wp-block-post-comments .comment-body .commentmetadata {
|
||||
font-size: 0.875em;
|
||||
}
|
||||
|
@ -1 +1 @@
|
||||
.wp-block-post-comments .commentlist{clear:both;list-style:none;margin:0;padding:0}.wp-block-post-comments .commentlist .comment{min-height:2.25em;padding-right:3.25em}.wp-block-post-comments .commentlist .comment p{font-size:1em;line-height:1.8;margin:1em 0}.wp-block-post-comments .commentlist .children{list-style:none;margin:0;padding:0}.wp-block-post-comments .comment-author{line-height:1.5}.wp-block-post-comments .comment-author .avatar{border-radius:1.5em;display:block;float:right;height:2.5em;margin-top:.5em;margin-left:.75em;width:2.5em}.wp-block-post-comments .comment-author cite{font-style:normal}.wp-block-post-comments .comment-meta{font-size:.875em;line-height:1.5;margin-right:-3.25em}.wp-block-post-comments .comment-meta b{font-weight:400}.wp-block-post-comments .comment-body .commentmetadata{font-size:.875em}.wp-block-post-comments .comment-form-author label,.wp-block-post-comments .comment-form-comment label,.wp-block-post-comments .comment-form-email label,.wp-block-post-comments .comment-form-url label{display:block;margin-bottom:.25em}.wp-block-post-comments .comment-form input:not([type=submit]):not([type=checkbox]),.wp-block-post-comments .comment-form textarea{display:block;box-sizing:border-box;width:100%}.wp-block-post-comments .comment-form-cookies-consent{display:flex;gap:.25em}.wp-block-post-comments .comment-form-cookies-consent #wp-comment-cookies-consent{margin-top:.35em}.wp-block-post-comments .reply{font-size:.875em;margin-bottom:1.4em}.wp-block-post-comments input:not([type=submit]),.wp-block-post-comments textarea{border:1px solid #949494;font-size:1em;font-family:inherit}.wp-block-post-comments input:not([type=submit]):not([type=checkbox]),.wp-block-post-comments textarea{padding:calc(.667em + 2px)}.wp-block-post-comments input[type=submit]{border:none}
|
||||
.wp-block-post-comments .commentlist{clear:both;list-style:none;margin:0;padding:0}.wp-block-post-comments .commentlist .comment{min-height:2.25em;padding-right:3.25em}.wp-block-post-comments .commentlist .comment p{font-size:1em;line-height:1.8;margin:1em 0}.wp-block-post-comments .commentlist .children{list-style:none;margin:0;padding:0}.wp-block-post-comments .comment-author{line-height:1.5}.wp-block-post-comments .comment-author .avatar{border-radius:1.5em;display:block;float:right;height:2.5em;margin-top:.5em;margin-left:.75em;width:2.5em}.wp-block-post-comments .comment-author cite{font-style:normal}.wp-block-post-comments .comment-meta{font-size:.875em;line-height:1.5}.wp-block-post-comments .comment-meta b{font-weight:400}.wp-block-post-comments .comment-meta .comment-awaiting-moderation{margin-top:1em;margin-bottom:1em;display:block}.wp-block-post-comments .comment-body .commentmetadata{font-size:.875em}.wp-block-post-comments .comment-form-author label,.wp-block-post-comments .comment-form-comment label,.wp-block-post-comments .comment-form-email label,.wp-block-post-comments .comment-form-url label{display:block;margin-bottom:.25em}.wp-block-post-comments .comment-form input:not([type=submit]):not([type=checkbox]),.wp-block-post-comments .comment-form textarea{display:block;box-sizing:border-box;width:100%}.wp-block-post-comments .comment-form-cookies-consent{display:flex;gap:.25em}.wp-block-post-comments .comment-form-cookies-consent #wp-comment-cookies-consent{margin-top:.35em}.wp-block-post-comments .reply{font-size:.875em;margin-bottom:1.4em}.wp-block-post-comments input:not([type=submit]),.wp-block-post-comments textarea{border:1px solid #949494;font-size:1em;font-family:inherit}.wp-block-post-comments input:not([type=submit]):not([type=checkbox]),.wp-block-post-comments textarea{padding:calc(.667em + 2px)}.wp-block-post-comments input[type=submit]{border:none}
|
@ -112,11 +112,15 @@
|
||||
.wp-block-post-comments .comment-meta {
|
||||
font-size: 0.875em;
|
||||
line-height: 1.5;
|
||||
margin-left: -3.25em;
|
||||
}
|
||||
.wp-block-post-comments .comment-meta b {
|
||||
font-weight: normal;
|
||||
}
|
||||
.wp-block-post-comments .comment-meta .comment-awaiting-moderation {
|
||||
margin-top: 1em;
|
||||
margin-bottom: 1em;
|
||||
display: block;
|
||||
}
|
||||
.wp-block-post-comments .comment-body .commentmetadata {
|
||||
font-size: 0.875em;
|
||||
}
|
||||
|
@ -1 +1 @@
|
||||
.wp-block-post-comments .commentlist{clear:both;list-style:none;margin:0;padding:0}.wp-block-post-comments .commentlist .comment{min-height:2.25em;padding-left:3.25em}.wp-block-post-comments .commentlist .comment p{font-size:1em;line-height:1.8;margin:1em 0}.wp-block-post-comments .commentlist .children{list-style:none;margin:0;padding:0}.wp-block-post-comments .comment-author{line-height:1.5}.wp-block-post-comments .comment-author .avatar{border-radius:1.5em;display:block;float:left;height:2.5em;margin-top:.5em;margin-right:.75em;width:2.5em}.wp-block-post-comments .comment-author cite{font-style:normal}.wp-block-post-comments .comment-meta{font-size:.875em;line-height:1.5;margin-left:-3.25em}.wp-block-post-comments .comment-meta b{font-weight:400}.wp-block-post-comments .comment-body .commentmetadata{font-size:.875em}.wp-block-post-comments .comment-form-author label,.wp-block-post-comments .comment-form-comment label,.wp-block-post-comments .comment-form-email label,.wp-block-post-comments .comment-form-url label{display:block;margin-bottom:.25em}.wp-block-post-comments .comment-form input:not([type=submit]):not([type=checkbox]),.wp-block-post-comments .comment-form textarea{display:block;box-sizing:border-box;width:100%}.wp-block-post-comments .comment-form-cookies-consent{display:flex;gap:.25em}.wp-block-post-comments .comment-form-cookies-consent #wp-comment-cookies-consent{margin-top:.35em}.wp-block-post-comments .reply{font-size:.875em;margin-bottom:1.4em}.wp-block-post-comments input:not([type=submit]),.wp-block-post-comments textarea{border:1px solid #949494;font-size:1em;font-family:inherit}.wp-block-post-comments input:not([type=submit]):not([type=checkbox]),.wp-block-post-comments textarea{padding:calc(.667em + 2px)}.wp-block-post-comments input[type=submit]{border:none}
|
||||
.wp-block-post-comments .commentlist{clear:both;list-style:none;margin:0;padding:0}.wp-block-post-comments .commentlist .comment{min-height:2.25em;padding-left:3.25em}.wp-block-post-comments .commentlist .comment p{font-size:1em;line-height:1.8;margin:1em 0}.wp-block-post-comments .commentlist .children{list-style:none;margin:0;padding:0}.wp-block-post-comments .comment-author{line-height:1.5}.wp-block-post-comments .comment-author .avatar{border-radius:1.5em;display:block;float:left;height:2.5em;margin-top:.5em;margin-right:.75em;width:2.5em}.wp-block-post-comments .comment-author cite{font-style:normal}.wp-block-post-comments .comment-meta{font-size:.875em;line-height:1.5}.wp-block-post-comments .comment-meta b{font-weight:400}.wp-block-post-comments .comment-meta .comment-awaiting-moderation{margin-top:1em;margin-bottom:1em;display:block}.wp-block-post-comments .comment-body .commentmetadata{font-size:.875em}.wp-block-post-comments .comment-form-author label,.wp-block-post-comments .comment-form-comment label,.wp-block-post-comments .comment-form-email label,.wp-block-post-comments .comment-form-url label{display:block;margin-bottom:.25em}.wp-block-post-comments .comment-form input:not([type=submit]):not([type=checkbox]),.wp-block-post-comments .comment-form textarea{display:block;box-sizing:border-box;width:100%}.wp-block-post-comments .comment-form-cookies-consent{display:flex;gap:.25em}.wp-block-post-comments .comment-form-cookies-consent #wp-comment-cookies-consent{margin-top:.35em}.wp-block-post-comments .reply{font-size:.875em;margin-bottom:1.4em}.wp-block-post-comments input:not([type=submit]),.wp-block-post-comments textarea{border:1px solid #949494;font-size:1em;font-family:inherit}.wp-block-post-comments input:not([type=submit]):not([type=checkbox]),.wp-block-post-comments textarea{padding:calc(.667em + 2px)}.wp-block-post-comments input[type=submit]{border:none}
|
10
wp-includes/css/dist/block-library/style-rtl.css
vendored
10
wp-includes/css/dist/block-library/style-rtl.css
vendored
@ -417,7 +417,7 @@
|
||||
.wp-block-cover.has-parallax {
|
||||
background-attachment: fixed;
|
||||
}
|
||||
@supports (-webkit-overflow-scrolling: touch) {
|
||||
@supports (-webkit-touch-callout: inherit) {
|
||||
.wp-block-cover-image.has-parallax,
|
||||
.wp-block-cover.has-parallax {
|
||||
background-attachment: scroll;
|
||||
@ -1435,9 +1435,11 @@ ol.wp-block-latest-comments {
|
||||
}
|
||||
.wp-block-latest-posts__featured-image.alignleft {
|
||||
margin-right: 1em;
|
||||
float: left;
|
||||
}
|
||||
.wp-block-latest-posts__featured-image.alignright {
|
||||
margin-left: 1em;
|
||||
float: right;
|
||||
}
|
||||
.wp-block-latest-posts__featured-image.aligncenter {
|
||||
margin-bottom: 1em;
|
||||
@ -2137,11 +2139,15 @@ p.has-background {
|
||||
.wp-block-post-comments .comment-meta {
|
||||
font-size: 0.875em;
|
||||
line-height: 1.5;
|
||||
margin-right: -3.25em;
|
||||
}
|
||||
.wp-block-post-comments .comment-meta b {
|
||||
font-weight: normal;
|
||||
}
|
||||
.wp-block-post-comments .comment-meta .comment-awaiting-moderation {
|
||||
margin-top: 1em;
|
||||
margin-bottom: 1em;
|
||||
display: block;
|
||||
}
|
||||
.wp-block-post-comments .comment-body .commentmetadata {
|
||||
font-size: 0.875em;
|
||||
}
|
||||
|
File diff suppressed because one or more lines are too long
12
wp-includes/css/dist/block-library/style.css
vendored
12
wp-includes/css/dist/block-library/style.css
vendored
@ -422,7 +422,7 @@
|
||||
.wp-block-cover.has-parallax {
|
||||
background-attachment: fixed;
|
||||
}
|
||||
@supports (-webkit-overflow-scrolling: touch) {
|
||||
@supports (-webkit-touch-callout: inherit) {
|
||||
.wp-block-cover-image.has-parallax,
|
||||
.wp-block-cover.has-parallax {
|
||||
background-attachment: scroll;
|
||||
@ -1448,10 +1448,14 @@ ol.wp-block-latest-comments {
|
||||
.wp-block-latest-posts__featured-image.alignleft {
|
||||
/*rtl:ignore*/
|
||||
margin-right: 1em;
|
||||
/*rtl:ignore*/
|
||||
float: left;
|
||||
}
|
||||
.wp-block-latest-posts__featured-image.alignright {
|
||||
/*rtl:ignore*/
|
||||
margin-left: 1em;
|
||||
/*rtl:ignore*/
|
||||
float: right;
|
||||
}
|
||||
.wp-block-latest-posts__featured-image.aligncenter {
|
||||
margin-bottom: 1em;
|
||||
@ -2161,11 +2165,15 @@ p.has-background {
|
||||
.wp-block-post-comments .comment-meta {
|
||||
font-size: 0.875em;
|
||||
line-height: 1.5;
|
||||
margin-left: -3.25em;
|
||||
}
|
||||
.wp-block-post-comments .comment-meta b {
|
||||
font-weight: normal;
|
||||
}
|
||||
.wp-block-post-comments .comment-meta .comment-awaiting-moderation {
|
||||
margin-top: 1em;
|
||||
margin-bottom: 1em;
|
||||
display: block;
|
||||
}
|
||||
.wp-block-post-comments .comment-body .commentmetadata {
|
||||
font-size: 0.875em;
|
||||
}
|
||||
|
File diff suppressed because one or more lines are too long
179
wp-includes/js/dist/block-editor.js
vendored
179
wp-includes/js/dist/block-editor.js
vendored
@ -2919,7 +2919,6 @@ __webpack_require__.d(selectors_namespaceObject, {
|
||||
"__unstableIsSelectionCollapsed": function() { return __unstableIsSelectionCollapsed; },
|
||||
"__unstableIsSelectionMergeable": function() { return __unstableIsSelectionMergeable; },
|
||||
"areInnerBlocksControlled": function() { return areInnerBlocksControlled; },
|
||||
"canEditBlock": function() { return canEditBlock; },
|
||||
"canInsertBlockType": function() { return canInsertBlockType; },
|
||||
"canInsertBlocks": function() { return canInsertBlocks; },
|
||||
"canLockBlockType": function() { return canLockBlockType; },
|
||||
@ -6924,28 +6923,6 @@ function canMoveBlocks(state, clientIds) {
|
||||
let rootClientId = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
|
||||
return clientIds.every(clientId => canMoveBlock(state, clientId, rootClientId));
|
||||
}
|
||||
/**
|
||||
* Determines if the given block is allowed to be edited.
|
||||
*
|
||||
* @param {Object} state Editor state.
|
||||
* @param {string} clientId The block client Id.
|
||||
*
|
||||
* @return {boolean} Whether the given block is allowed to be edited.
|
||||
*/
|
||||
|
||||
function canEditBlock(state, clientId) {
|
||||
const attributes = getBlockAttributes(state, clientId);
|
||||
|
||||
if (attributes === null) {
|
||||
return true;
|
||||
}
|
||||
|
||||
const {
|
||||
lock
|
||||
} = attributes; // When the edit is true, we cannot edit the block.
|
||||
|
||||
return !(lock !== null && lock !== void 0 && lock.edit);
|
||||
}
|
||||
/**
|
||||
* Determines if the given block type can be locked/unlocked by a user.
|
||||
*
|
||||
@ -20335,7 +20312,8 @@ function useSelectionObserver() {
|
||||
selectionChange
|
||||
} = (0,external_wp_data_namespaceObject.useDispatch)(store);
|
||||
const {
|
||||
getBlockParents
|
||||
getBlockParents,
|
||||
getBlockSelectionStart
|
||||
} = (0,external_wp_data_namespaceObject.useSelect)(store);
|
||||
return (0,external_wp_compose_namespaceObject.useRefEffect)(node => {
|
||||
const {
|
||||
@ -20345,29 +20323,63 @@ function useSelectionObserver() {
|
||||
defaultView
|
||||
} = ownerDocument;
|
||||
|
||||
function onSelectionChange() {
|
||||
function onSelectionChange(event) {
|
||||
const selection = defaultView.getSelection(); // If no selection is found, end multi selection and disable the
|
||||
// contentEditable wrapper.
|
||||
|
||||
if (!selection.rangeCount || selection.isCollapsed) {
|
||||
if (!selection.rangeCount) {
|
||||
use_selection_observer_setContentEditableWrapper(node, false);
|
||||
return;
|
||||
} // If selection is collapsed and we haven't used `shift+click`,
|
||||
// end multi selection and disable the contentEditable wrapper.
|
||||
// We have to check about `shift+click` case because elements
|
||||
// that don't support text selection might be involved, and we might
|
||||
// update the clientIds to multi-select blocks.
|
||||
// For now we check if the event is a `mouse` event.
|
||||
|
||||
|
||||
const isClickShift = event.shiftKey && event.type === 'mouseup';
|
||||
|
||||
if (selection.isCollapsed && !isClickShift) {
|
||||
use_selection_observer_setContentEditableWrapper(node, false);
|
||||
return;
|
||||
}
|
||||
|
||||
const clientId = getBlockClientId(extractSelectionStartNode(selection));
|
||||
const endClientId = getBlockClientId(extractSelectionEndNode(selection)); // If the selection did not involve a block, return early.
|
||||
let startClientId = getBlockClientId(extractSelectionStartNode(selection));
|
||||
let endClientId = getBlockClientId(extractSelectionEndNode(selection)); // If the selection has changed and we had pressed `shift+click`,
|
||||
// we need to check if in an element that doesn't support
|
||||
// text selection has been clicked.
|
||||
|
||||
if (clientId === undefined && endClientId === undefined) {
|
||||
if (isClickShift) {
|
||||
const selectedClientId = getBlockSelectionStart();
|
||||
const clickedClientId = getBlockClientId(event.target); // `endClientId` is not defined if we end the selection by clicking a non-selectable block.
|
||||
// We need to check if there was already a selection with a non-selectable focusNode.
|
||||
|
||||
const focusNodeIsNonSelectable = clickedClientId !== endClientId;
|
||||
|
||||
if (startClientId === endClientId && selection.isCollapsed || !endClientId || focusNodeIsNonSelectable) {
|
||||
endClientId = clickedClientId;
|
||||
} // Handle the case when we have a non-selectable block
|
||||
// selected and click another one.
|
||||
|
||||
|
||||
if (startClientId !== selectedClientId) {
|
||||
startClientId = selectedClientId;
|
||||
}
|
||||
} // If the selection did not involve a block, return.
|
||||
|
||||
|
||||
if (startClientId === undefined && endClientId === undefined) {
|
||||
use_selection_observer_setContentEditableWrapper(node, false);
|
||||
return;
|
||||
}
|
||||
|
||||
const isSingularSelection = clientId === endClientId;
|
||||
const isSingularSelection = startClientId === endClientId;
|
||||
|
||||
if (isSingularSelection) {
|
||||
selectBlock(clientId);
|
||||
selectBlock(startClientId);
|
||||
} else {
|
||||
const startPath = [...getBlockParents(clientId), clientId];
|
||||
const startPath = [...getBlockParents(startClientId), startClientId];
|
||||
const endPath = [...getBlockParents(endClientId), endClientId];
|
||||
const depth = findDepth(startPath, endPath);
|
||||
multiSelect(startPath[depth], endPath[depth]);
|
||||
@ -20415,12 +20427,10 @@ function useSelectionObserver() {
|
||||
|
||||
function useClickSelection() {
|
||||
const {
|
||||
multiSelect,
|
||||
selectBlock
|
||||
} = (0,external_wp_data_namespaceObject.useDispatch)(store);
|
||||
const {
|
||||
isSelectionEnabled,
|
||||
getBlockParents,
|
||||
getBlockSelectionStart,
|
||||
hasMultiSelection
|
||||
} = (0,external_wp_data_namespaceObject.useSelect)(store);
|
||||
@ -20456,7 +20466,7 @@ function useClickSelection() {
|
||||
return () => {
|
||||
node.removeEventListener('mousedown', onMouseDown);
|
||||
};
|
||||
}, [multiSelect, selectBlock, isSelectionEnabled, getBlockParents, getBlockSelectionStart, hasMultiSelection]);
|
||||
}, [selectBlock, isSelectionEnabled, getBlockSelectionStart, hasMultiSelection]);
|
||||
}
|
||||
|
||||
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/writing-flow/use-input.js
|
||||
@ -24734,7 +24744,8 @@ function QuickInserter(_ref) {
|
||||
onSelect,
|
||||
rootClientId,
|
||||
clientId,
|
||||
isAppender
|
||||
isAppender,
|
||||
prioritizePatterns
|
||||
} = _ref;
|
||||
const [filterValue, setFilterValue] = (0,external_wp_element_namespaceObject.useState)('');
|
||||
const [destinationRootClientId, onInsertBlocks] = use_insertion_point({
|
||||
@ -24747,8 +24758,7 @@ function QuickInserter(_ref) {
|
||||
const [patterns] = use_patterns_state(onInsertBlocks, destinationRootClientId);
|
||||
const {
|
||||
setInserterIsOpened,
|
||||
insertionIndex,
|
||||
prioritizePatterns
|
||||
insertionIndex
|
||||
} = (0,external_wp_data_namespaceObject.useSelect)(select => {
|
||||
const {
|
||||
getSettings,
|
||||
@ -24760,10 +24770,9 @@ function QuickInserter(_ref) {
|
||||
const blockCount = getBlockCount();
|
||||
return {
|
||||
setInserterIsOpened: settings.__experimentalSetIsInserterOpened,
|
||||
prioritizePatterns: settings.__experimentalPreferPatternsOnRoot && !rootClientId && index > 0 && (index < blockCount || blockCount === 0),
|
||||
insertionIndex: index === -1 ? blockCount : index
|
||||
};
|
||||
}, [clientId, rootClientId]);
|
||||
}, [clientId]);
|
||||
const showPatterns = patterns.length && (!!filterValue || prioritizePatterns);
|
||||
const showSearch = showPatterns && patterns.length > SEARCH_THRESHOLD || blockTypes.length > SEARCH_THRESHOLD;
|
||||
(0,external_wp_element_namespaceObject.useEffect)(() => {
|
||||
@ -24855,13 +24864,16 @@ const defaultRenderToggle = _ref => {
|
||||
isOpen,
|
||||
blockTitle,
|
||||
hasSingleBlockType,
|
||||
toggleProps = {}
|
||||
toggleProps = {},
|
||||
prioritizePatterns
|
||||
} = _ref;
|
||||
let label;
|
||||
|
||||
if (hasSingleBlockType) {
|
||||
label = (0,external_wp_i18n_namespaceObject.sprintf)( // translators: %s: the name of the block when there is only one
|
||||
(0,external_wp_i18n_namespaceObject._x)('Add %s', 'directly add the only allowed block'), blockTitle);
|
||||
} else if (prioritizePatterns) {
|
||||
label = (0,external_wp_i18n_namespaceObject.__)('Add pattern');
|
||||
} else {
|
||||
label = (0,external_wp_i18n_namespaceObject._x)('Add block', 'Generic label for block inserter button');
|
||||
}
|
||||
@ -24934,7 +24946,8 @@ class Inserter extends external_wp_element_namespaceObject.Component {
|
||||
directInsertBlock,
|
||||
toggleProps,
|
||||
hasItems,
|
||||
renderToggle = defaultRenderToggle
|
||||
renderToggle = defaultRenderToggle,
|
||||
prioritizePatterns
|
||||
} = this.props;
|
||||
return renderToggle({
|
||||
onToggle,
|
||||
@ -24943,7 +24956,8 @@ class Inserter extends external_wp_element_namespaceObject.Component {
|
||||
blockTitle,
|
||||
hasSingleBlockType,
|
||||
directInsertBlock,
|
||||
toggleProps
|
||||
toggleProps,
|
||||
prioritizePatterns
|
||||
});
|
||||
}
|
||||
/**
|
||||
@ -24968,7 +24982,8 @@ class Inserter extends external_wp_element_namespaceObject.Component {
|
||||
showInserterHelpPanel,
|
||||
// This prop is experimental to give some time for the quick inserter to mature
|
||||
// Feel free to make them stable after a few releases.
|
||||
__experimentalIsQuick: isQuick
|
||||
__experimentalIsQuick: isQuick,
|
||||
prioritizePatterns
|
||||
} = this.props;
|
||||
|
||||
if (isQuick) {
|
||||
@ -24978,7 +24993,8 @@ class Inserter extends external_wp_element_namespaceObject.Component {
|
||||
},
|
||||
rootClientId: rootClientId,
|
||||
clientId: clientId,
|
||||
isAppender: isAppender
|
||||
isAppender: isAppender,
|
||||
prioritizePatterns: prioritizePatterns
|
||||
});
|
||||
}
|
||||
|
||||
@ -25035,7 +25051,10 @@ class Inserter extends external_wp_element_namespaceObject.Component {
|
||||
getBlockRootClientId,
|
||||
hasInserterItems,
|
||||
__experimentalGetAllowedBlocks,
|
||||
__experimentalGetDirectInsertBlock
|
||||
__experimentalGetDirectInsertBlock,
|
||||
getBlockIndex,
|
||||
getBlockCount,
|
||||
getSettings
|
||||
} = select(store);
|
||||
const {
|
||||
getBlockVariations
|
||||
@ -25046,6 +25065,9 @@ class Inserter extends external_wp_element_namespaceObject.Component {
|
||||
|
||||
const directInsertBlock = __experimentalGetDirectInsertBlock(rootClientId);
|
||||
|
||||
const index = getBlockIndex(clientId);
|
||||
const blockCount = getBlockCount();
|
||||
const settings = getSettings();
|
||||
const hasSingleBlockType = (0,external_lodash_namespaceObject.size)(allowedBlocks) === 1 && (0,external_lodash_namespaceObject.size)(getBlockVariations(allowedBlocks[0].name, 'inserter')) === 0;
|
||||
let allowedBlockType = false;
|
||||
|
||||
@ -25059,7 +25081,8 @@ class Inserter extends external_wp_element_namespaceObject.Component {
|
||||
blockTitle: allowedBlockType ? allowedBlockType.title : '',
|
||||
allowedBlockType,
|
||||
directInsertBlock,
|
||||
rootClientId
|
||||
rootClientId,
|
||||
prioritizePatterns: settings.__experimentalPreferPatternsOnRoot && !rootClientId && index > 0 && (index < blockCount || blockCount === 0)
|
||||
};
|
||||
}), (0,external_wp_data_namespaceObject.withDispatch)((dispatch, ownProps, _ref5) => {
|
||||
let {
|
||||
@ -29291,7 +29314,6 @@ const lock = (0,external_wp_element_namespaceObject.createElement)(external_wp_p
|
||||
function useBlockLock(clientId) {
|
||||
return (0,external_wp_data_namespaceObject.useSelect)(select => {
|
||||
const {
|
||||
canEditBlock,
|
||||
canMoveBlock,
|
||||
canRemoveBlock,
|
||||
canLockBlockType,
|
||||
@ -29299,15 +29321,13 @@ function useBlockLock(clientId) {
|
||||
getBlockRootClientId
|
||||
} = select(store);
|
||||
const rootClientId = getBlockRootClientId(clientId);
|
||||
const canEdit = canEditBlock(clientId);
|
||||
const canMove = canMoveBlock(clientId, rootClientId);
|
||||
const canRemove = canRemoveBlock(clientId, rootClientId);
|
||||
return {
|
||||
canEdit,
|
||||
canMove,
|
||||
canRemove,
|
||||
canLock: canLockBlockType(getBlockName(clientId)),
|
||||
isLocked: !canEdit || !canMove || !canRemove
|
||||
isLocked: !canMove || !canRemove
|
||||
};
|
||||
}, [clientId]);
|
||||
}
|
||||
@ -29324,7 +29344,6 @@ function useBlockLock(clientId) {
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
@ -29342,21 +29361,9 @@ function BlockLockModal(_ref) {
|
||||
remove: false
|
||||
});
|
||||
const {
|
||||
canEdit,
|
||||
canMove,
|
||||
canRemove
|
||||
} = useBlockLock(clientId);
|
||||
const {
|
||||
isReusable
|
||||
} = (0,external_wp_data_namespaceObject.useSelect)(select => {
|
||||
const {
|
||||
getBlockName
|
||||
} = select(store);
|
||||
const blockName = getBlockName(clientId);
|
||||
return {
|
||||
isReusable: (0,external_wp_blocks_namespaceObject.isReusableBlock)((0,external_wp_blocks_namespaceObject.getBlockType)(blockName))
|
||||
};
|
||||
}, [clientId]);
|
||||
const {
|
||||
updateBlockAttributes
|
||||
} = (0,external_wp_data_namespaceObject.useDispatch)(store);
|
||||
@ -29365,12 +29372,9 @@ function BlockLockModal(_ref) {
|
||||
(0,external_wp_element_namespaceObject.useEffect)(() => {
|
||||
setLock({
|
||||
move: !canMove,
|
||||
remove: !canRemove,
|
||||
...(isReusable ? {
|
||||
edit: !canEdit
|
||||
} : {})
|
||||
remove: !canRemove
|
||||
});
|
||||
}, [canEdit, canMove, canRemove, isReusable]);
|
||||
}, [canMove, canRemove]);
|
||||
const isAllChecked = Object.values(lock).every(Boolean);
|
||||
const isMixed = Object.values(lock).some(Boolean) && !isAllChecked;
|
||||
return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Modal, {
|
||||
@ -29401,24 +29405,11 @@ function BlockLockModal(_ref) {
|
||||
indeterminate: isMixed,
|
||||
onChange: newValue => setLock({
|
||||
move: newValue,
|
||||
remove: newValue,
|
||||
...(isReusable ? {
|
||||
edit: newValue
|
||||
} : {})
|
||||
remove: newValue
|
||||
})
|
||||
}), (0,external_wp_element_namespaceObject.createElement)("ul", {
|
||||
className: "block-editor-block-lock-modal__checklist"
|
||||
}, isReusable && (0,external_wp_element_namespaceObject.createElement)("li", {
|
||||
className: "block-editor-block-lock-modal__checklist-item"
|
||||
}, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.CheckboxControl, {
|
||||
label: (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_i18n_namespaceObject.__)('Restrict editing'), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Icon, {
|
||||
icon: lock.edit ? library_lock : library_unlock
|
||||
})),
|
||||
checked: !!lock.edit,
|
||||
onChange: edit => setLock(prevLock => ({ ...prevLock,
|
||||
edit
|
||||
}))
|
||||
})), (0,external_wp_element_namespaceObject.createElement)("li", {
|
||||
}, (0,external_wp_element_namespaceObject.createElement)("li", {
|
||||
className: "block-editor-block-lock-modal__checklist-item"
|
||||
}, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.CheckboxControl, {
|
||||
label: (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_i18n_namespaceObject.__)('Disable movement'), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Icon, {
|
||||
@ -29854,7 +29845,6 @@ function BlockLockToolbar(_ref) {
|
||||
} = _ref;
|
||||
const blockInformation = useBlockDisplayInformation(clientId);
|
||||
const {
|
||||
canEdit,
|
||||
canMove,
|
||||
canRemove,
|
||||
canLock
|
||||
@ -29865,7 +29855,7 @@ function BlockLockToolbar(_ref) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (canEdit && canMove && canRemove) {
|
||||
if (canMove && canRemove) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@ -38292,7 +38282,6 @@ function BlockContentOverlay(_ref) {
|
||||
const [isOverlayActive, setIsOverlayActive] = (0,external_wp_element_namespaceObject.useState)(true);
|
||||
const [isHovered, setIsHovered] = (0,external_wp_element_namespaceObject.useState)(false);
|
||||
const {
|
||||
canEdit,
|
||||
isParentSelected,
|
||||
hasChildSelected,
|
||||
isDraggingBlocks,
|
||||
@ -38302,11 +38291,9 @@ function BlockContentOverlay(_ref) {
|
||||
isBlockSelected,
|
||||
hasSelectedInnerBlock,
|
||||
isDraggingBlocks: _isDraggingBlocks,
|
||||
isBlockHighlighted,
|
||||
canEditBlock
|
||||
isBlockHighlighted
|
||||
} = select(store);
|
||||
return {
|
||||
canEdit: canEditBlock(clientId),
|
||||
isParentSelected: isBlockSelected(clientId),
|
||||
hasChildSelected: hasSelectedInnerBlock(clientId, true),
|
||||
isDraggingBlocks: _isDraggingBlocks(),
|
||||
@ -38319,13 +38306,7 @@ function BlockContentOverlay(_ref) {
|
||||
'is-dragging-blocks': isDraggingBlocks
|
||||
});
|
||||
(0,external_wp_element_namespaceObject.useEffect)(() => {
|
||||
// The overlay is always active when editing is locked.
|
||||
if (!canEdit) {
|
||||
setIsOverlayActive(true);
|
||||
return;
|
||||
} // Reenable when blocks are not in use.
|
||||
|
||||
|
||||
// Reenable when blocks are not in use.
|
||||
if (!isParentSelected && !hasChildSelected && !isOverlayActive) {
|
||||
setIsOverlayActive(true);
|
||||
} // Disable if parent selected by another means (such as list view).
|
||||
@ -38343,7 +38324,7 @@ function BlockContentOverlay(_ref) {
|
||||
if (hasChildSelected && isOverlayActive) {
|
||||
setIsOverlayActive(false);
|
||||
}
|
||||
}, [isParentSelected, hasChildSelected, isOverlayActive, isHovered, canEdit]); // Disabled because the overlay div doesn't actually have a role or functionality
|
||||
}, [isParentSelected, hasChildSelected, isOverlayActive, isHovered]); // Disabled because the overlay div doesn't actually have a role or functionality
|
||||
// as far as the a11y is concerned. We're just catching the first click so that
|
||||
// the block can be selected without interacting with its contents.
|
||||
|
||||
@ -38353,7 +38334,7 @@ function BlockContentOverlay(_ref) {
|
||||
className: classes,
|
||||
onMouseEnter: () => setIsHovered(true),
|
||||
onMouseLeave: () => setIsHovered(false),
|
||||
onMouseUp: isOverlayActive && canEdit ? () => setIsOverlayActive(false) : undefined
|
||||
onMouseUp: isOverlayActive ? () => setIsOverlayActive(false) : undefined
|
||||
}), wrapperProps === null || wrapperProps === void 0 ? void 0 : wrapperProps.children);
|
||||
}
|
||||
/* eslint-enable jsx-a11y/no-static-element-interactions */
|
||||
|
4
wp-includes/js/dist/block-editor.min.js
vendored
4
wp-includes/js/dist/block-editor.min.js
vendored
File diff suppressed because one or more lines are too long
115
wp-includes/js/dist/block-library.js
vendored
115
wp-includes/js/dist/block-library.js
vendored
@ -9607,12 +9607,14 @@ function comments_title_edit_Edit(_ref) {
|
||||
})));
|
||||
const postTitle = isSiteEditor ? (0,external_wp_i18n_namespaceObject.__)('"Post Title"') : `"${rawTitle}"`;
|
||||
const singlePlaceholder = showPostTitle ? (0,external_wp_i18n_namespaceObject.__)('One response to ') : (0,external_wp_i18n_namespaceObject.__)('One response');
|
||||
const multiplePlaceholder = showPostTitle ? (0,external_wp_i18n_namespaceObject.__)('Responses to ') : (0,external_wp_i18n_namespaceObject.__)('Responses');
|
||||
const singlePlaceholderNoCount = showPostTitle ? (0,external_wp_i18n_namespaceObject.__)('Response to ') : (0,external_wp_i18n_namespaceObject.__)('Response');
|
||||
const multiplePlaceholder = showPostTitle ? (0,external_wp_i18n_namespaceObject.__)('responses to ') : (0,external_wp_i18n_namespaceObject.__)('responses');
|
||||
const multiplePlaceholderNoCount = showPostTitle ? (0,external_wp_i18n_namespaceObject.__)('Responses to ') : (0,external_wp_i18n_namespaceObject.__)('Responses');
|
||||
return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, blockControls, inspectorControls, (0,external_wp_element_namespaceObject.createElement)(TagName, blockProps, editingMode === 'singular' || commentsCount === 1 ? (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.PlainText, {
|
||||
__experimentalVersion: 2,
|
||||
tagName: "span",
|
||||
"aria-label": singlePlaceholder,
|
||||
placeholder: singlePlaceholder,
|
||||
"aria-label": showCommentsCount ? singlePlaceholder : singlePlaceholderNoCount,
|
||||
placeholder: showCommentsCount ? singlePlaceholder : singlePlaceholderNoCount,
|
||||
value: singleCommentLabel,
|
||||
onChange: newLabel => setAttributes({
|
||||
singleCommentLabel: newLabel
|
||||
@ -9620,8 +9622,8 @@ function comments_title_edit_Edit(_ref) {
|
||||
}), showPostTitle ? postTitle : null) : (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, showCommentsCount ? commentsCount : null, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.PlainText, {
|
||||
__experimentalVersion: 2,
|
||||
tagName: "span",
|
||||
"aria-label": showCommentsCount ? ` ${multiplePlaceholder}` : multiplePlaceholder,
|
||||
placeholder: showCommentsCount ? ` ${multiplePlaceholder}` : multiplePlaceholder,
|
||||
"aria-label": showCommentsCount ? ` ${multiplePlaceholder}` : multiplePlaceholderNoCount,
|
||||
placeholder: showCommentsCount ? ` ${multiplePlaceholder}` : multiplePlaceholderNoCount,
|
||||
value: multipleCommentsLabel,
|
||||
onChange: newLabel => setAttributes({
|
||||
multipleCommentsLabel: newLabel
|
||||
@ -25106,20 +25108,18 @@ function NavigationInnerBlocks(_ref) {
|
||||
} = _ref;
|
||||
const {
|
||||
isImmediateParentOfSelectedBlock,
|
||||
selectedBlockHasDescendants,
|
||||
selectedBlockHasChildren,
|
||||
isSelected
|
||||
} = (0,external_wp_data_namespaceObject.useSelect)(select => {
|
||||
var _getClientIdsOfDescen;
|
||||
|
||||
const {
|
||||
getClientIdsOfDescendants,
|
||||
getBlockCount,
|
||||
hasSelectedInnerBlock,
|
||||
getSelectedBlockClientId
|
||||
} = select(external_wp_blockEditor_namespaceObject.store);
|
||||
const selectedBlockId = getSelectedBlockClientId();
|
||||
return {
|
||||
isImmediateParentOfSelectedBlock: hasSelectedInnerBlock(clientId, false),
|
||||
selectedBlockHasDescendants: !!((_getClientIdsOfDescen = getClientIdsOfDescendants([selectedBlockId])) !== null && _getClientIdsOfDescen !== void 0 && _getClientIdsOfDescen.length),
|
||||
selectedBlockHasChildren: !!getBlockCount(selectedBlockId),
|
||||
// This prop is already available but computing it here ensures it's
|
||||
// fresh compared to isImmediateParentOfSelectedBlock.
|
||||
isSelected: selectedBlockId === clientId
|
||||
@ -25135,7 +25135,7 @@ function NavigationInnerBlocks(_ref) {
|
||||
// doesn't itself have children, show the standard appender. Else show no
|
||||
// appender.
|
||||
|
||||
const parentOrChildHasSelection = isSelected || isImmediateParentOfSelectedBlock && !selectedBlockHasDescendants;
|
||||
const parentOrChildHasSelection = isSelected || isImmediateParentOfSelectedBlock && !selectedBlockHasChildren;
|
||||
const placeholder = (0,external_wp_element_namespaceObject.useMemo)(() => (0,external_wp_element_namespaceObject.createElement)(placeholder_preview, null), []);
|
||||
const hasMenuItems = !!(blocks !== null && blocks !== void 0 && blocks.length); // If there is a `ref` attribute pointing to a `wp_navigation` but
|
||||
// that menu has no **items** (i.e. empty) then show a placeholder.
|
||||
@ -25158,7 +25158,7 @@ function NavigationInnerBlocks(_ref) {
|
||||
// This should be a temporary fix, to be replaced by improvements to
|
||||
// the sibling inserter.
|
||||
// See https://github.com/WordPress/gutenberg/issues/37572.
|
||||
renderAppender: isSelected || isImmediateParentOfSelectedBlock && !selectedBlockHasDescendants || // Show the appender while dragging to allow inserting element between item and the appender.
|
||||
renderAppender: isSelected || isImmediateParentOfSelectedBlock && !selectedBlockHasChildren || // Show the appender while dragging to allow inserting element between item and the appender.
|
||||
parentOrChildHasSelection ? external_wp_blockEditor_namespaceObject.InnerBlocks.ButtonBlockAppender : false,
|
||||
// Template lock set to false here so that the Nav
|
||||
// Block on the experimental menus screen does not
|
||||
@ -27736,10 +27736,27 @@ function navStripHTML(html) {
|
||||
|
||||
function LinkControlTransforms(_ref) {
|
||||
let {
|
||||
block,
|
||||
transforms,
|
||||
clientId,
|
||||
replace
|
||||
} = _ref;
|
||||
const {
|
||||
getBlock,
|
||||
blockTransforms
|
||||
} = (0,external_wp_data_namespaceObject.useSelect)(select => {
|
||||
const {
|
||||
getBlock: _getBlock,
|
||||
getBlockRootClientId,
|
||||
getBlockTransformItems
|
||||
} = select(external_wp_blockEditor_namespaceObject.store);
|
||||
return {
|
||||
getBlock: _getBlock,
|
||||
blockTransforms: getBlockTransformItems([_getBlock(clientId)], getBlockRootClientId(clientId))
|
||||
};
|
||||
}, [clientId]);
|
||||
const featuredBlocks = ['core/site-logo', 'core/social-links', 'core/search'];
|
||||
const transforms = blockTransforms.filter(item => {
|
||||
return featuredBlocks.includes(item.name);
|
||||
});
|
||||
|
||||
if (!(transforms !== null && transforms !== void 0 && transforms.length)) {
|
||||
return null;
|
||||
@ -27754,7 +27771,7 @@ function LinkControlTransforms(_ref) {
|
||||
}, transforms.map((item, index) => {
|
||||
return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, {
|
||||
key: `transform-${index}`,
|
||||
onClick: () => replace(block.clientId, (0,external_wp_blocks_namespaceObject.switchToBlockType)(block, item.name)),
|
||||
onClick: () => replace(clientId, (0,external_wp_blocks_namespaceObject.switchToBlockType)(getBlock(clientId), item.name)),
|
||||
className: "link-control-transform__item"
|
||||
}, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockIcon, {
|
||||
icon: item.icon
|
||||
@ -27813,39 +27830,26 @@ function NavigationLinkEdit(_ref2) {
|
||||
isAtMaxNesting,
|
||||
isTopLevelLink,
|
||||
isParentOfSelectedBlock,
|
||||
hasDescendants,
|
||||
hasChildren,
|
||||
userCanCreatePages,
|
||||
userCanCreatePosts,
|
||||
thisBlock,
|
||||
blockTransforms
|
||||
userCanCreatePosts
|
||||
} = (0,external_wp_data_namespaceObject.useSelect)(select => {
|
||||
var _getClientIdsOfDescen;
|
||||
|
||||
const {
|
||||
getBlock,
|
||||
getBlocks,
|
||||
getBlockCount,
|
||||
getBlockName,
|
||||
getBlockRootClientId,
|
||||
getClientIdsOfDescendants,
|
||||
hasSelectedInnerBlock,
|
||||
getSelectedBlockClientId,
|
||||
getBlockParentsByBlockName,
|
||||
getBlockTransformItems
|
||||
getBlockParentsByBlockName
|
||||
} = select(external_wp_blockEditor_namespaceObject.store);
|
||||
const selectedBlockId = getSelectedBlockClientId();
|
||||
const descendants = getClientIdsOfDescendants([clientId]).length;
|
||||
return {
|
||||
innerBlocks: getBlocks(clientId),
|
||||
isAtMaxNesting: getBlockParentsByBlockName(clientId, [edit_name, 'core/navigation-submenu']).length >= maxNestingLevel,
|
||||
isTopLevelLink: getBlockName(getBlockRootClientId(clientId)) === 'core/navigation',
|
||||
isParentOfSelectedBlock: hasSelectedInnerBlock(clientId, true),
|
||||
isImmediateParentOfSelectedBlock: hasSelectedInnerBlock(clientId, false),
|
||||
hasDescendants: !!descendants,
|
||||
selectedBlockHasDescendants: !!((_getClientIdsOfDescen = getClientIdsOfDescendants([selectedBlockId])) !== null && _getClientIdsOfDescen !== void 0 && _getClientIdsOfDescen.length),
|
||||
hasChildren: !!getBlockCount(clientId),
|
||||
userCanCreatePages: select(external_wp_coreData_namespaceObject.store).canUser('create', 'pages'),
|
||||
userCanCreatePosts: select(external_wp_coreData_namespaceObject.store).canUser('create', 'posts'),
|
||||
thisBlock: getBlock(clientId),
|
||||
blockTransforms: getBlockTransformItems([getBlock(clientId)], getBlockRootClientId(clientId))
|
||||
userCanCreatePosts: select(external_wp_coreData_namespaceObject.store).canUser('create', 'posts')
|
||||
};
|
||||
}, [clientId]);
|
||||
(0,external_wp_element_namespaceObject.useEffect)(() => {
|
||||
@ -27868,10 +27872,6 @@ function NavigationLinkEdit(_ref2) {
|
||||
replaceBlock(clientId, newSubmenu);
|
||||
}
|
||||
|
||||
const featuredBlocks = ['core/site-logo', 'core/social-links', 'core/search'];
|
||||
const featuredTransforms = blockTransforms.filter(item => {
|
||||
return featuredBlocks.includes(item.name);
|
||||
});
|
||||
(0,external_wp_element_namespaceObject.useEffect)(() => {
|
||||
// Show the LinkControl on mount if the URL is empty
|
||||
// ( When adding a new menu item)
|
||||
@ -27882,7 +27882,7 @@ function NavigationLinkEdit(_ref2) {
|
||||
} // If block has inner blocks, transform to Submenu.
|
||||
|
||||
|
||||
if (hasDescendants) {
|
||||
if (hasChildren) {
|
||||
transformToSubmenu();
|
||||
}
|
||||
}, []);
|
||||
@ -27988,7 +27988,7 @@ function NavigationLinkEdit(_ref2) {
|
||||
'is-editing': isSelected || isParentOfSelectedBlock,
|
||||
'is-dragging-within': isDraggingWithin,
|
||||
'has-link': !!url,
|
||||
'has-child': hasDescendants,
|
||||
'has-child': hasChildren,
|
||||
'has-text-color': !!textColor || !!customTextColor,
|
||||
[(0,external_wp_blockEditor_namespaceObject.getColorClassName)('color', textColor)]: !!textColor,
|
||||
'has-background': !!backgroundColor || customBackgroundColor,
|
||||
@ -28130,8 +28130,7 @@ function NavigationLinkEdit(_ref2) {
|
||||
onChange: updatedValue => updateNavigationLinkBlockAttributes(updatedValue, setAttributes, attributes),
|
||||
onRemove: removeLink,
|
||||
renderControlBottom: !url ? () => (0,external_wp_element_namespaceObject.createElement)(LinkControlTransforms, {
|
||||
block: thisBlock,
|
||||
transforms: featuredTransforms,
|
||||
clientId: clientId,
|
||||
replace: replaceBlock
|
||||
}) : null
|
||||
})))));
|
||||
@ -28975,32 +28974,32 @@ function NavigationSubmenuEdit(_ref) {
|
||||
isTopLevelItem,
|
||||
isParentOfSelectedBlock,
|
||||
isImmediateParentOfSelectedBlock,
|
||||
hasDescendants,
|
||||
selectedBlockHasDescendants,
|
||||
hasChildren,
|
||||
selectedBlockHasChildren,
|
||||
userCanCreatePages,
|
||||
userCanCreatePosts,
|
||||
onlyDescendantIsEmptyLink
|
||||
} = (0,external_wp_data_namespaceObject.useSelect)(select => {
|
||||
const {
|
||||
getClientIdsOfDescendants,
|
||||
hasSelectedInnerBlock,
|
||||
getSelectedBlockClientId,
|
||||
getBlockParentsByBlockName,
|
||||
getBlock
|
||||
getBlock,
|
||||
getBlockCount,
|
||||
getBlockOrder
|
||||
} = select(external_wp_blockEditor_namespaceObject.store);
|
||||
|
||||
let _onlyDescendantIsEmptyLink;
|
||||
|
||||
const selectedBlockId = getSelectedBlockClientId();
|
||||
const descendants = getClientIdsOfDescendants([clientId]).length;
|
||||
const selectedBlockDescendants = getClientIdsOfDescendants([selectedBlockId]); // Check for a single descendant in the submenu. If that block
|
||||
const selectedBlockChildren = getBlockOrder(selectedBlockId); // Check for a single descendant in the submenu. If that block
|
||||
// is a link block in a "placeholder" state with no label then
|
||||
// we can consider as an "empty" link.
|
||||
|
||||
if ((selectedBlockDescendants === null || selectedBlockDescendants === void 0 ? void 0 : selectedBlockDescendants.length) === 1) {
|
||||
if ((selectedBlockChildren === null || selectedBlockChildren === void 0 ? void 0 : selectedBlockChildren.length) === 1) {
|
||||
var _singleBlock$attribut;
|
||||
|
||||
const singleBlock = getBlock(selectedBlockDescendants[0]);
|
||||
const singleBlock = getBlock(selectedBlockChildren[0]);
|
||||
_onlyDescendantIsEmptyLink = (singleBlock === null || singleBlock === void 0 ? void 0 : singleBlock.name) === 'core/navigation-link' && !(singleBlock !== null && singleBlock !== void 0 && (_singleBlock$attribut = singleBlock.attributes) !== null && _singleBlock$attribut !== void 0 && _singleBlock$attribut.label);
|
||||
}
|
||||
|
||||
@ -29009,8 +29008,8 @@ function NavigationSubmenuEdit(_ref) {
|
||||
isTopLevelItem: getBlockParentsByBlockName(clientId, navigation_submenu_edit_name).length === 0,
|
||||
isParentOfSelectedBlock: hasSelectedInnerBlock(clientId, true),
|
||||
isImmediateParentOfSelectedBlock: hasSelectedInnerBlock(clientId, false),
|
||||
hasDescendants: !!descendants,
|
||||
selectedBlockHasDescendants: !!(selectedBlockDescendants !== null && selectedBlockDescendants !== void 0 && selectedBlockDescendants.length),
|
||||
hasChildren: !!getBlockCount(clientId),
|
||||
selectedBlockHasChildren: !!(selectedBlockChildren !== null && selectedBlockChildren !== void 0 && selectedBlockChildren.length),
|
||||
userCanCreatePages: select(external_wp_coreData_namespaceObject.store).canUser('create', 'pages'),
|
||||
userCanCreatePosts: select(external_wp_coreData_namespaceObject.store).canUser('create', 'posts'),
|
||||
onlyDescendantIsEmptyLink: _onlyDescendantIsEmptyLink
|
||||
@ -29122,7 +29121,7 @@ function NavigationSubmenuEdit(_ref) {
|
||||
'is-editing': isSelected || isParentOfSelectedBlock,
|
||||
'is-dragging-within': isDraggingWithin,
|
||||
'has-link': !!url,
|
||||
'has-child': hasDescendants,
|
||||
'has-child': hasChildren,
|
||||
'has-text-color': !!textColor || !!customTextColor,
|
||||
[(0,external_wp_blockEditor_namespaceObject.getColorClassName)('color', textColor)]: !!textColor,
|
||||
'has-background': !!backgroundColor || customBackgroundColor,
|
||||
@ -29158,8 +29157,8 @@ function NavigationSubmenuEdit(_ref) {
|
||||
// being edited.
|
||||
// see: https://github.com/WordPress/gutenberg/pull/34615.
|
||||
__experimentalCaptureToolbars: true,
|
||||
renderAppender: isSelected || isImmediateParentOfSelectedBlock && !selectedBlockHasDescendants || // Show the appender while dragging to allow inserting element between item and the appender.
|
||||
hasDescendants ? external_wp_blockEditor_namespaceObject.InnerBlocks.ButtonBlockAppender : false
|
||||
renderAppender: isSelected || isImmediateParentOfSelectedBlock && !selectedBlockHasChildren || // Show the appender while dragging to allow inserting element between item and the appender.
|
||||
hasChildren ? external_wp_blockEditor_namespaceObject.InnerBlocks.ButtonBlockAppender : false
|
||||
});
|
||||
const ParentElement = openSubmenusOnClick ? 'button' : 'a';
|
||||
|
||||
@ -29168,7 +29167,7 @@ function NavigationSubmenuEdit(_ref) {
|
||||
replaceBlock(clientId, newLinkBlock);
|
||||
}
|
||||
|
||||
const canConvertToLink = !selectedBlockHasDescendants || onlyDescendantIsEmptyLink;
|
||||
const canConvertToLink = !selectedBlockHasChildren || onlyDescendantIsEmptyLink;
|
||||
return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarGroup, null, !openSubmenusOnClick && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarButton, {
|
||||
name: "link",
|
||||
icon: library_link,
|
||||
@ -31609,7 +31608,7 @@ function Content(props) {
|
||||
|
||||
function edit_Placeholder() {
|
||||
const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)();
|
||||
return (0,external_wp_element_namespaceObject.createElement)("div", blockProps, (0,external_wp_element_namespaceObject.createElement)("p", null, (0,external_wp_i18n_namespaceObject.__)('Post Content')));
|
||||
return (0,external_wp_element_namespaceObject.createElement)("div", blockProps, (0,external_wp_element_namespaceObject.createElement)("p", null, (0,external_wp_i18n_namespaceObject.__)('This is the Post Content block, it will display all the blocks in any single post or page.')), (0,external_wp_element_namespaceObject.createElement)("p", null, (0,external_wp_i18n_namespaceObject.__)('That might be a simple arrangement like consecutive paragraphs in a blog post, or a more elaborate composition that includes image galleries, videos, tables, columns, and any other block types.')), (0,external_wp_element_namespaceObject.createElement)("p", null, (0,external_wp_i18n_namespaceObject.__)('If there are any Custom Post Types registered at your site, the Post Content block can display the contents of those entries as well.')));
|
||||
}
|
||||
|
||||
function RecursionError() {
|
||||
@ -32004,7 +32003,7 @@ function PostExcerptEditor(_ref) {
|
||||
}, [renderedExcerpt]);
|
||||
|
||||
if (!postType || !postId) {
|
||||
return (0,external_wp_element_namespaceObject.createElement)("div", blockProps, (0,external_wp_i18n_namespaceObject.__)('Post Excerpt'));
|
||||
return (0,external_wp_element_namespaceObject.createElement)("div", blockProps, (0,external_wp_element_namespaceObject.createElement)("p", null, (0,external_wp_i18n_namespaceObject.__)('This is the Post Excerpt block, it will display the excerpt from single posts.')), (0,external_wp_element_namespaceObject.createElement)("p", null, (0,external_wp_i18n_namespaceObject.__)('If there are any Custom Post Types with support for excerpts, the Post Excerpt block can display the excerpts of those entries as well.')));
|
||||
}
|
||||
|
||||
if (isProtected && !userCanEdit) {
|
||||
|
2
wp-includes/js/dist/block-library.min.js
vendored
2
wp-includes/js/dist/block-library.min.js
vendored
File diff suppressed because one or more lines are too long
37
wp-includes/js/dist/components.js
vendored
37
wp-includes/js/dist/components.js
vendored
@ -31971,8 +31971,8 @@ var camelCaseAttributes = new Set([
|
||||
|
||||
|
||||
|
||||
function renderSVG(element, renderState) {
|
||||
renderHTML(element, renderState);
|
||||
function renderSVG(element, renderState, _styleProp, projection) {
|
||||
renderHTML(element, renderState, undefined, projection);
|
||||
for (var key in renderState.attrs) {
|
||||
element.setAttribute(!camelCaseAttributes.has(key) ? camelToDash(key) : key, renderState.attrs[key]);
|
||||
}
|
||||
@ -32136,7 +32136,6 @@ var svgMotionConfig = {
|
||||
};
|
||||
}
|
||||
buildSVGAttrs(renderState, latestValues, { enableHardwareAcceleration: false }, props.transformTemplate);
|
||||
// TODO: Replace with direct assignment
|
||||
renderSVG(instance, renderState);
|
||||
},
|
||||
}),
|
||||
@ -39604,63 +39603,63 @@ function useRecognizers(handlers, config = {}, gestureKey, nativeHandlers) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
function use_gesture_react_esm_useDrag(handler, config = {}) {
|
||||
function use_gesture_react_esm_useDrag(handler, config) {
|
||||
actions_8e12537b_esm_registerAction(actions_8e12537b_esm_dragAction);
|
||||
return useRecognizers({
|
||||
drag: handler
|
||||
}, config, 'drag');
|
||||
}, config || {}, 'drag');
|
||||
}
|
||||
|
||||
function usePinch(handler, config = {}) {
|
||||
function usePinch(handler, config) {
|
||||
registerAction(pinchAction);
|
||||
return useRecognizers({
|
||||
pinch: handler
|
||||
}, config, 'pinch');
|
||||
}, config || {}, 'pinch');
|
||||
}
|
||||
|
||||
function useWheel(handler, config = {}) {
|
||||
function useWheel(handler, config) {
|
||||
registerAction(wheelAction);
|
||||
return useRecognizers({
|
||||
wheel: handler
|
||||
}, config, 'wheel');
|
||||
}, config || {}, 'wheel');
|
||||
}
|
||||
|
||||
function useScroll(handler, config = {}) {
|
||||
function useScroll(handler, config) {
|
||||
registerAction(scrollAction);
|
||||
return useRecognizers({
|
||||
scroll: handler
|
||||
}, config, 'scroll');
|
||||
}, config || {}, 'scroll');
|
||||
}
|
||||
|
||||
function useMove(handler, config = {}) {
|
||||
function useMove(handler, config) {
|
||||
registerAction(moveAction);
|
||||
return useRecognizers({
|
||||
move: handler
|
||||
}, config, 'move');
|
||||
}, config || {}, 'move');
|
||||
}
|
||||
|
||||
function useHover(handler, config = {}) {
|
||||
function useHover(handler, config) {
|
||||
actions_8e12537b_esm_registerAction(actions_8e12537b_esm_hoverAction);
|
||||
return useRecognizers({
|
||||
hover: handler
|
||||
}, config, 'hover');
|
||||
}, config || {}, 'hover');
|
||||
}
|
||||
|
||||
function createUseGesture(actions) {
|
||||
actions.forEach(registerAction);
|
||||
return function useGesture(_handlers, _config = {}) {
|
||||
return function useGesture(_handlers, _config) {
|
||||
const {
|
||||
handlers,
|
||||
nativeHandlers,
|
||||
config
|
||||
} = parseMergedHandlers(_handlers, _config);
|
||||
} = parseMergedHandlers(_handlers, _config || {});
|
||||
return useRecognizers(handlers, config, undefined, nativeHandlers);
|
||||
};
|
||||
}
|
||||
|
||||
function useGesture(handlers, config = {}) {
|
||||
function useGesture(handlers, config) {
|
||||
const hook = createUseGesture([dragAction, pinchAction, scrollAction, wheelAction, moveAction, hoverAction]);
|
||||
return hook(handlers, config);
|
||||
return hook(handlers, config || {});
|
||||
}
|
||||
|
||||
|
||||
|
2
wp-includes/js/dist/components.min.js
vendored
2
wp-includes/js/dist/components.min.js
vendored
File diff suppressed because one or more lines are too long
4
wp-includes/js/dist/core-data.js
vendored
4
wp-includes/js/dist/core-data.js
vendored
@ -2499,6 +2499,10 @@ function getQueryParts(query) {
|
||||
if (key === 'include') {
|
||||
var _getNormalizedCommaSe2;
|
||||
|
||||
if (typeof value === 'number') {
|
||||
value = value.toString();
|
||||
}
|
||||
|
||||
parts.include = ((_getNormalizedCommaSe2 = get_normalized_comma_separable(value)) !== null && _getNormalizedCommaSe2 !== void 0 ? _getNormalizedCommaSe2 : []).map(Number); // Normalize value for `stableKey`.
|
||||
|
||||
value = parts.include.join();
|
||||
|
2
wp-includes/js/dist/core-data.min.js
vendored
2
wp-includes/js/dist/core-data.min.js
vendored
File diff suppressed because one or more lines are too long
5
wp-includes/js/dist/edit-post.js
vendored
5
wp-includes/js/dist/edit-post.js
vendored
@ -8544,11 +8544,6 @@ function PatternSelection(_ref) {
|
||||
const {
|
||||
resetEditorBlocks
|
||||
} = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_editor_namespaceObject.store);
|
||||
(0,external_wp_element_namespaceObject.useEffect)(() => {
|
||||
if (blockPatterns.length <= 1) {
|
||||
onChoosePattern();
|
||||
}
|
||||
}, [blockPatterns.length]);
|
||||
return (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.__experimentalBlockPatternsList, {
|
||||
blockPatterns: blockPatterns,
|
||||
shownPatterns: shownBlockPatterns,
|
||||
|
2
wp-includes/js/dist/edit-post.min.js
vendored
2
wp-includes/js/dist/edit-post.min.js
vendored
File diff suppressed because one or more lines are too long
11
wp-includes/js/dist/rich-text.js
vendored
11
wp-includes/js/dist/rich-text.js
vendored
@ -4297,11 +4297,18 @@ function useInputAndSelection(props) {
|
||||
createRecord,
|
||||
isSelected,
|
||||
onSelectionChange
|
||||
} = propsRef.current; // If the selection changes where the active element is a parent of
|
||||
} = propsRef.current; // Check if the implementor disabled editing. `contentEditable`
|
||||
// does disable input, but not text selection, so we must ignore
|
||||
// selection changes.
|
||||
|
||||
if (element.contentEditable !== 'true') {
|
||||
return;
|
||||
} // If the selection changes where the active element is a parent of
|
||||
// the rich text instance (writing flow), call `onSelectionChange`
|
||||
// for the rich text instance that contains the start or end of the
|
||||
// selection.
|
||||
|
||||
|
||||
if (ownerDocument.activeElement !== element) {
|
||||
if (!ownerDocument.activeElement.contains(element)) {
|
||||
return;
|
||||
@ -4396,7 +4403,7 @@ function useInputAndSelection(props) {
|
||||
|
||||
function onCompositionStart() {
|
||||
isComposing = true; // Do not update the selection when characters are being composed as
|
||||
// this rerenders the component and might distroy internal browser
|
||||
// this rerenders the component and might destroy internal browser
|
||||
// editing state.
|
||||
|
||||
ownerDocument.removeEventListener('selectionchange', handleSelectionChange);
|
||||
|
2
wp-includes/js/dist/rich-text.min.js
vendored
2
wp-includes/js/dist/rich-text.min.js
vendored
File diff suppressed because one or more lines are too long
@ -16,7 +16,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '6.0-beta3-53328';
|
||||
$wp_version = '6.0-beta3-53329';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user