added link of pages for posts
This commit is contained in:
@@ -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 : "";
|
||||
|
||||
Reference in New Issue
Block a user