From 5367b39b45f1f2ef62450a64ca323cfc99418be4 Mon Sep 17 00:00:00 2001 From: bastianonm Date: Tue, 13 Mar 2018 08:23:40 +0000 Subject: [PATCH] renamed function --- wp-gpx-maps.php | 6 +++--- wp-gpx-maps_utils.php | 4 ++-- wp-gpx-maps_utils_nggallery.php | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/wp-gpx-maps.php b/wp-gpx-maps.php index 4f98aaa..a6539b6 100644 --- a/wp-gpx-maps.php +++ b/wp-gpx-maps.php @@ -143,7 +143,7 @@ function handle_WP_GPX_Maps_folder_Shortcodes($attr, $content='') { $uom = wpgpxmaps_findValue($attr, "uom", "wpgpxmaps_unit_of_measure", "0"); // fix folder path - $sitePath = sitePath(); + $sitePath = wp_gpx_maps_sitePath(); $folder = trim($folder); $folder = str_replace(array('/', '\\'), DIRECTORY_SEPARATOR, $folder); $folder = $sitePath . $folder; @@ -282,7 +282,7 @@ function handle_WP_GPX_Maps_Shortcodes($attr, $content='') $gpxurl = $gpx; // Add file modification time to cache filename to catch new uploads with same file name - $mtime = sitePath() . str_replace(array('/', '\\'), DIRECTORY_SEPARATOR, trim($gpx)); + $mtime = wp_gpx_maps_sitePath() . str_replace(array('/', '\\'), DIRECTORY_SEPARATOR, trim($gpx)); if(file_exists($mtime)) { $mtime = filemtime($mtime); } else { @@ -355,7 +355,7 @@ function handle_WP_GPX_Maps_Shortcodes($attr, $content='') if ((!isset($points_maps) || $points_maps == '') && $gpx != '') { //if (true) { - $sitePath = sitePath(); + $sitePath = wp_gpx_maps_sitePath(); $gpx = trim($gpx); diff --git a/wp-gpx-maps_utils.php b/wp-gpx-maps_utils.php index f4f658a..86b98a0 100644 --- a/wp-gpx-maps_utils.php +++ b/wp-gpx-maps_utils.php @@ -62,7 +62,7 @@ return $result; } - function sitePath() + function wp_gpx_maps_sitePath() { return substr(get_home_path(), 0, -1); } @@ -95,7 +95,7 @@ function relativeGpxFolderPath() { - $sitePath = sitePath(); + $sitePath = wp_gpx_maps_sitePath(); $realGpxPath = gpxFolderPath(); $ret = str_replace($sitePath,'',$realGpxPath).DIRECTORY_SEPARATOR; return str_replace(array('/', '\\'), DIRECTORY_SEPARATOR, $ret); diff --git a/wp-gpx-maps_utils_nggallery.php b/wp-gpx-maps_utils_nggallery.php index 22b2201..2113364 100644 --- a/wp-gpx-maps_utils_nggallery.php +++ b/wp-gpx-maps_utils_nggallery.php @@ -2,14 +2,14 @@ function wpgpxmaps_isNGGalleryActive() { if (!function_exists('is_plugin_active')) { - require_once(sitePath() . '/wp-admin/includes/plugin.php'); + require_once(wp_gpx_maps_sitePath() . '/wp-admin/includes/plugin.php'); } return is_plugin_active("nextgen-gallery/nggallery.php"); } function wpgpxmaps_isNGGalleryProActive() { if (!function_exists('is_plugin_active')) { - require_once(sitePath() . '/wp-admin/includes/plugin.php'); + require_once(wp_gpx_maps_sitePath() . '/wp-admin/includes/plugin.php'); } return is_plugin_active("nextgen-gallery-pro/nggallery-pro.php"); }