@wordpress/block-library 8.28.2 → 8.28.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/button/edit.js +2 -4
- package/build/button/edit.js.map +1 -1
- package/build/image/edit.js +2 -4
- package/build/image/edit.js.map +1 -1
- package/build/image/image.js +6 -3
- package/build/image/image.js.map +1 -1
- package/build-module/button/edit.js +2 -4
- package/build-module/button/edit.js.map +1 -1
- package/build-module/image/edit.js +2 -4
- package/build-module/image/edit.js.map +1 -1
- package/build-module/image/image.js +6 -3
- package/build-module/image/image.js.map +1 -1
- package/package.json +8 -8
- package/src/button/edit.js +4 -4
- package/src/image/edit.js +4 -4
- package/src/image/image.js +15 -6
package/src/button/edit.js
CHANGED
|
@@ -238,15 +238,15 @@ function ButtonEdit( props ) {
|
|
|
238
238
|
return {};
|
|
239
239
|
}
|
|
240
240
|
|
|
241
|
-
const
|
|
241
|
+
const blockBindingsSource = unlock(
|
|
242
242
|
select( blockEditorStore )
|
|
243
|
-
);
|
|
243
|
+
).getBlockBindingsSource( metadata?.bindings?.url?.source );
|
|
244
244
|
|
|
245
245
|
return {
|
|
246
246
|
lockUrlControls:
|
|
247
247
|
!! metadata?.bindings?.url &&
|
|
248
|
-
|
|
249
|
-
?.lockAttributesEditing,
|
|
248
|
+
( ! blockBindingsSource ||
|
|
249
|
+
blockBindingsSource?.lockAttributesEditing ),
|
|
250
250
|
};
|
|
251
251
|
},
|
|
252
252
|
[ isSelected ]
|
package/src/image/edit.js
CHANGED
|
@@ -341,15 +341,15 @@ export function ImageEdit( {
|
|
|
341
341
|
return {};
|
|
342
342
|
}
|
|
343
343
|
|
|
344
|
-
const
|
|
344
|
+
const blockBindingsSource = unlock(
|
|
345
345
|
select( blockEditorStore )
|
|
346
|
-
);
|
|
346
|
+
).getBlockBindingsSource( metadata?.bindings?.url?.source );
|
|
347
347
|
|
|
348
348
|
return {
|
|
349
349
|
lockUrlControls:
|
|
350
350
|
!! metadata?.bindings?.url &&
|
|
351
|
-
|
|
352
|
-
?.lockAttributesEditing,
|
|
351
|
+
( ! blockBindingsSource ||
|
|
352
|
+
blockBindingsSource?.lockAttributesEditing ),
|
|
353
353
|
};
|
|
354
354
|
},
|
|
355
355
|
[ isSingleSelected ]
|
package/src/image/image.js
CHANGED
|
@@ -426,23 +426,32 @@ export default function Image( {
|
|
|
426
426
|
} = metadata?.bindings || {};
|
|
427
427
|
const hasParentPattern =
|
|
428
428
|
getBlockParentsByBlockName( clientId, 'core/block' ).length > 0;
|
|
429
|
+
const urlBindingSource = getBlockBindingsSource(
|
|
430
|
+
urlBinding?.source
|
|
431
|
+
);
|
|
432
|
+
const altBindingSource = getBlockBindingsSource(
|
|
433
|
+
altBinding?.source
|
|
434
|
+
);
|
|
435
|
+
const titleBindingSource = getBlockBindingsSource(
|
|
436
|
+
titleBinding?.source
|
|
437
|
+
);
|
|
429
438
|
return {
|
|
430
439
|
lockUrlControls:
|
|
431
440
|
!! urlBinding &&
|
|
432
|
-
|
|
433
|
-
?.lockAttributesEditing,
|
|
441
|
+
( ! urlBindingSource ||
|
|
442
|
+
urlBindingSource?.lockAttributesEditing ),
|
|
434
443
|
lockHrefControls:
|
|
435
444
|
// Disable editing the link of the URL if the image is inside a pattern instance.
|
|
436
445
|
// This is a temporary solution until we support overriding the link on the frontend.
|
|
437
446
|
hasParentPattern,
|
|
438
447
|
lockAltControls:
|
|
439
448
|
!! altBinding &&
|
|
440
|
-
|
|
441
|
-
?.lockAttributesEditing,
|
|
449
|
+
( ! altBindingSource ||
|
|
450
|
+
altBindingSource?.lockAttributesEditing ),
|
|
442
451
|
lockTitleControls:
|
|
443
452
|
!! titleBinding &&
|
|
444
|
-
|
|
445
|
-
?.lockAttributesEditing,
|
|
453
|
+
( ! titleBindingSource ||
|
|
454
|
+
titleBindingSource?.lockAttributesEditing ),
|
|
446
455
|
};
|
|
447
456
|
},
|
|
448
457
|
[ clientId, isSingleSelected, metadata?.bindings ]
|