REFACTOR Deleting duplicate code for parse query
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Nonimart 2025-06-18 10:31:22 +02:00
parent 3334906e1b
commit 44ed1be6d3

View File

@ -327,23 +327,6 @@ function mytheme_filter_posts_declare_dropdowns()
add_action('restrict_manage_posts', 'mytheme_filter_posts_declare_dropdowns');
function filter_posts_by_custom_datas($query)
{
// [.. Vericications de base]
if (!empty($_GET['mdpstatus'])) {
$query->set('meta_query', [
[
'key' => 'mdp_status',
'value' => sanitize_text_field($_GET['mdpstatus']),
'compare' => '='
]
]);
}
}
add_action('pre_get_posts', 'filter_posts_by_custom_datas');
// **** FILTRAGE DES POSTS QUAND LA QUERY DE FILTER EST ENVOYEE
function metiers_patrimoine_filter_post_by_metiers_query($query)