Editor: Update @wordpress npm packages
Update @wordpress npm packages to the latest published versions. This includes block editor bug fixes for WordPress 5.7 RC 2. Fixes #52680. Built from https://develop.svn.wordpress.org/trunk@50458 git-svn-id: http://core.svn.wordpress.org/trunk@50069 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
30847f9125
commit
630a593765
File diff suppressed because one or more lines are too long
|
@ -33,7 +33,12 @@ function render_block_core_social_link( $attributes, $content, $block ) {
|
|||
}
|
||||
|
||||
$icon = block_core_social_link_get_icon( $service );
|
||||
$wrapper_attributes = get_block_wrapper_attributes( array( 'class' => 'wp-social-link wp-social-link-' . $service . $class_name ) );
|
||||
$wrapper_attributes = get_block_wrapper_attributes(
|
||||
array(
|
||||
'class' => 'wp-social-link wp-social-link-' . $service . $class_name,
|
||||
'style' => block_core_social_link_get_color_styles( $block->context ),
|
||||
)
|
||||
);
|
||||
|
||||
return '<li ' . $wrapper_attributes . '><a href="' . esc_url( $url ) . '" aria-label="' . esc_attr( $label ) . '" ' . $attribute . ' class="wp-block-social-link-anchor"> ' . $icon . '</a></li>';
|
||||
}
|
||||
|
@ -280,3 +285,24 @@ function block_core_social_link_services( $service = '', $field = '' ) {
|
|||
|
||||
return $services_data;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns CSS styles for icon and icon background colors.
|
||||
*
|
||||
* @param array $context Block context passed to Social Link.
|
||||
*
|
||||
* @return string Inline CSS styles for link's icon and background colors.
|
||||
*/
|
||||
function block_core_social_link_get_color_styles( $context ) {
|
||||
$styles = array();
|
||||
|
||||
if ( array_key_exists( 'iconColorValue', $context ) ) {
|
||||
$styles[] = 'color: ' . $context['iconColorValue'] . '; ';
|
||||
}
|
||||
|
||||
if ( array_key_exists( 'iconBackgroundColorValue', $context ) ) {
|
||||
$styles[] = 'background-color: ' . $context['iconBackgroundColorValue'] . '; ';
|
||||
}
|
||||
|
||||
return implode( '', $styles );
|
||||
}
|
||||
|
|
|
@ -17,7 +17,9 @@
|
|||
}
|
||||
},
|
||||
"usesContext": [
|
||||
"openInNewTab"
|
||||
"openInNewTab",
|
||||
"iconColorValue",
|
||||
"iconBackgroundColorValue"
|
||||
],
|
||||
"supports": {
|
||||
"reusable": false,
|
||||
|
|
|
@ -30,7 +30,9 @@
|
|||
}
|
||||
},
|
||||
"providesContext": {
|
||||
"openInNewTab": "openInNewTab"
|
||||
"openInNewTab": "openInNewTab",
|
||||
"iconColorValue": "iconColorValue",
|
||||
"iconBackgroundColorValue": "iconBackgroundColorValue"
|
||||
},
|
||||
"supports": {
|
||||
"align": [
|
||||
|
|
|
@ -168,6 +168,9 @@ div[data-type="core/button"] {
|
|||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.wp-block-buttons {
|
||||
/* stylelint-disable indentation */
|
||||
}
|
||||
.wp-block-buttons > .wp-block {
|
||||
margin-right: 0;
|
||||
margin-top: 0.5em;
|
||||
|
@ -183,6 +186,22 @@ div[data-type="core/button"] {
|
|||
.wp-block-buttons > .wp-block-button:focus {
|
||||
box-shadow: none;
|
||||
}
|
||||
.wp-block-buttons:not(.is-content-justification-space-between,
|
||||
.is-content-justification-right,
|
||||
.is-content-justification-left,
|
||||
.is-content-justification-center) .wp-block[data-align=center] {
|
||||
/* stylelint-enable indentation */
|
||||
margin-right: auto;
|
||||
margin-left: auto;
|
||||
margin-top: 0;
|
||||
width: 100%;
|
||||
}
|
||||
.wp-block-buttons:not(.is-content-justification-space-between,
|
||||
.is-content-justification-right,
|
||||
.is-content-justification-left,
|
||||
.is-content-justification-center) .wp-block[data-align=center] .wp-block-button {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.wp-block[data-align=center] > .wp-block-buttons {
|
||||
align-items: center;
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -169,6 +169,9 @@ div[data-type="core/button"] {
|
|||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.wp-block-buttons {
|
||||
/* stylelint-disable indentation */
|
||||
}
|
||||
.wp-block-buttons > .wp-block {
|
||||
margin-left: 0;
|
||||
margin-top: 0.5em;
|
||||
|
@ -184,6 +187,22 @@ div[data-type="core/button"] {
|
|||
.wp-block-buttons > .wp-block-button:focus {
|
||||
box-shadow: none;
|
||||
}
|
||||
.wp-block-buttons:not(.is-content-justification-space-between,
|
||||
.is-content-justification-right,
|
||||
.is-content-justification-left,
|
||||
.is-content-justification-center) .wp-block[data-align=center] {
|
||||
/* stylelint-enable indentation */
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
margin-top: 0;
|
||||
width: 100%;
|
||||
}
|
||||
.wp-block-buttons:not(.is-content-justification-space-between,
|
||||
.is-content-justification-right,
|
||||
.is-content-justification-left,
|
||||
.is-content-justification-center) .wp-block[data-align=center] .wp-block-button {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.wp-block[data-align=center] > .wp-block-buttons {
|
||||
align-items: center;
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -158,6 +158,7 @@
|
|||
display: flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: wrap;
|
||||
/* stylelint-disable indentation */
|
||||
}
|
||||
.wp-block-buttons.is-vertical {
|
||||
flex-direction: column;
|
||||
|
@ -202,6 +203,9 @@
|
|||
.wp-block-buttons.is-content-justification-right.is-vertical {
|
||||
align-items: flex-end;
|
||||
}
|
||||
.wp-block-buttons.is-content-justification-space-between {
|
||||
justify-content: space-between;
|
||||
}
|
||||
.wp-block-buttons.aligncenter {
|
||||
text-align: center;
|
||||
}
|
||||
|
@ -219,6 +223,16 @@
|
|||
.wp-block-buttons.alignright .wp-block-button:first-child {
|
||||
margin-left: 0;
|
||||
}
|
||||
.wp-block-buttons:not(.is-content-justification-space-between,
|
||||
.is-content-justification-right,
|
||||
.is-content-justification-left,
|
||||
.is-content-justification-center) .wp-block-button.aligncenter {
|
||||
/* stylelint-enable indentation */
|
||||
margin-right: auto;
|
||||
margin-left: auto;
|
||||
margin-bottom: 0.5em;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.wp-block-calendar {
|
||||
text-align: center;
|
||||
|
@ -1837,12 +1851,6 @@ p:empty::before {
|
|||
.wp-block-social-links.alignright {
|
||||
justify-content: flex-end;
|
||||
}
|
||||
.wp-block-social-links.has-icon-color.has-icon-color > .wp-social-link {
|
||||
color: var(--wp--social-links--icon-color);
|
||||
}
|
||||
.wp-block-social-links.has-icon-background-color.has-icon-background-color > .wp-social-link {
|
||||
background-color: var(--wp--social-links--icon-background-color);
|
||||
}
|
||||
|
||||
.wp-social-link {
|
||||
display: block;
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -159,6 +159,7 @@
|
|||
display: flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: wrap;
|
||||
/* stylelint-disable indentation */
|
||||
}
|
||||
.wp-block-buttons.is-vertical {
|
||||
flex-direction: column;
|
||||
|
@ -210,6 +211,9 @@
|
|||
.wp-block-buttons.is-content-justification-right.is-vertical {
|
||||
align-items: flex-end;
|
||||
}
|
||||
.wp-block-buttons.is-content-justification-space-between {
|
||||
justify-content: space-between;
|
||||
}
|
||||
.wp-block-buttons.aligncenter {
|
||||
text-align: center;
|
||||
}
|
||||
|
@ -233,6 +237,16 @@
|
|||
/*rtl:ignore*/
|
||||
margin-left: 0;
|
||||
}
|
||||
.wp-block-buttons:not(.is-content-justification-space-between,
|
||||
.is-content-justification-right,
|
||||
.is-content-justification-left,
|
||||
.is-content-justification-center) .wp-block-button.aligncenter {
|
||||
/* stylelint-enable indentation */
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
margin-bottom: 0.5em;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.wp-block-calendar {
|
||||
text-align: center;
|
||||
|
@ -1877,12 +1891,6 @@ p:empty::before {
|
|||
.wp-block-social-links.alignright {
|
||||
justify-content: flex-end;
|
||||
}
|
||||
.wp-block-social-links.has-icon-color.has-icon-color > .wp-social-link {
|
||||
color: var(--wp--social-links--icon-color);
|
||||
}
|
||||
.wp-block-social-links.has-icon-background-color.has-icon-background-color > .wp-social-link {
|
||||
background-color: var(--wp--social-links--icon-background-color);
|
||||
}
|
||||
|
||||
.wp-social-link {
|
||||
display: block;
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -26525,6 +26525,78 @@ var share = Object(external_wp_element_["createElement"])(external_wp_primitives
|
|||
}));
|
||||
/* harmony default export */ var library_share = (share);
|
||||
|
||||
// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/social-links/deprecated.js
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* External dependencies
|
||||
*/
|
||||
|
||||
/**
|
||||
* WordPress dependencies
|
||||
*/
|
||||
|
||||
// Social Links block deprecations.
|
||||
|
||||
var social_links_deprecated_deprecated = [// V1. Remove CSS variable use for colors.
|
||||
{
|
||||
attributes: {
|
||||
iconColor: {
|
||||
type: 'string'
|
||||
},
|
||||
customIconColor: {
|
||||
type: 'string'
|
||||
},
|
||||
iconColorValue: {
|
||||
type: 'string'
|
||||
},
|
||||
iconBackgroundColor: {
|
||||
type: 'string'
|
||||
},
|
||||
customIconBackgroundColor: {
|
||||
type: 'string'
|
||||
},
|
||||
iconBackgroundColorValue: {
|
||||
type: 'string'
|
||||
},
|
||||
openInNewTab: {
|
||||
type: 'boolean',
|
||||
default: false
|
||||
},
|
||||
size: {
|
||||
type: 'string'
|
||||
}
|
||||
},
|
||||
providesContext: {
|
||||
openInNewTab: 'openInNewTab'
|
||||
},
|
||||
supports: {
|
||||
align: ['left', 'center', 'right'],
|
||||
anchor: true
|
||||
},
|
||||
save: function save(props) {
|
||||
var _props$attributes = props.attributes,
|
||||
iconBackgroundColorValue = _props$attributes.iconBackgroundColorValue,
|
||||
iconColorValue = _props$attributes.iconColorValue,
|
||||
itemsJustification = _props$attributes.itemsJustification,
|
||||
size = _props$attributes.size;
|
||||
var className = classnames_default()(size, Object(defineProperty["a" /* default */])({
|
||||
'has-icon-color': iconColorValue,
|
||||
'has-icon-background-color': iconBackgroundColorValue
|
||||
}, "items-justified-".concat(itemsJustification), itemsJustification));
|
||||
var style = {
|
||||
'--wp--social-links--icon-color': iconColorValue,
|
||||
'--wp--social-links--icon-background-color': iconBackgroundColorValue
|
||||
};
|
||||
return Object(external_wp_element_["createElement"])("ul", external_wp_blockEditor_["useBlockProps"].save({
|
||||
className: className,
|
||||
style: style
|
||||
}), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InnerBlocks"].Content, null));
|
||||
}
|
||||
}];
|
||||
/* harmony default export */ var social_links_deprecated = (social_links_deprecated_deprecated);
|
||||
|
||||
// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/social-links/edit.js
|
||||
|
||||
|
||||
|
@ -26599,13 +26671,8 @@ function SocialLinksEdit(props) {
|
|||
'has-icon-color': iconColor.color || iconColorValue,
|
||||
'has-icon-background-color': iconBackgroundColor.color || iconBackgroundColorValue
|
||||
});
|
||||
var style = {
|
||||
'--wp--social-links--icon-color': iconColor.color || iconColorValue,
|
||||
'--wp--social-links--icon-background-color': iconBackgroundColor.color || iconBackgroundColorValue
|
||||
};
|
||||
var blockProps = Object(external_wp_blockEditor_["useBlockProps"])({
|
||||
className: className,
|
||||
style: style
|
||||
className: className
|
||||
});
|
||||
var innerBlocksProps = Object(external_wp_blockEditor_["__experimentalUseInnerBlocksProps"])(blockProps, {
|
||||
allowedBlocks: social_links_edit_ALLOWED_BLOCKS,
|
||||
|
@ -26659,8 +26726,7 @@ function SocialLinksEdit(props) {
|
|||
// switching themes to a new theme that does not have a matching named color.
|
||||
value: iconColor.color || iconColorValue,
|
||||
onChange: function onChange(colorValue) {
|
||||
setIconColor(colorValue); // Set explicit color value used to add CSS variable in save.js
|
||||
|
||||
setIconColor(colorValue);
|
||||
setAttributes({
|
||||
iconColorValue: colorValue
|
||||
});
|
||||
|
@ -26671,8 +26737,7 @@ function SocialLinksEdit(props) {
|
|||
// switching themes to a new theme that does not have a matching named color.
|
||||
value: iconBackgroundColor.color || iconBackgroundColorValue,
|
||||
onChange: function onChange(colorValue) {
|
||||
setIconBackgroundColor(colorValue); // Set explicit color value used to add CSS variable in save.js
|
||||
|
||||
setIconBackgroundColor(colorValue);
|
||||
setAttributes({
|
||||
iconBackgroundColorValue: colorValue
|
||||
});
|
||||
|
@ -26713,13 +26778,8 @@ function social_links_save_save(props) {
|
|||
'has-icon-color': iconColorValue,
|
||||
'has-icon-background-color': iconBackgroundColorValue
|
||||
});
|
||||
var style = {
|
||||
'--wp--social-links--icon-color': iconColorValue,
|
||||
'--wp--social-links--icon-background-color': iconBackgroundColorValue
|
||||
};
|
||||
return Object(external_wp_element_["createElement"])("ul", external_wp_blockEditor_["useBlockProps"].save({
|
||||
className: className,
|
||||
style: style
|
||||
className: className
|
||||
}), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InnerBlocks"].Content, null));
|
||||
}
|
||||
|
||||
|
@ -26734,6 +26794,7 @@ function social_links_save_save(props) {
|
|||
*/
|
||||
|
||||
|
||||
|
||||
var social_links_metadata = {
|
||||
apiVersion: 2,
|
||||
name: "core/social-links",
|
||||
|
@ -26766,7 +26827,9 @@ var social_links_metadata = {
|
|||
}
|
||||
},
|
||||
providesContext: {
|
||||
openInNewTab: "openInNewTab"
|
||||
openInNewTab: "openInNewTab",
|
||||
iconColorValue: "iconColorValue",
|
||||
iconBackgroundColorValue: "iconBackgroundColorValue"
|
||||
},
|
||||
supports: {
|
||||
align: ["left", "center", "right"],
|
||||
|
@ -26816,7 +26879,8 @@ var social_links_settings = {
|
|||
}],
|
||||
icon: library_share,
|
||||
edit: social_links_edit,
|
||||
save: social_links_save_save
|
||||
save: social_links_save_save,
|
||||
deprecated: social_links_deprecated
|
||||
};
|
||||
|
||||
// EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/keyboard-return.js
|
||||
|
@ -27973,11 +28037,14 @@ var social_list_getNameBySite = function getNameBySite(name) {
|
|||
|
||||
var edit_SocialLinkEdit = function SocialLinkEdit(_ref) {
|
||||
var attributes = _ref.attributes,
|
||||
setAttributes = _ref.setAttributes,
|
||||
isSelected = _ref.isSelected;
|
||||
context = _ref.context,
|
||||
isSelected = _ref.isSelected,
|
||||
setAttributes = _ref.setAttributes;
|
||||
var url = attributes.url,
|
||||
service = attributes.service,
|
||||
label = attributes.label;
|
||||
var iconColorValue = context.iconColorValue,
|
||||
iconBackgroundColorValue = context.iconBackgroundColorValue;
|
||||
|
||||
var _useState = Object(external_wp_element_["useState"])(false),
|
||||
_useState2 = Object(slicedToArray["a" /* default */])(_useState, 2),
|
||||
|
@ -27990,7 +28057,11 @@ var edit_SocialLinkEdit = function SocialLinkEdit(_ref) {
|
|||
var IconComponent = social_list_getIconBySite(service);
|
||||
var socialLinkName = social_list_getNameBySite(service);
|
||||
var blockProps = Object(external_wp_blockEditor_["useBlockProps"])({
|
||||
className: classes
|
||||
className: classes,
|
||||
style: {
|
||||
color: iconColorValue,
|
||||
backgroundColor: iconBackgroundColorValue
|
||||
}
|
||||
});
|
||||
return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InspectorControls"], null, Object(external_wp_element_["createElement"])(external_wp_components_["PanelBody"], {
|
||||
title: Object(external_wp_i18n_["sprintf"])(
|
||||
|
@ -28067,7 +28138,7 @@ var social_link_metadata = {
|
|||
type: "string"
|
||||
}
|
||||
},
|
||||
usesContext: ["openInNewTab"],
|
||||
usesContext: ["openInNewTab", "iconColorValue", "iconBackgroundColorValue"],
|
||||
supports: {
|
||||
reusable: false,
|
||||
html: false
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -7347,7 +7347,21 @@ var serverSideBlockDefinitions = {};
|
|||
// eslint-disable-next-line camelcase
|
||||
|
||||
function unstable__bootstrapServerSideBlockDefinitions(definitions) {
|
||||
serverSideBlockDefinitions = registration_objectSpread(registration_objectSpread({}, serverSideBlockDefinitions), definitions);
|
||||
for (var _i = 0, _Object$keys = Object.keys(definitions); _i < _Object$keys.length; _i++) {
|
||||
var blockName = _Object$keys[_i];
|
||||
|
||||
// Don't overwrite if already set. It covers the case when metadata
|
||||
// was initialized from the server.
|
||||
if (serverSideBlockDefinitions[blockName]) {
|
||||
continue;
|
||||
}
|
||||
|
||||
serverSideBlockDefinitions[blockName] = Object(external_lodash_["mapKeys"])(Object(external_lodash_["pickBy"])(definitions[blockName], function (value) {
|
||||
return !Object(external_lodash_["isNil"])(value);
|
||||
}), function (value, key) {
|
||||
return Object(external_lodash_["camelCase"])(key);
|
||||
});
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Registers a new block provided a unique name and an object defining its
|
||||
|
@ -7374,9 +7388,7 @@ function registerBlockType(name, settings) {
|
|||
save: function save() {
|
||||
return null;
|
||||
}
|
||||
}, Object(external_lodash_["pickBy"])(Object(external_lodash_["get"])(serverSideBlockDefinitions, name, {}), function (value) {
|
||||
return !Object(external_lodash_["isNil"])(value);
|
||||
})), settings);
|
||||
}, serverSideBlockDefinitions === null || serverSideBlockDefinitions === void 0 ? void 0 : serverSideBlockDefinitions[name]), settings);
|
||||
|
||||
if (typeof name !== 'string') {
|
||||
console.error('Block names must be strings.');
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -12506,7 +12506,7 @@ function useBlockEditorSettings(settings, hasTemplate) {
|
|||
|
||||
return {
|
||||
canUseUnfilteredHTML: canUserUseUnfilteredHTML(),
|
||||
reusableBlocks: select('core').getEntityRecords('postType', 'wp_block',
|
||||
reusableBlocks: select(external_wp_coreData_["store"]).getEntityRecords('postType', 'wp_block',
|
||||
/**
|
||||
* Unbounded queries are not supported on native so as a workaround we set per_page with the maximum value.
|
||||
* Related issue: https://github.com/wordpress-mobile/gutenberg-mobile/issues/2661
|
||||
|
@ -12531,7 +12531,7 @@ function useBlockEditorSettings(settings, hasTemplate) {
|
|||
undo = _useDispatch.undo;
|
||||
|
||||
return Object(external_wp_element_["useMemo"])(function () {
|
||||
return use_block_editor_settings_objectSpread(use_block_editor_settings_objectSpread({}, Object(external_lodash_["pick"])(settings, ['__experimentalBlockDirectory', '__experimentalBlockPatterns', '__experimentalBlockPatternCategories', '__experimentalFeatures', '__experimentalGlobalStylesUserEntityId', '__experimentalGlobalStylesBaseStyles', '__experimentalPreferredStyleVariations', '__experimentalSetIsInserterOpened', 'alignWide', 'allowedBlockTypes', 'availableLegacyWidgets', 'bodyPlaceholder', 'codeEditingEnabled', 'colors', 'disableCustomColors', 'disableCustomFontSizes', 'disableCustomGradients', 'enableCustomUnits', 'enableCustomLineHeight', 'focusMode', 'fontSizes', 'gradients', 'hasFixedToolbar', 'hasReducedUI', 'imageEditing', 'imageSizes', 'imageDimensions', 'isRTL', 'keepCaretInsideBlock', 'maxWidth', 'onUpdateDefaultBlockStyles', 'styles', 'template', 'templateLock', 'titlePlaceholder'])), {}, {
|
||||
return use_block_editor_settings_objectSpread(use_block_editor_settings_objectSpread({}, Object(external_lodash_["pick"])(settings, ['__experimentalBlockDirectory', '__experimentalBlockPatternCategories', '__experimentalBlockPatterns', '__experimentalFeatures', '__experimentalGlobalStylesBaseStyles', '__experimentalGlobalStylesUserEntityId', '__experimentalPreferredStyleVariations', '__experimentalSetIsInserterOpened', 'alignWide', 'allowedBlockTypes', 'availableLegacyWidgets', 'bodyPlaceholder', 'codeEditingEnabled', 'colors', 'disableCustomColors', 'disableCustomFontSizes', 'disableCustomGradients', 'enableCustomLineHeight', 'enableCustomSpacing', 'enableCustomUnits', 'focusMode', 'fontSizes', 'gradients', 'hasFixedToolbar', 'hasReducedUI', 'imageDimensions', 'imageEditing', 'imageSizes', 'isRTL', 'keepCaretInsideBlock', 'maxWidth', 'onUpdateDefaultBlockStyles', 'styles', 'template', 'templateLock', 'titlePlaceholder'])), {}, {
|
||||
mediaUpload: hasUploadPermissions ? mediaUpload : undefined,
|
||||
__experimentalReusableBlocks: reusableBlocks,
|
||||
__experimentalFetchLinkSuggestions: Object(external_lodash_["partialRight"])(fetchLinkSuggestions, settings),
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -108,6 +108,13 @@ this["wp"] = this["wp"] || {}; this["wp"]["reusableBlocks"] =
|
|||
|
||||
/***/ }),
|
||||
|
||||
/***/ 2:
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
(function() { module.exports = window["lodash"]; }());
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 3:
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
|
@ -169,6 +176,9 @@ var external_regeneratorRuntime_default = /*#__PURE__*/__webpack_require__.n(ext
|
|||
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js
|
||||
var asyncToGenerator = __webpack_require__(47);
|
||||
|
||||
// EXTERNAL MODULE: external "lodash"
|
||||
var external_lodash_ = __webpack_require__(2);
|
||||
|
||||
// EXTERNAL MODULE: external ["wp","blocks"]
|
||||
var external_wp_blocks_ = __webpack_require__(9);
|
||||
|
||||
|
@ -179,12 +189,17 @@ var external_wp_i18n_ = __webpack_require__(1);
|
|||
|
||||
|
||||
|
||||
/**
|
||||
* External dependencies
|
||||
*/
|
||||
|
||||
/**
|
||||
* WordPress dependencies
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
|
@ -235,7 +250,7 @@ var controls = {
|
|||
var clientId = _ref.clientId;
|
||||
var oldBlock = registry.select('core/block-editor').getBlock(clientId);
|
||||
var reusableBlock = registry.select('core').getEditedEntityRecord('postType', 'wp_block', oldBlock.attributes.ref);
|
||||
var newBlocks = Object(external_wp_blocks_["parse"])(reusableBlock.content);
|
||||
var newBlocks = Object(external_wp_blocks_["parse"])(Object(external_lodash_["isFunction"])(reusableBlock.content) ? reusableBlock.content(reusableBlock) : reusableBlock.content);
|
||||
registry.dispatch('core/block-editor').replaceBlocks(oldBlock.clientId, newBlocks);
|
||||
};
|
||||
}),
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -13,7 +13,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '5.8-alpha-50456';
|
||||
$wp_version = '5.8-alpha-50458';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue