--- a/wp/wp-includes/js/dist/reusable-blocks.js Fri Sep 05 18:40:08 2025 +0200
+++ b/wp/wp-includes/js/dist/reusable-blocks.js Fri Sep 05 18:52:52 2025 +0200
@@ -60,15 +60,15 @@
__experimentalIsEditingReusableBlock: () => (__experimentalIsEditingReusableBlock)
});
-;// CONCATENATED MODULE: external ["wp","data"]
+;// external ["wp","data"]
const external_wp_data_namespaceObject = window["wp"]["data"];
-;// CONCATENATED MODULE: external ["wp","blockEditor"]
+;// external ["wp","blockEditor"]
const external_wp_blockEditor_namespaceObject = window["wp"]["blockEditor"];
-;// CONCATENATED MODULE: external ["wp","blocks"]
+;// external ["wp","blocks"]
const external_wp_blocks_namespaceObject = window["wp"]["blocks"];
-;// CONCATENATED MODULE: external ["wp","i18n"]
+;// external ["wp","i18n"]
const external_wp_i18n_namespaceObject = window["wp"]["i18n"];
-;// CONCATENATED MODULE: ./node_modules/@wordpress/reusable-blocks/build-module/store/actions.js
+;// ./node_modules/@wordpress/reusable-blocks/build-module/store/actions.js
/**
* WordPress dependencies
*/
@@ -163,7 +163,7 @@
};
}
-;// CONCATENATED MODULE: ./node_modules/@wordpress/reusable-blocks/build-module/store/reducer.js
+;// ./node_modules/@wordpress/reusable-blocks/build-module/store/reducer.js
/**
* WordPress dependencies
*/
@@ -181,7 +181,7 @@
isEditingReusableBlock
}));
-;// CONCATENATED MODULE: ./node_modules/@wordpress/reusable-blocks/build-module/store/selectors.js
+;// ./node_modules/@wordpress/reusable-blocks/build-module/store/selectors.js
/**
* Returns true if reusable block is in the editing state.
*
@@ -193,7 +193,7 @@
return state.isEditingReusableBlock[clientId];
}
-;// CONCATENATED MODULE: ./node_modules/@wordpress/reusable-blocks/build-module/store/index.js
+;// ./node_modules/@wordpress/reusable-blocks/build-module/store/index.js
/**
* WordPress dependencies
*/
@@ -221,15 +221,15 @@
});
(0,external_wp_data_namespaceObject.register)(store);
-;// CONCATENATED MODULE: external ["wp","element"]
+;// external ["wp","element"]
const external_wp_element_namespaceObject = window["wp"]["element"];
-;// CONCATENATED MODULE: external ["wp","components"]
+;// external ["wp","components"]
const external_wp_components_namespaceObject = window["wp"]["components"];
-;// CONCATENATED MODULE: external ["wp","primitives"]
+;// external ["wp","primitives"]
const external_wp_primitives_namespaceObject = window["wp"]["primitives"];
-;// CONCATENATED MODULE: external "ReactJSXRuntime"
+;// external "ReactJSXRuntime"
const external_ReactJSXRuntime_namespaceObject = window["ReactJSXRuntime"];
-;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/symbol.js
+;// ./node_modules/@wordpress/icons/build-module/library/symbol.js
/**
* WordPress dependencies
*/
@@ -244,22 +244,11 @@
});
/* harmony default export */ const library_symbol = (symbol);
-;// CONCATENATED MODULE: external ["wp","notices"]
+;// external ["wp","notices"]
const external_wp_notices_namespaceObject = window["wp"]["notices"];
-;// CONCATENATED MODULE: external ["wp","coreData"]
+;// external ["wp","coreData"]
const external_wp_coreData_namespaceObject = window["wp"]["coreData"];
-;// CONCATENATED MODULE: external ["wp","privateApis"]
-const external_wp_privateApis_namespaceObject = window["wp"]["privateApis"];
-;// CONCATENATED MODULE: ./node_modules/@wordpress/reusable-blocks/build-module/lock-unlock.js
-/**
- * WordPress dependencies
- */
-
-const {
- unlock
-} = (0,external_wp_privateApis_namespaceObject.__dangerousOptInToUnstableAPIsOnlyForCoreModules)('I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.', '@wordpress/reusable-blocks');
-
-;// CONCATENATED MODULE: ./node_modules/@wordpress/reusable-blocks/build-module/components/reusable-blocks-menu-items/reusable-block-convert-button.js
+;// ./node_modules/@wordpress/reusable-blocks/build-module/components/reusable-blocks-menu-items/reusable-block-convert-button.js
/**
* WordPress dependencies
*/
@@ -278,14 +267,6 @@
*/
-
-
-
-const {
- useReusableBlocksRenameHint,
- ReusableBlocksRenameHint
-} = unlock(external_wp_blockEditor_namespaceObject.privateApis);
-
/**
* Menu control to convert block(s) to reusable block.
*
@@ -295,12 +276,12 @@
* @param {()=>void} props.onClose Callback to close the menu.
* @return {import('react').ComponentType} The menu control or null.
*/
+
function ReusableBlockConvertButton({
clientIds,
rootClientId,
onClose
}) {
- const showRenameHint = useReusableBlocksRenameHint();
const [syncType, setSyncType] = (0,external_wp_element_namespaceObject.useState)(undefined);
const [isModalOpen, setIsModalOpen] = (0,external_wp_element_namespaceObject.useState)(false);
const [title, setTitle] = (0,external_wp_element_namespaceObject.useState)('');
@@ -329,7 +310,11 @@
// Hide when block doesn't support being made reusable.
(0,external_wp_blocks_namespaceObject.hasBlockSupport)(block.name, 'reusable', true)) &&
// Hide when current doesn't have permission to do that.
- !!canUser('create', 'blocks');
+ // Blocks refers to the wp_block post type, this checks the ability to create a post of that type.
+ !!canUser('create', {
+ kind: 'postType',
+ name: 'wp_block'
+ });
return _canConvert;
}, [clientIds, rootClientId]);
const {
@@ -364,7 +349,7 @@
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.MenuItem, {
icon: library_symbol,
onClick: () => setIsModalOpen(true),
- children: showRenameHint ? (0,external_wp_i18n_namespaceObject.__)('Create pattern/reusable block') : (0,external_wp_i18n_namespaceObject.__)('Create pattern')
+ children: (0,external_wp_i18n_namespaceObject.__)('Create pattern')
}), isModalOpen && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Modal, {
title: (0,external_wp_i18n_namespaceObject.__)('Create pattern'),
onRequestClose: () => {
@@ -382,13 +367,15 @@
},
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalVStack, {
spacing: "5",
- children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ReusableBlocksRenameHint, {}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.TextControl, {
+ children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.TextControl, {
+ __next40pxDefaultSize: true,
__nextHasNoMarginBottom: true,
label: (0,external_wp_i18n_namespaceObject.__)('Name'),
value: title,
onChange: setTitle,
placeholder: (0,external_wp_i18n_namespaceObject.__)('My pattern')
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToggleControl, {
+ __nextHasNoMarginBottom: true,
label: (0,external_wp_i18n_namespaceObject._x)('Synced', 'pattern (singular)'),
help: (0,external_wp_i18n_namespaceObject.__)('Sync this pattern across multiple locations.'),
checked: !syncType,
@@ -398,6 +385,7 @@
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalHStack, {
justify: "right",
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
+ __next40pxDefaultSize: true,
variant: "tertiary",
onClick: () => {
setIsModalOpen(false);
@@ -405,6 +393,7 @@
},
children: (0,external_wp_i18n_namespaceObject.__)('Cancel')
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
+ __next40pxDefaultSize: true,
variant: "primary",
type: "submit",
children: (0,external_wp_i18n_namespaceObject.__)('Create')
@@ -416,9 +405,9 @@
});
}
-;// CONCATENATED MODULE: external ["wp","url"]
+;// external ["wp","url"]
const external_wp_url_namespaceObject = window["wp"]["url"];
-;// CONCATENATED MODULE: ./node_modules/@wordpress/reusable-blocks/build-module/components/reusable-blocks-menu-items/reusable-blocks-manage-button.js
+;// ./node_modules/@wordpress/reusable-blocks/build-module/components/reusable-blocks-menu-items/reusable-blocks-manage-button.js
/**
* WordPress dependencies
*/
@@ -435,8 +424,6 @@
*/
-
-
function ReusableBlocksManageButton({
clientId
}) {
@@ -456,12 +443,19 @@
const reusableBlock = getBlock(clientId);
return {
canRemove: canRemoveBlock(clientId),
- isVisible: !!reusableBlock && (0,external_wp_blocks_namespaceObject.isReusableBlock)(reusableBlock) && !!canUser('update', 'blocks', reusableBlock.attributes.ref),
+ isVisible: !!reusableBlock && (0,external_wp_blocks_namespaceObject.isReusableBlock)(reusableBlock) && !!canUser('update', {
+ kind: 'postType',
+ name: 'wp_block',
+ id: reusableBlock.attributes.ref
+ }),
innerBlockCount: getBlockCount(clientId),
// The site editor and templates both check whether the user
// has edit_theme_options capabilities. We can leverage that here
// and omit the manage patterns link if the user can't access it.
- managePatternsUrl: canUser('create', 'templates') ? (0,external_wp_url_namespaceObject.addQueryArgs)('site-editor.php', {
+ managePatternsUrl: canUser('create', {
+ kind: 'postType',
+ name: 'wp_template'
+ }) ? (0,external_wp_url_namespaceObject.addQueryArgs)('site-editor.php', {
path: '/patterns'
}) : (0,external_wp_url_namespaceObject.addQueryArgs)('edit.php', {
post_type: 'wp_block'
@@ -486,7 +480,7 @@
}
/* harmony default export */ const reusable_blocks_manage_button = (ReusableBlocksManageButton);
-;// CONCATENATED MODULE: ./node_modules/@wordpress/reusable-blocks/build-module/components/reusable-blocks-menu-items/index.js
+;// ./node_modules/@wordpress/reusable-blocks/build-module/components/reusable-blocks-menu-items/index.js
/**
* WordPress dependencies
*/
@@ -498,8 +492,6 @@
-
-
function ReusableBlocksMenuItems({
rootClientId
}) {
@@ -519,10 +511,10 @@
});
}
-;// CONCATENATED MODULE: ./node_modules/@wordpress/reusable-blocks/build-module/components/index.js
+;// ./node_modules/@wordpress/reusable-blocks/build-module/components/index.js
-;// CONCATENATED MODULE: ./node_modules/@wordpress/reusable-blocks/build-module/index.js
+;// ./node_modules/@wordpress/reusable-blocks/build-module/index.js