clean up files to put get_events in main file instead of add_to_scripts
This commit is contained in:
@@ -125,7 +125,7 @@ function mp_get_published_posts() {
|
||||
return $posts_published;
|
||||
}
|
||||
|
||||
function mp_fill_fields_value($id, &$pays) {
|
||||
function mp_fill_fields_value($id) {
|
||||
|
||||
/*
|
||||
* get_field is an ACF function
|
||||
@@ -164,11 +164,11 @@ function mp_fill_fields_value($id, &$pays) {
|
||||
return $event;
|
||||
}
|
||||
|
||||
function mp_get_published_events(&$pays) {
|
||||
function mp_get_published_events() {
|
||||
$posts_list = mp_get_published_posts();
|
||||
$events = [];
|
||||
foreach ($posts_list as $post) {
|
||||
$event = mp_fill_fields_value($post->ID, $pays);
|
||||
$event = mp_fill_fields_value($post->ID);
|
||||
$event->id = $post->ID;
|
||||
$event->title = $post->post_title;
|
||||
array_push($events, $event);
|
||||
|
||||
Reference in New Issue
Block a user