added link of pages for posts

This commit is contained in:
lenovo
2022-11-13 18:07:59 +01:00
parent 6e67fb8c05
commit ada87da370
6 changed files with 30 additions and 43 deletions

View File

@@ -76,24 +76,6 @@
to_ping: ""
*/
// FUNCTION TO RETRIEVE FORMS FIELDS
// not used anymore
//
//function mp_get_form_fields() {
// $get_form_args = array(
// 'numberposts' => -1,
// 'post_status' => 'publish',
// 'post_type' => 'acf-field',
// );
// $forms = get_posts($get_form_args);
// $fields = [];
// foreach ($forms as $form) {
// $field = $form->post_excerpt;
// array_push($fields, $field);
// }
// return $fields;
//}
function mp_get_published_posts() {
// FOR TESTS
@@ -117,7 +99,6 @@ function mp_get_published_posts() {
$get_posts_args = array(
'numberposts' => -1,
'post_status' => 'publish',
//'post_status' => 'draft',
'post_type' => 'post',
);
$posts_published = get_posts($get_posts_args);
@@ -162,6 +143,9 @@ function mp_fill_fields_value($id) {
if ($presentiel[0] === "En présentiel")
$event->irl = true;
// add post url
$event->url = get_post_permalink($id);
return $event;
}
@@ -193,6 +177,7 @@ function mp_get_published_events() {
- id : x;
- index : x (default null);
- title : "";
- url : "";
- location : {}
- street : "";
- city : "";