empty icon datas in attributes when disabling the icon feature
This commit is contained in:
parent
3e54e7f0cf
commit
762227e0f3
|
|
@ -1 +1 @@
|
||||||
<?php return array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => 'b8178c4637e6f7dc88cc');
|
<?php return array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => 'b0e7fd47b18a02c51167');
|
||||||
|
|
|
||||||
|
|
@ -331,11 +331,9 @@ function Edit({
|
||||||
hasCustomImage: !hasCustomImage
|
hasCustomImage: !hasCustomImage
|
||||||
});
|
});
|
||||||
if (!newHasAutoImage) {
|
if (!newHasAutoImage) {
|
||||||
console.log("newHasAutoImage", newHasAutoImage);
|
removeImageAttributes();
|
||||||
// setAttributes({ blockCustomTitle: undefined });
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function setImageAttributes(image) {
|
function setImageAttributes(image) {
|
||||||
setAttributes({
|
setAttributes({
|
||||||
imageId: image.id,
|
imageId: image.id,
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -10,7 +10,6 @@ $customImageUrl = $attributes['imageUrl'] ?? null;
|
||||||
$customImageAlt = $attributes['imageAlt'] ?? null;
|
$customImageAlt = $attributes['imageAlt'] ?? null;
|
||||||
|
|
||||||
$customTitle = $attributes['blockCustomTitle'] ?? null;
|
$customTitle = $attributes['blockCustomTitle'] ?? null;
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -68,8 +68,7 @@ export default function Edit({ attributes, setAttributes }) {
|
||||||
function onChangeHasCustomImage(newHasAutoImage) {
|
function onChangeHasCustomImage(newHasAutoImage) {
|
||||||
setAttributes({ hasCustomImage: !hasCustomImage });
|
setAttributes({ hasCustomImage: !hasCustomImage });
|
||||||
if (!newHasAutoImage) {
|
if (!newHasAutoImage) {
|
||||||
console.log("newHasAutoImage", newHasAutoImage);
|
removeImageAttributes();
|
||||||
// setAttributes({ blockCustomTitle: undefined });
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function setImageAttributes(image) {
|
function setImageAttributes(image) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user