renamed function
This commit is contained in:
parent
4f639502e3
commit
5367b39b45
|
@ -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);
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue