removing page header description attribute
This commit is contained in:
parent
938de52349
commit
d01e7813db
|
|
@ -27,9 +27,6 @@
|
|||
"pageHeaderTitle": {
|
||||
"type": "string"
|
||||
},
|
||||
"pageHeaderDescription": {
|
||||
"type": "string"
|
||||
},
|
||||
"hasCta": {
|
||||
"type": "boolean",
|
||||
"default": false
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
<?php return array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => '9816905fa59c35015482');
|
||||
<?php return array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => '707cbf4f5eee20e6f5ce');
|
||||
|
|
|
|||
|
|
@ -40,7 +40,6 @@ function Edit({
|
|||
blockCustomTitle,
|
||||
hasCustomTitle,
|
||||
pageHeaderTitle,
|
||||
pageHeaderDescription,
|
||||
hasCta,
|
||||
cta,
|
||||
hasCustomImage,
|
||||
|
|
@ -61,7 +60,6 @@ function Edit({
|
|||
return Image;
|
||||
}
|
||||
});
|
||||
console.log("pageIllustration", pageIllustration);
|
||||
function onChangeBlockCustomTitle(blockCustomTitle) {
|
||||
setAttributes({
|
||||
blockCustomTitle
|
||||
|
|
@ -114,11 +112,6 @@ function Edit({
|
|||
});
|
||||
}
|
||||
}
|
||||
function onChangeDescription(newDescription) {
|
||||
setAttributes({
|
||||
pageHeaderDescription: newDescription
|
||||
});
|
||||
}
|
||||
function onChangeCTA(newCtaValue) {
|
||||
setAttributes({
|
||||
cta: {
|
||||
|
|
@ -138,7 +131,6 @@ function Edit({
|
|||
}
|
||||
});
|
||||
}
|
||||
console.log("attributes", attributes);
|
||||
return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_4__.InspectorControls, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelBody, {
|
||||
className: "homegrade-blocks-content-page-header__panel-cta",
|
||||
title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("Titre du bloc", "homegrade-blocks")
|
||||
|
|
@ -210,13 +202,7 @@ function Edit({
|
|||
value: pageHeaderTitle,
|
||||
onChange: onChangeTitle
|
||||
// style={{ textAlign: props.attributes.alignment }}
|
||||
})), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_4__.RichText, {
|
||||
tagName: "p",
|
||||
placeholder: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("Ajouter ici le texte d'introduction de cette page", "homegrade"),
|
||||
value: pageHeaderDescription,
|
||||
onChange: onChangeDescription
|
||||
// style={{ textAlign: props.attributes.alignment }}
|
||||
}), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_4__.InnerBlocks, {
|
||||
})), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_4__.InnerBlocks, {
|
||||
template: [["core/paragraph", {
|
||||
placeholder: "Ajouter ici le texte"
|
||||
}]],
|
||||
|
|
@ -308,8 +294,6 @@ function save({
|
|||
attributes,
|
||||
setAttributes
|
||||
}) {
|
||||
var blockProps = _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.useBlockProps.save();
|
||||
// return el("div", blockProps, el(InnerBlocks.Content));
|
||||
return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
|
||||
..._wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.useBlockProps.save({
|
||||
className: `innerblocks`
|
||||
|
|
@ -450,7 +434,7 @@ module.exports = window["wp"]["primitives"];
|
|||
\************************/
|
||||
/***/ ((module) => {
|
||||
|
||||
module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"homegrade-content-blocks/content-page-header","version":"0.1.0","title":"Content page header","category":"homegrade-blocks","icon":"smiley","description":"Bloc bannière/header de contenu de premier niveau pour les pages de contenu","supports":{"html":false,"anchor":true},"textdomain":"homegrade-blocks","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","render":"file:./render.php","attributes":{"hasCustomTitle":{"type":"boolean","default":false},"blockCustomTitle":{"type":"string"},"pageHeaderTitle":{"type":"string"},"pageHeaderDescription":{"type":"string"},"hasCta":{"type":"boolean","default":false},"cta":{"type":"object"},"hasCustomImage":{"type":"boolean","default":false},"imageUrl":{"type":"string"},"imageAlt":{"type":"string"},"imageId":{"type":"number"},"imageProportion":{"type":"string","default":"original"},"anchor":{"type":"string"}}}');
|
||||
module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"homegrade-content-blocks/content-page-header","version":"0.1.0","title":"Content page header","category":"homegrade-blocks","icon":"smiley","description":"Bloc bannière/header de contenu de premier niveau pour les pages de contenu","supports":{"html":false,"anchor":true},"textdomain":"homegrade-blocks","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","render":"file:./render.php","attributes":{"hasCustomTitle":{"type":"boolean","default":false},"blockCustomTitle":{"type":"string"},"pageHeaderTitle":{"type":"string"},"hasCta":{"type":"boolean","default":false},"cta":{"type":"object"},"hasCustomImage":{"type":"boolean","default":false},"imageUrl":{"type":"string"},"imageAlt":{"type":"string"},"imageId":{"type":"number"},"imageProportion":{"type":"string","default":"original"},"anchor":{"type":"string"}}}');
|
||||
|
||||
/***/ })
|
||||
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -27,9 +27,6 @@
|
|||
"pageHeaderTitle": {
|
||||
"type": "string"
|
||||
},
|
||||
"pageHeaderDescription": {
|
||||
"type": "string"
|
||||
},
|
||||
"hasCta": {
|
||||
"type": "boolean",
|
||||
"default": false
|
||||
|
|
|
|||
|
|
@ -27,7 +27,6 @@ export default function Edit({ attributes, setAttributes }) {
|
|||
blockCustomTitle,
|
||||
hasCustomTitle,
|
||||
pageHeaderTitle,
|
||||
pageHeaderDescription,
|
||||
hasCta,
|
||||
cta,
|
||||
hasCustomImage,
|
||||
|
|
@ -49,8 +48,6 @@ export default function Edit({ attributes, setAttributes }) {
|
|||
}
|
||||
});
|
||||
|
||||
console.log("pageIllustration", pageIllustration);
|
||||
|
||||
function onChangeBlockCustomTitle(blockCustomTitle) {
|
||||
setAttributes({ blockCustomTitle });
|
||||
}
|
||||
|
|
@ -89,9 +86,6 @@ export default function Edit({ attributes, setAttributes }) {
|
|||
setAttributes({ cta: undefined });
|
||||
}
|
||||
}
|
||||
function onChangeDescription(newDescription) {
|
||||
setAttributes({ pageHeaderDescription: newDescription });
|
||||
}
|
||||
function onChangeCTA(newCtaValue) {
|
||||
setAttributes({
|
||||
cta: {
|
||||
|
|
@ -111,7 +105,6 @@ export default function Edit({ attributes, setAttributes }) {
|
|||
},
|
||||
});
|
||||
}
|
||||
console.log("attributes", attributes);
|
||||
return (
|
||||
<>
|
||||
<InspectorControls>
|
||||
|
|
@ -242,16 +235,7 @@ export default function Edit({ attributes, setAttributes }) {
|
|||
// style={{ textAlign: props.attributes.alignment }}
|
||||
/>
|
||||
</div>
|
||||
<RichText
|
||||
tagName="p"
|
||||
placeholder={__(
|
||||
"Ajouter ici le texte d'introduction de cette page",
|
||||
"homegrade"
|
||||
)}
|
||||
value={pageHeaderDescription}
|
||||
onChange={onChangeDescription}
|
||||
// style={{ textAlign: props.attributes.alignment }}
|
||||
/>
|
||||
|
||||
<InnerBlocks
|
||||
template={[
|
||||
["core/paragraph", { placeholder: "Ajouter ici le texte" }],
|
||||
|
|
|
|||
|
|
@ -2,8 +2,6 @@ import { useBlockProps, RichText, InnerBlocks } from "@wordpress/block-editor";
|
|||
import { __ } from "@wordpress/i18n";
|
||||
|
||||
export default function save({ attributes, setAttributes }) {
|
||||
var blockProps = useBlockProps.save();
|
||||
// return el("div", blockProps, el(InnerBlocks.Content));
|
||||
return (
|
||||
<div
|
||||
{...useBlockProps.save({
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user