added shortcode for posts update

This commit is contained in:
lenovo
2022-11-14 10:49:39 +01:00
parent dfd3dc607d
commit 49daf21ae6
8 changed files with 72 additions and 37 deletions

View File

@@ -78,24 +78,6 @@
function mp_get_published_posts() {
// FOR TESTS
// script to publish or unpublish posts
//
// $post_args = array(
// 'numberposts' => -1,
// 'post_status' => 'draft',
// //'post_status' => 'publish',
// 'post_type' => 'post',
// );
// $post_list = get_posts($post_args);
// foreach ($post_list as $post) {
// wp_update_post(array(
// 'ID' => $post->ID,
// //'post_status' => 'draft',
// 'post_status' => 'publish',
// ));
// };
$get_posts_args = array(
'numberposts' => -1,
'post_status' => 'publish',
@@ -127,6 +109,7 @@ function mp_fill_fields_value($id) {
"adresse",
"prenom",
"nom",
"test",
"location",
);
$event = (object)[];