Editor: Update WordPress packages for 6.0 RC1.

Included cherry-picked commits from the Gutenberg plugin that fix bugs discovered after WordPress 6.0 Beta 4.

Props gziolo, zieladam, ndiego.

See #55567.
Built from https://develop.svn.wordpress.org/trunk@53338


git-svn-id: http://core.svn.wordpress.org/trunk@52927 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
hellofromTonya 2022-05-03 15:00:36 +00:00
parent 4de4330b17
commit e9267bf3ee
15 changed files with 34 additions and 53 deletions

File diff suppressed because one or more lines are too long

View File

@ -79,6 +79,10 @@ function render_block_core_comment_template( $attributes, $content, $block ) {
return '';
}
if ( post_password_required( $block->context['postId'] ) ) {
return;
}
$comment_query = new WP_Comment_Query(
build_comment_query_vars_from_block( $block )
);

View File

@ -18,6 +18,10 @@ function render_block_core_comments_pagination( $attributes, $content ) {
return '';
}
if ( post_password_required() ) {
return;
}
return sprintf(
'<div %1$s>%2$s</div>',
get_block_wrapper_attributes(),

View File

@ -14,6 +14,10 @@
*/
function render_block_core_comments_title( $attributes ) {
if ( post_password_required() ) {
return;
}
$align_class_name = empty( $attributes['textAlign'] ) ? '' : "has-text-align-{$attributes['textAlign']}";
$show_post_title = ! empty( $attributes['showPostTitle'] ) && $attributes['showPostTitle'];
$show_comments_count = ! empty( $attributes['showCommentsCount'] ) && $attributes['showCommentsCount'];

View File

@ -65,7 +65,6 @@
"default": 5
}
},
"usesContext": [ "navigationArea" ],
"providesContext": {
"textColor": "textColor",
"customTextColor": "customTextColor",

View File

@ -18,6 +18,10 @@ function render_block_core_post_comments_form( $attributes, $content, $block ) {
return '';
}
if ( post_password_required( $block->context['postId'] ) ) {
return;
}
$classes = 'comment-respond'; // See comment further below.
if ( isset( $attributes['textAlign'] ) ) {
$classes .= 'has-text-align-' . $attributes['textAlign'];

View File

@ -25944,7 +25944,6 @@ function useConvertClassicToBlockMenu(clientId) {
* External dependencies
*/
/**
* WordPress dependencies
*/
@ -26013,9 +26012,6 @@ function Navigation(_ref) {
setOverlayBackgroundColor,
overlayTextColor,
setOverlayTextColor,
context: {
navigationArea
},
// These props are used by the navigation editor to override specific
// navigation block settings.
hasSubmenuIndicatorSetting = true,
@ -26033,24 +26029,15 @@ function Navigation(_ref) {
} = {},
hasIcon
} = attributes;
let areaMenu,
setAreaMenu = external_lodash_namespaceObject.noop; // Navigation areas are deprecated and on their way out. Let's not perform
// the request unless we're in an environment where the endpoint exists.
if (false) {}
const navigationAreaMenu = areaMenu === 0 ? undefined : areaMenu;
const ref = navigationArea ? navigationAreaMenu : attributes.ref;
const ref = attributes.ref;
const registry = (0,external_wp_data_namespaceObject.useRegistry)();
const setRef = (0,external_wp_element_namespaceObject.useCallback)(postId => {
const setRef = postId => {
setAttributes({
ref: postId
});
};
if (navigationArea) {
setAreaMenu(postId);
}
}, [navigationArea]);
const [hasAlreadyRendered, RecursionProvider] = (0,external_wp_blockEditor_namespaceObject.__experimentalUseNoRecursiveRenders)(`navigationMenu/${ref}`); // Preload classic menus, so that they don't suddenly pop-in when viewing
// the Select Menu dropdown.
@ -26120,7 +26107,6 @@ function Navigation(_ref) {
__unstableMarkNextChangeAsNotPersistent
} = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
const [hasSavedUnsavedInnerBlocks, setHasSavedUnsavedInnerBlocks] = (0,external_wp_element_namespaceObject.useState)(false);
const isWithinUnassignedArea = !!navigationArea && !ref;
const [isResponsiveMenuOpen, setResponsiveMenuVisibility] = (0,external_wp_element_namespaceObject.useState)(false);
const [overlayMenuPreview, setOverlayMenuPreview] = (0,external_wp_element_namespaceObject.useState)(false);
const {
@ -26162,9 +26148,8 @@ function Navigation(_ref) {
// - there is no classic menu conversion process in progress.
// - there is no menu creation process in progress.
// - there are no uncontrolled blocks.
// - (legacy) there is a Navigation Area without a ref attribute pointing to a Navigation Post.
const isPlaceholder = !ref && !isCreatingNavigationMenu && !isConvertingClassicMenu && hasResolvedNavigationMenus && (!hasUncontrolledInnerBlocks || isWithinUnassignedArea);
const isPlaceholder = !ref && !isCreatingNavigationMenu && !isConvertingClassicMenu && hasResolvedNavigationMenus && !hasUncontrolledInnerBlocks;
const isEntityAvailable = !isNavigationMenuMissing && isNavigationMenuResolved; // "loading" state:
// - there is a menu creation process in progress.
// - there is a classic menu conversion process in progress.
@ -26315,10 +26300,6 @@ function Navigation(_ref) {
}, [isDraftNavigationMenu, isEntityAvailable, shouldFocusNavigationSelector]);
const resetToEmptyBlock = (0,external_wp_element_namespaceObject.useCallback)(() => {
registry.batch(() => {
if (navigationArea) {
setAreaMenu(0);
}
setAttributes({
ref: undefined
});
@ -27210,7 +27191,6 @@ const navigation_metadata = {
"default": 5
}
},
usesContext: ["navigationArea"],
providesContext: {
textColor: "textColor",
customTextColor: "customTextColor",
@ -46975,7 +46955,6 @@ const video_settings = {
/**

File diff suppressed because one or more lines are too long

View File

@ -40412,15 +40412,12 @@ function AngleCircle(_ref) {
const {
x: centerX,
y: centerY
} = angleCircleCenter.current;
const {
ownerDocument
} = angleCircleRef.current; // Prevent (drag) mouse events from selecting and accidentally
} = angleCircleCenter.current; // Prevent (drag) mouse events from selecting and accidentally
// triggering actions from other elements.
event.preventDefault(); // Ensure the input isn't focused as preventDefault would leave it.
event.preventDefault(); // Input control needs to lose focus and by preventDefault above, it doesn't.
ownerDocument.activeElement.blur();
event.target.focus();
onChange(getAngle(centerX, centerY, event.clientX, event.clientY));
};
@ -40460,7 +40457,8 @@ function AngleCircle(_ref) {
style: value ? {
transform: `rotate(${value}deg)`
} : undefined,
className: "components-angle-picker-control__angle-circle-indicator-wrapper"
className: "components-angle-picker-control__angle-circle-indicator-wrapper",
tabIndex: -1
}, (0,external_wp_element_namespaceObject.createElement)(CircleIndicator, {
className: "components-angle-picker-control__angle-circle-indicator"
})))

File diff suppressed because one or more lines are too long

View File

@ -2144,17 +2144,6 @@ const rootEntitiesConfig = [{
plural: 'menuLocations',
label: (0,external_wp_i18n_namespaceObject.__)('Menu Location'),
key: 'name'
}, {
name: 'navigationArea',
kind: 'root',
baseURL: '/wp/v2/block-navigation-areas',
baseURLParams: {
context: 'edit'
},
plural: 'navigationAreas',
label: (0,external_wp_i18n_namespaceObject.__)('Navigation Area'),
key: 'name',
getTitle: record => record === null || record === void 0 ? void 0 : record.description
}, {
label: (0,external_wp_i18n_namespaceObject.__)('Global Styles'),
name: 'globalStyles',

File diff suppressed because one or more lines are too long

View File

@ -9953,7 +9953,7 @@ function SidebarComplementaryAreaFills() {
// See https://github.com/WordPress/gutenberg/blob/trunk/docs/how-to-guides/feature-flags.md#dead-code-elimination.
let MaybeNavigationMenuSidebar = 'Fragment';
let MaybeNavigationMenuSidebar = external_wp_element_namespaceObject.Fragment;
if (false) {}
@ -11133,7 +11133,7 @@ function BlockEditor(_ref) {
// See https://github.com/WordPress/gutenberg/blob/trunk/docs/how-to-guides/feature-flags.md#dead-code-elimination.
let MaybeNavMenuSidebarToggle = 'Fragment';
let MaybeNavMenuSidebarToggle = external_wp_element_namespaceObject.Fragment;
if (false) {}

File diff suppressed because one or more lines are too long

View File

@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.0-beta4-53337';
$wp_version = '6.0-beta4-53338';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.