diff --git a/README.md b/README.md index d620e66..19c4369 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,7 @@ - [symlink pbm with php-fpm](https://joshtronic.com/2019/07/29/symlinks-with-nginx-and-php-fpm/) - [my post on unix stack](https://unix.stackexchange.com/questions/722503/symlink-doent-works-with-nginx-and-php-fpm-and-docker/722511#722511) - [my post on wordpress stack](https://wordpress.stackexchange.com/questions/410735/i-dont-understand-how-symlinks-in-plugin-work) +- [maps api in php](http://www.learningaboutelectronics.com/Articles/Google-maps-API-JSON-PHP.php) --- --- diff --git a/srcs/plugins/google_map/debug.php b/srcs/plugins/google_map/debug.php new file mode 100644 index 0000000..a572a1c --- /dev/null +++ b/srcs/plugins/google_map/debug.php @@ -0,0 +1,13 @@ +' . $js_code . ''; + } + echo $js_code; +} + +?> diff --git a/srcs/plugins/google_map/get_url.php b/srcs/plugins/google_map/get_url.php new file mode 100644 index 0000000..30b2128 --- /dev/null +++ b/srcs/plugins/google_map/get_url.php @@ -0,0 +1,23 @@ + diff --git a/srcs/plugins/google_map/index.php b/srcs/plugins/google_map/index.php old mode 100755 new mode 100644 index f3f9d5a..5025caf --- a/srcs/plugins/google_map/index.php +++ b/srcs/plugins/google_map/index.php @@ -1,31 +1,19 @@ -// https://www.inkthemes.com/implement-google-map-plugin-for-wodpress/ -// Error: Publishing failed. The response is not a valid JSON response. -// -> https://wordpress.org/support/topic/publishing-failed-error-message-the-response-is-not-a-valid-json-response-2/ -// - solution permalink -> broken -// - permalink broken : https://wordpress.org/support/topic/permalinks-change-breaks-all-links/ -// - solution classic editor -> ok - -// https://stackify.com/how-to-log-to-console-in-php/ -function console_log($output, $with_script_tags = true) { - $js_code = 'console.log(' . json_encode($output, JSON_HEX_TAG) . - ');'; - if ($with_script_tags) { - $js_code = ''; - } - echo $js_code; -} + -
OSM map 2
"; return $content; }; -add_action('the_content', 'print_content', 1); +//add_action('the_content', 'print_content', 1); ?>