Compare commits

..

2 Commits

Author SHA1 Message Date
Nonimart
9f616c2f45 FIX Lock translations inputs for non translatable datas
All checks were successful
continuous-integration/drone/push Build is passing
2025-06-17 16:16:09 +02:00
Nonimart
5eb37595fa FEATURE Passing wpml lanugage to body 2025-06-17 16:15:18 +02:00
2 changed files with 35 additions and 0 deletions

View File

@ -365,6 +365,31 @@ function add_custom_taxonomy_menu_item()
} }
add_action('admin_menu', 'add_custom_taxonomy_menu_item'); add_action('admin_menu', 'add_custom_taxonomy_menu_item');
/* ------------------------------------------------------------------------------------------
Masquer le menu "Chantiers" pour les utilisateurs non autorisés
--------------------------------------------------------------------------------------------*/
function metiers_du_patrimoine_admin_classes($classes)
{
global $pagenow;
$currentLanguage = apply_filters('wpml_current_language', null);
if ($currentLanguage === 'fr') {
$classes .= ' wpml-current-language--fr';
} else {
$classes .= ' wpml-current-language--nl';
}
if (in_array($pagenow, array('post.php', 'post-new.php'), true)) {
$classes .= ' your-class';
}
return $classes;
}
add_filter('admin_body_class', 'metiers_du_patrimoine_admin_classes');
/* ------------------------------------------------------------------------------------------ /* ------------------------------------------------------------------------------------------
Masquer le menu "Chantiers" pour les utilisateurs non autorisés Masquer le menu "Chantiers" pour les utilisateurs non autorisés
--------------------------------------------------------------------------------------------*/ --------------------------------------------------------------------------------------------*/

View File

@ -802,6 +802,16 @@ select[data-enpassusermodified='yes'] {
} }
} }
/* -----------------------------------------------------------
LOCK DATAS TRANSLATIONS ELEMENTS ON ARTISANS PAGES FOR NL
-----------------------------------------------------------*/
.wpml-current-language--nl {
#acf-group_67581cdaf3262,
.acf-field-670fc5666c4f3 {
@apply pointer-events-none cursor-not-allowed opacity-50;
}
}
/* ----------------------------------------------------------- /* -----------------------------------------------------------
Admin styles Admin styles
-----------------------------------------------------------*/ -----------------------------------------------------------*/