diff --git a/README.md b/README.md index 4939503..c620d84 100644 --- a/README.md +++ b/README.md @@ -32,33 +32,33 @@ - 03/09/23 - begin: 14h30 - mes: "setting up docker" - - end: 16h + - end: 16h00 - len: 1h30 - begin: 16h30 - mes: "launch worpdress" - - end: 18h + - end: 18h00 - len: 1h30 - - total: 3h + - total: 3h00 - money: 90€ - 09/09/23 - begin: 16h30 - mes: "trying to copy wp site" - end: 17h30 - - len: 1h - - total: 1h + - len: 1h00 + - total: 1h00 - money: 30€ - 10/09/23 - - begin: 10h + - begin: 10h00 - mes: "trying to fix makefile and .env volume variable" - - end: 12h - - len: 2h - - total: 2h + - end: 12h00 + - len: 2h00 + - total: 2h00 - money: 60€ - 11/09/23 - - begin: 10h + - begin: 10h00 - mes: "fixed volume variable" - end: 13h30 - len: 3h30 @@ -76,9 +76,9 @@ - 14/09/23 - begin: 11h30 - mes: "resolve env pbm with sudo" - - end: 12h + - end: 12h00 - len: 0h30 - - begin: 13h + - begin: 13h00 - mes: "env pbm with sudo resolved" - end: 13h45 - len: 0h45 @@ -93,13 +93,17 @@ - total: 2h45 - money: 82€50 -- 15/09/23 - - begin: h - - mes: "start on plugin" - - end: h - - len: h - - total: h - - money: € +- 18/09/23 + - begin: 10h00 + - mes: "rediscover plugin" + - end: 12h00 + - len: 2h00 + - begin: 13h00 + - mes: "try to get acf fields" + - end: 15h45 + - len: 2h45 + - total: 4h45 + - money: 142€50 #### total : 90 + 30 = 120€ diff --git a/srcs/plugins/map_prof/map_prof_hooks.php b/srcs/plugins/map_prof/map_prof_hooks.php index 899bccc..48cc2b3 100644 --- a/srcs/plugins/map_prof/map_prof_hooks.php +++ b/srcs/plugins/map_prof/map_prof_hooks.php @@ -53,9 +53,27 @@ function mp_ljdp_map() { mp_enqueue_scripts_and_styles(); - $events = mp_get_published_events(); - $locations = mp_sort_events($events); - $filters = mp_get_filters($events); + $events = mp_get_published_events(); // mp_get_events.php + mp_console_log("events :"); + mp_console_log($events); + foreach ($events as $event) { + mp_console_log($event); + $event_id = $event->id; + mp_console_log($event_id); + $fields = get_fields($event_id); + mp_console_log($fields); +// foreach( $fields as $name => $value ) +// mp_console_log($name . " : " . $value); + } + + $locations = mp_sort_events($events); // mp_get_locations.php + mp_console_log("locations :"); + mp_console_log($locations); + foreach ($locations as $location) + mp_console_log($location); + + $filters = mp_get_filters($events); // mp_get_filters.php + // if post event instead of map page, change coordinate and zoom mp_post_event_pages_setting(); @@ -65,7 +83,6 @@ function mp_ljdp_map() { )); return mp_create_div($filters); - } add_shortcode('lejourduprof_map', 'mp_ljdp_map'); @@ -101,7 +118,6 @@ add_shortcode('ljdp_errors_map', 'mp_errors_map'); /** * when a post is saved or published or updated, * find its coordinates - */ function post_published_coordinates($id, $post) { @@ -112,141 +128,6 @@ function post_published_coordinates($id, $post) { } add_action( 'publish_post', 'post_published_coordinates', 10, 2 ); - - - - -/** - * trying to prevent publication with message if bad country address */ -// // notice on post edit : -// // https://developer.wordpress.org/block-editor/how-to-guides/notices/ -// // https://developer.wordpress.org/block-editor/how-to-guides/javascript/loading-javascript/ -// // https://developer.wordpress.org/block-editor/reference-guides/components/notice/https://developer.wordpress.org/block-editor/reference-guides/components/notice/ -// // modals : https://developer.wordpress.org/block-editor/reference-guides/components/modal/ -// -// // https://www.wpbeginner.com/wp-tutorials/how-to-add-admin-notices-in-wordpress/ -// // https://digwp.com/2016/05/wordpress-admin-notices/ -// function my_notice() { -// //echo '
my message
-// //