test rehydrating rankmath
This commit is contained in:
parent
266a303470
commit
9b3b4b68cf
|
|
@ -1 +1 @@
|
||||||
<?php return array('dependencies' => array('react', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n'), 'version' => 'f8adefcd282fd42751be');
|
<?php return array('dependencies' => array('react', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n'), 'version' => 'd1bff0478a28e4096c46');
|
||||||
|
|
|
||||||
|
|
@ -223,6 +223,25 @@ function Edit({
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}, [currentRelatedPost]);
|
}, [currentRelatedPost]);
|
||||||
|
|
||||||
|
// const editedContent = wp.data.select("core/editor").getEditedPostContent();
|
||||||
|
// function getContent() {
|
||||||
|
// // Récupérer et retourner le contenu personnalisé ici
|
||||||
|
// return 'Votre contenu personnalisé';
|
||||||
|
// }
|
||||||
|
// useEffect(() => {
|
||||||
|
// if (!rankMathEditor) return;
|
||||||
|
// console.log("rankMathEditor", rankMathEditor);
|
||||||
|
// console.log("wp.hooks", wp.hooks);
|
||||||
|
// console.log(`editedContent`, editedContent);
|
||||||
|
|
||||||
|
// wp.hooks.addFilter("rank_math_content", "rank-math", updateContent);
|
||||||
|
// function updateContent() {
|
||||||
|
// return editedContent;
|
||||||
|
// }
|
||||||
|
// rankMathEditor.refresh("content");
|
||||||
|
// }, [rankMathEditor]);
|
||||||
|
|
||||||
return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_OptionsSelectControl__WEBPACK_IMPORTED_MODULE_7__["default"], {
|
return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_OptionsSelectControl__WEBPACK_IMPORTED_MODULE_7__["default"], {
|
||||||
relatedPostId: relatedPostId,
|
relatedPostId: relatedPostId,
|
||||||
postType: postType,
|
postType: postType,
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -72,6 +72,24 @@ export default function Edit({ attributes, setAttributes }) {
|
||||||
}
|
}
|
||||||
}, [currentRelatedPost]);
|
}, [currentRelatedPost]);
|
||||||
|
|
||||||
|
// const editedContent = wp.data.select("core/editor").getEditedPostContent();
|
||||||
|
// function getContent() {
|
||||||
|
// // Récupérer et retourner le contenu personnalisé ici
|
||||||
|
// return 'Votre contenu personnalisé';
|
||||||
|
// }
|
||||||
|
// useEffect(() => {
|
||||||
|
// if (!rankMathEditor) return;
|
||||||
|
// console.log("rankMathEditor", rankMathEditor);
|
||||||
|
// console.log("wp.hooks", wp.hooks);
|
||||||
|
// console.log(`editedContent`, editedContent);
|
||||||
|
|
||||||
|
// wp.hooks.addFilter("rank_math_content", "rank-math", updateContent);
|
||||||
|
// function updateContent() {
|
||||||
|
// return editedContent;
|
||||||
|
// }
|
||||||
|
// rankMathEditor.refresh("content");
|
||||||
|
// }, [rankMathEditor]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<OptionsSelectControl
|
<OptionsSelectControl
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user