updating with new condition to avoid mistakes in single news editor
This commit is contained in:
parent
066bbadc0a
commit
c4bcfc3c79
|
|
@ -263,9 +263,9 @@ function wpdocs_admin_classes($classes)
|
||||||
$thematique = get_the_terms(get_the_ID(), 'thematiques')[0] ?? null;
|
$thematique = get_the_terms(get_the_ID(), 'thematiques')[0] ?? null;
|
||||||
$thematiqueParent = getParentThematique($thematique);
|
$thematiqueParent = getParentThematique($thematique);
|
||||||
$thematiqueColorSlug = getThematiqueFamilySlug($thematiqueParent->slug) ?? null;
|
$thematiqueColorSlug = getThematiqueFamilySlug($thematiqueParent->slug) ?? null;
|
||||||
|
$postType = get_post_type($post->ID);
|
||||||
|
|
||||||
|
if (in_array($pagenow, array('post.php', 'post-new.php'), true) && $thematiqueColorSlug && ($postType == 'conseils' || $postType == 'questions')) {
|
||||||
if (in_array($pagenow, array('post.php', 'post-new.php'), true) && $thematiqueColorSlug) {
|
|
||||||
$classes .= ' ' . $thematiqueParent->slug;
|
$classes .= ' ' . $thematiqueParent->slug;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user