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: {
|
||||
type: 'string',
|
||||
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({
|
||||
|
|
@ -595,8 +588,7 @@ const v2 = {
|
|||
logoAlt,
|
||||
logoUrl,
|
||||
variant,
|
||||
iconPosition,
|
||||
iconUrl
|
||||
iconPosition
|
||||
} = attributes;
|
||||
function getIconPicture() {
|
||||
switch (iconName) {
|
||||
|
|
@ -628,8 +620,7 @@ const v2 = {
|
|||
return '';
|
||||
}
|
||||
}
|
||||
// Use exact stored src when present for perfect match
|
||||
const iconPicture = iconUrl || getIconPicture();
|
||||
const iconPicture = getIconPicture();
|
||||
return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("section", {
|
||||
..._wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__.useBlockProps.save({
|
||||
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',
|
||||
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 }) {
|
||||
const {
|
||||
title,
|
||||
iconName,
|
||||
hasTitle,
|
||||
hasIcon,
|
||||
hasLogo,
|
||||
logoAlt,
|
||||
logoUrl,
|
||||
variant,
|
||||
iconPosition,
|
||||
iconUrl,
|
||||
} = attributes;
|
||||
const { title, iconName, hasTitle, hasIcon, hasLogo, logoAlt, logoUrl, variant, iconPosition } =
|
||||
attributes;
|
||||
|
||||
function getIconPicture() {
|
||||
switch (iconName) {
|
||||
|
|
@ -108,8 +91,7 @@ const v2 = {
|
|||
return '';
|
||||
}
|
||||
}
|
||||
// Use exact stored src when present for perfect match
|
||||
const iconPicture = iconUrl || getIconPicture();
|
||||
const iconPicture = getIconPicture();
|
||||
|
||||
return (
|
||||
<section
|
||||
|
|
@ -334,4 +316,4 @@ const v1 = {
|
|||
},
|
||||
};
|
||||
|
||||
export default [v2KSES, v2, v1];
|
||||
export default [v2, v1];
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user