cleaning tests
This commit is contained in:
parent
8b6454e10b
commit
f21df9844a
|
|
@ -57,8 +57,6 @@ function build_search_artisan_posts_cards($request)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$args = array(
|
$args = array(
|
||||||
"status" => "publish",
|
"status" => "publish",
|
||||||
"post_type" => "artisans",
|
"post_type" => "artisans",
|
||||||
|
|
@ -97,10 +95,6 @@ function build_search_artisan_posts_cards($request)
|
||||||
$html_template = ob_get_clean();
|
$html_template = ob_get_clean();
|
||||||
|
|
||||||
ob_start();
|
ob_start();
|
||||||
|
|
||||||
|
|
||||||
echo __("test pour gilles", "metiers-patrimoine-theme");
|
|
||||||
|
|
||||||
get_template_part(
|
get_template_part(
|
||||||
'template-components/artisans/artisan-search-no-results',
|
'template-components/artisans/artisan-search-no-results',
|
||||||
null,
|
null,
|
||||||
|
|
@ -140,14 +134,8 @@ function debugQueryTest()
|
||||||
$newsPostsDatas = new WP_Query($args);
|
$newsPostsDatas = new WP_Query($args);
|
||||||
$filteredPosts = [];
|
$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');
|
do_action('wpml_switch_language', 'nl');
|
||||||
|
|
@ -164,32 +152,4 @@ function debugQueryTest()
|
||||||
}
|
}
|
||||||
// debugQueryTest();
|
// debugQueryTest();
|
||||||
|
|
||||||
add_action('wp_footer', '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,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user