removing lang from relatedPossiblePages query arguments
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Antoine M 2024-12-17 11:36:12 +01:00
parent 37bc3946c3
commit e6c233376e
4 changed files with 11 additions and 10 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' => '4bc6322a2964838c7d14');
<?php return array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n'), 'version' => '510e7794936cc8444189');

View File

@ -101,9 +101,10 @@ 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>
)}