From f21df9844a6fae0359fd3f45bcb34a444b30bb6e Mon Sep 17 00:00:00 2001 From: Antoine M Date: Thu, 5 Dec 2024 15:51:08 +0100 Subject: [PATCH] cleaning tests --- includes/api.php | 42 +----------------------------------------- 1 file changed, 1 insertion(+), 41 deletions(-) diff --git a/includes/api.php b/includes/api.php index f4c15d9..6f33c0e 100644 --- a/includes/api.php +++ b/includes/api.php @@ -57,8 +57,6 @@ function build_search_artisan_posts_cards($request) ); } - - $args = array( "status" => "publish", "post_type" => "artisans", @@ -97,10 +95,6 @@ function build_search_artisan_posts_cards($request) $html_template = ob_get_clean(); ob_start(); - - - echo __("test pour gilles", "metiers-patrimoine-theme"); - get_template_part( 'template-components/artisans/artisan-search-no-results', null, @@ -140,14 +134,8 @@ function debugQueryTest() $newsPostsDatas = new WP_Query($args); $filteredPosts = []; - foreach ($newsPostsDatas as $post => $value) { - // $persons = get_field('company_members', $value->ID); - // write_log($persons); - } - // write_log($newsPostsDatas->posts); - do_action('wpml_switch_language', 'nl'); @@ -164,32 +152,4 @@ function debugQueryTest() } // debugQueryTest(); -add_action('wp_footer', 'debugQueryTest'); - - - - - -add_action('rest_api_init', function () { - register_rest_route('metiers-patrimoine-datas/v1/build', '/test', array( - 'methods' => 'GET', - 'callback' => 'handle_rest_callback_metiers', - )); -}); - -function handle_rest_callback_metiers() -{ - do_action('wpml_switch_language', 'nl'); - - ob_start(); - get_template_part( - 'template-components/artisans/artisan-search-no-results', - null, - [] - ); - $html_template = ob_get_clean(); - - return array( - 'html_template' => $html_template, - ); -} +// add_action('wp_footer', 'debugQueryTest');