passing classes to caption and description
This commit is contained in:
parent
1e11b07f35
commit
d6471edb8e
|
|
@ -1 +1 @@
|
|||
<?php return array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => '86470840525466393d70');
|
||||
<?php return array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => '3356560b010309d5ab53');
|
||||
|
|
|
|||
|
|
@ -108,7 +108,6 @@ function ImagePanelBody({
|
|||
setAttributes
|
||||
}) {
|
||||
function setImageAttributes(image) {
|
||||
console.log(image);
|
||||
setAttributes({
|
||||
imageId: image.id,
|
||||
imageAlt: image.alt,
|
||||
|
|
@ -270,7 +269,11 @@ function Edit({
|
|||
imageAlt: imageAlt,
|
||||
imageUrl: imageUrl,
|
||||
imageProportion: imageProportion
|
||||
}), imageDescription && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", null, imageDescription), imageCaption && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", null, imageCaption))), contentDisposition === "right" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
|
||||
}), imageDescription && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", {
|
||||
className: "picture_description"
|
||||
}, imageDescription), imageCaption && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", {
|
||||
className: "picture_caption"
|
||||
}, imageCaption))), contentDisposition === "right" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
|
||||
className: "homegrade-blocks-text-image__column homegrade-blocks-text-image__column--image"
|
||||
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_ImageMediaPlaceholder__WEBPACK_IMPORTED_MODULE_3__["default"], {
|
||||
imageAlt: imageAlt,
|
||||
|
|
@ -282,7 +285,11 @@ function Edit({
|
|||
imageAlt: imageAlt,
|
||||
imageUrl: imageUrl,
|
||||
imageProportion: imageProportion
|
||||
}), imageDescription && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", null, imageDescription), imageCaption && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", null, imageCaption)), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
|
||||
}), imageDescription && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", {
|
||||
className: "picture_description"
|
||||
}, imageDescription), imageCaption && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", {
|
||||
className: "picture_caption"
|
||||
}, imageCaption)), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
|
||||
className: "homegrade-blocks-text-image__column homegrade-blocks-text-image__column--text"
|
||||
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_6__.InnerBlocks, {
|
||||
template: [["core/paragraph", {
|
||||
|
|
@ -375,13 +382,21 @@ function save({
|
|||
imageAlt: imageAlt,
|
||||
imageUrl: imageUrl,
|
||||
imageProportion: imageProportion
|
||||
}), imageDescription && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", null, imageDescription), imageCaption && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", null, imageCaption))), contentDisposition === "right" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
|
||||
}), imageDescription && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", {
|
||||
className: "picture_description"
|
||||
}, imageDescription), imageCaption && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", {
|
||||
className: "picture_caption"
|
||||
}, imageCaption))), contentDisposition === "right" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
|
||||
className: "homegrade-blocks-text-image__column homegrade-blocks-text-image__column--image"
|
||||
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_Image__WEBPACK_IMPORTED_MODULE_2__["default"], {
|
||||
imageAlt: imageAlt,
|
||||
imageUrl: imageUrl,
|
||||
imageProportion: imageProportion
|
||||
}), imageDescription && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", null, imageDescription), imageCaption && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", null, imageCaption)), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
|
||||
}), imageDescription && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", {
|
||||
className: "picture_description"
|
||||
}, imageDescription), imageCaption && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", {
|
||||
className: "picture_caption"
|
||||
}, imageCaption)), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
|
||||
className: "homegrade-blocks-text-image__column homegrade-blocks-text-image__column--text"
|
||||
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.InnerBlocks.Content, null))));
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -108,8 +108,12 @@ export default function Edit({ attributes, setAttributes, ...props }) {
|
|||
imageUrl={imageUrl}
|
||||
imageProportion={imageProportion}
|
||||
/>
|
||||
{imageDescription && <p>{imageDescription}</p>}
|
||||
{imageCaption && <p>{imageCaption}</p>}
|
||||
{imageDescription && (
|
||||
<p className="picture_description">{imageDescription}</p>
|
||||
)}
|
||||
{imageCaption && (
|
||||
<p className="picture_caption">{imageCaption}</p>
|
||||
)}
|
||||
</div>
|
||||
</>
|
||||
)}
|
||||
|
|
@ -128,8 +132,12 @@ export default function Edit({ attributes, setAttributes, ...props }) {
|
|||
imageUrl={imageUrl}
|
||||
imageProportion={imageProportion}
|
||||
/>
|
||||
{imageDescription && <p>{imageDescription}</p>}
|
||||
{imageCaption && <p>{imageCaption}</p>}
|
||||
{imageDescription && (
|
||||
<p className="picture_description">{imageDescription}</p>
|
||||
)}
|
||||
{imageCaption && (
|
||||
<p className="picture_caption">{imageCaption}</p>
|
||||
)}
|
||||
</div>
|
||||
<div className="homegrade-blocks-text-image__column homegrade-blocks-text-image__column--text">
|
||||
<InnerBlocks
|
||||
|
|
|
|||
|
|
@ -28,8 +28,10 @@ export default function save({ attributes }) {
|
|||
imageUrl={imageUrl}
|
||||
imageProportion={imageProportion}
|
||||
/>
|
||||
{imageDescription && <p>{imageDescription}</p>}
|
||||
{imageCaption && <p>{imageCaption}</p>}
|
||||
{imageDescription && (
|
||||
<p className="picture_description">{imageDescription}</p>
|
||||
)}
|
||||
{imageCaption && <p className="picture_caption">{imageCaption}</p>}
|
||||
</div>
|
||||
</>
|
||||
)}
|
||||
|
|
@ -41,8 +43,10 @@ export default function save({ attributes }) {
|
|||
imageUrl={imageUrl}
|
||||
imageProportion={imageProportion}
|
||||
/>
|
||||
{imageDescription && <p>{imageDescription}</p>}
|
||||
{imageCaption && <p>{imageCaption}</p>}
|
||||
{imageDescription && (
|
||||
<p className="picture_description">{imageDescription}</p>
|
||||
)}
|
||||
{imageCaption && <p className="picture_caption">{imageCaption}</p>}
|
||||
</div>
|
||||
<div className="homegrade-blocks-text-image__column homegrade-blocks-text-image__column--text">
|
||||
<InnerBlocks.Content />
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user