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