wip bad address are ignored

This commit is contained in:
lenovo
2022-11-09 12:47:29 +01:00
parent d326b6f51e
commit 163eaa2f04
6 changed files with 92 additions and 74 deletions

View File

@@ -107,13 +107,11 @@ function mp_get_published_posts() {
// );
// $post_list = get_posts($post_args);
// foreach ($post_list as $post) {
// //if ( get_field("nom", $post->ID) == "Rakhimov") {
// wp_update_post(array(
// 'ID' => $post->ID,
// //'post_status' => 'draft',
// 'post_status' => 'publish',
// ));
// //};
// wp_update_post(array(
// 'ID' => $post->ID,
// //'post_status' => 'draft',
// 'post_status' => 'publish',
// ));
// };
$get_posts_args = array(
@@ -173,12 +171,6 @@ function mp_get_published_events(&$pays) {
$event = mp_fill_fields_value($post->ID, $pays);
$event->id = $post->ID;
$event->title = $post->post_title;
// TEMP
if (strlen($event->pays) == 0) {
mp_console_log("pays nulle:");
mp_console_log($event);
}
//
array_push($events, $event);
}
mp_console_log("nombre de posts: " . count($events));