Compare commits

..

No commits in common. "e6c233376e64829f2c769abb34fc01104cc14959" and "3511f7e4b1e622dcbfbddf6230cc49a7038f06ec" have entirely different histories.

4 changed files with 10 additions and 11 deletions

View File

@ -1 +1 @@
<?php return array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n'), 'version' => '510e7794936cc8444189'); <?php return array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n'), 'version' => '3425af252c990d073a9e');

View File

@ -101,10 +101,9 @@ function OptionsSelectControl({
let query = { let query = {
status: "publish", status: "publish",
per_page: -1, per_page: -1,
lang: lang,
thematiques: postMainTaxonomy ? postMainTaxonomy.id : null thematiques: postMainTaxonomy ? postMainTaxonomy.id : null
// lang: lang,
}; };
return select("core").getEntityRecords("postType", "questions", query); return select("core").getEntityRecords("postType", "questions", query);
} }
return null; return null;

File diff suppressed because one or more lines are too long

View File

@ -58,16 +58,16 @@ export default function OptionsSelectControl({ setAttributes, relatedPostId }) {
// GET TAXONOMIES INOFRMATION // GET TAXONOMIES INOFRMATION
let postTaxonomies = useSelect((select) => let postTaxonomies = useSelect((select) =>
select("core/editor").getCurrentPostAttribute("thematiques") select("core/editor").getCurrentPostAttribute("thematiques"),
); );
let postMainTaxonomy = useSelect( let postMainTaxonomy = useSelect(
(select) => (select) =>
select("core").getEntityRecord( select("core").getEntityRecord(
"taxonomy", "taxonomy",
"thematiques", "thematiques",
postTaxonomies[0] postTaxonomies[0],
), ),
[postTaxonomies] [postTaxonomies],
); );
let postParentTaxonomy = useSelect( let postParentTaxonomy = useSelect(
(select) => { (select) => {
@ -75,12 +75,12 @@ export default function OptionsSelectControl({ setAttributes, relatedPostId }) {
return select("core").getEntityRecord( return select("core").getEntityRecord(
"taxonomy", "taxonomy",
"thematiques", "thematiques",
postMainTaxonomy.parent postMainTaxonomy.parent,
); );
} }
return null; return null;
}, },
[postMainTaxonomy] [postMainTaxonomy],
); );
// GET RELATED POSSIBLE PAGES ACCORDING TO CURRENT TAXONOMY // GET RELATED POSSIBLE PAGES ACCORDING TO CURRENT TAXONOMY
@ -89,8 +89,8 @@ export default function OptionsSelectControl({ setAttributes, relatedPostId }) {
let query = { let query = {
status: "publish", status: "publish",
per_page: -1, per_page: -1,
lang: lang,
thematiques: postMainTaxonomy ? postMainTaxonomy.id : null, thematiques: postMainTaxonomy ? postMainTaxonomy.id : null,
// lang: lang,
}; };
return select("core").getEntityRecords("postType", "questions", query); return select("core").getEntityRecords("postType", "questions", query);
} }
@ -134,7 +134,7 @@ export default function OptionsSelectControl({ setAttributes, relatedPostId }) {
<Tip> <Tip>
{__( {__(
"Pour modifier le contenu de la question affichée ici, rendez-vous dans la fiche question correspondante.", "Pour modifier le contenu de la question affichée ici, rendez-vous dans la fiche question correspondante.",
"homegrade-blocks" "homegrade-blocks",
)} )}
</Tip> </Tip>
)} )}