FIX Broken deprecated.js
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
9c6044015a
commit
7c73d5079f
|
|
@ -1 +1 @@
|
||||||
<?php return array('dependencies' => array('react', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => '8cdbe6d5e08fd9883c1a');
|
<?php return array('dependencies' => array('react', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => '3da4dd74b01a483d6218');
|
||||||
|
|
|
||||||
|
|
@ -574,13 +574,6 @@ const v2 = {
|
||||||
iconPosition: {
|
iconPosition: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
default: 'top'
|
default: 'top'
|
||||||
},
|
|
||||||
// Read historical <img src> to ensure the deprecated save matches exactly
|
|
||||||
iconUrl: {
|
|
||||||
type: 'string',
|
|
||||||
source: 'attribute',
|
|
||||||
selector: '.icon .icon__image',
|
|
||||||
attribute: 'src'
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
save({
|
save({
|
||||||
|
|
@ -595,8 +588,7 @@ const v2 = {
|
||||||
logoAlt,
|
logoAlt,
|
||||||
logoUrl,
|
logoUrl,
|
||||||
variant,
|
variant,
|
||||||
iconPosition,
|
iconPosition
|
||||||
iconUrl
|
|
||||||
} = attributes;
|
} = attributes;
|
||||||
function getIconPicture() {
|
function getIconPicture() {
|
||||||
switch (iconName) {
|
switch (iconName) {
|
||||||
|
|
@ -628,8 +620,7 @@ const v2 = {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Use exact stored src when present for perfect match
|
const iconPicture = getIconPicture();
|
||||||
const iconPicture = iconUrl || getIconPicture();
|
|
||||||
return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("section", {
|
return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("section", {
|
||||||
..._wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__.useBlockProps.save({
|
..._wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__.useBlockProps.save({
|
||||||
className: `homegrade-blocks-highlight ${variant ? `homegrade-blocks-highlight--${variant}` : ''}`
|
className: `homegrade-blocks-highlight ${variant ? `homegrade-blocks-highlight--${variant}` : ''}`
|
||||||
|
|
@ -816,7 +807,7 @@ const v1 = {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ([v2KSES, v2, v1]);
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ([v2, v1]);
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -56,27 +56,10 @@ const v2 = {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
default: 'top',
|
default: 'top',
|
||||||
},
|
},
|
||||||
// Read historical <img src> to ensure the deprecated save matches exactly
|
|
||||||
iconUrl: {
|
|
||||||
type: 'string',
|
|
||||||
source: 'attribute',
|
|
||||||
selector: '.icon .icon__image',
|
|
||||||
attribute: 'src',
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
save({ attributes }) {
|
save({ attributes }) {
|
||||||
const {
|
const { title, iconName, hasTitle, hasIcon, hasLogo, logoAlt, logoUrl, variant, iconPosition } =
|
||||||
title,
|
attributes;
|
||||||
iconName,
|
|
||||||
hasTitle,
|
|
||||||
hasIcon,
|
|
||||||
hasLogo,
|
|
||||||
logoAlt,
|
|
||||||
logoUrl,
|
|
||||||
variant,
|
|
||||||
iconPosition,
|
|
||||||
iconUrl,
|
|
||||||
} = attributes;
|
|
||||||
|
|
||||||
function getIconPicture() {
|
function getIconPicture() {
|
||||||
switch (iconName) {
|
switch (iconName) {
|
||||||
|
|
@ -108,8 +91,7 @@ const v2 = {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Use exact stored src when present for perfect match
|
const iconPicture = getIconPicture();
|
||||||
const iconPicture = iconUrl || getIconPicture();
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<section
|
<section
|
||||||
|
|
@ -334,4 +316,4 @@ const v1 = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
export default [v2KSES, v2, v1];
|
export default [v2, v1];
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user