renamed function

This commit is contained in:
bastianonm 2018-03-13 08:23:40 +00:00
parent 4f639502e3
commit 5367b39b45
3 changed files with 7 additions and 7 deletions

View File

@ -143,7 +143,7 @@ function handle_WP_GPX_Maps_folder_Shortcodes($attr, $content='') {
$uom = wpgpxmaps_findValue($attr, "uom", "wpgpxmaps_unit_of_measure", "0"); $uom = wpgpxmaps_findValue($attr, "uom", "wpgpxmaps_unit_of_measure", "0");
// fix folder path // fix folder path
$sitePath = sitePath(); $sitePath = wp_gpx_maps_sitePath();
$folder = trim($folder); $folder = trim($folder);
$folder = str_replace(array('/', '\\'), DIRECTORY_SEPARATOR, $folder); $folder = str_replace(array('/', '\\'), DIRECTORY_SEPARATOR, $folder);
$folder = $sitePath . $folder; $folder = $sitePath . $folder;
@ -282,7 +282,7 @@ function handle_WP_GPX_Maps_Shortcodes($attr, $content='')
$gpxurl = $gpx; $gpxurl = $gpx;
// Add file modification time to cache filename to catch new uploads with same file name // 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)) { if(file_exists($mtime)) {
$mtime = filemtime($mtime); $mtime = filemtime($mtime);
} else { } else {
@ -355,7 +355,7 @@ function handle_WP_GPX_Maps_Shortcodes($attr, $content='')
if ((!isset($points_maps) || $points_maps == '') && $gpx != '') { if ((!isset($points_maps) || $points_maps == '') && $gpx != '') {
//if (true) { //if (true) {
$sitePath = sitePath(); $sitePath = wp_gpx_maps_sitePath();
$gpx = trim($gpx); $gpx = trim($gpx);

View File

@ -62,7 +62,7 @@
return $result; return $result;
} }
function sitePath() function wp_gpx_maps_sitePath()
{ {
return substr(get_home_path(), 0, -1); return substr(get_home_path(), 0, -1);
} }
@ -95,7 +95,7 @@
function relativeGpxFolderPath() function relativeGpxFolderPath()
{ {
$sitePath = sitePath(); $sitePath = wp_gpx_maps_sitePath();
$realGpxPath = gpxFolderPath(); $realGpxPath = gpxFolderPath();
$ret = str_replace($sitePath,'',$realGpxPath).DIRECTORY_SEPARATOR; $ret = str_replace($sitePath,'',$realGpxPath).DIRECTORY_SEPARATOR;
return str_replace(array('/', '\\'), DIRECTORY_SEPARATOR, $ret); return str_replace(array('/', '\\'), DIRECTORY_SEPARATOR, $ret);

View File

@ -2,14 +2,14 @@
function wpgpxmaps_isNGGalleryActive() { function wpgpxmaps_isNGGalleryActive() {
if (!function_exists('is_plugin_active')) { 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"); return is_plugin_active("nextgen-gallery/nggallery.php");
} }
function wpgpxmaps_isNGGalleryProActive() { function wpgpxmaps_isNGGalleryProActive() {
if (!function_exists('is_plugin_active')) { 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"); return is_plugin_active("nextgen-gallery-pro/nggallery-pro.php");
} }