better file organisation and default settings
This commit is contained in:
@@ -10,17 +10,6 @@ Author URI:
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* global variables :
|
||||
*/
|
||||
|
||||
$mp_api_key = 'AIzaSyCvdGV2ssD4ov4a9CuIlQhoJyz5gWWiSvE';
|
||||
$mp_icon_url = '/wp-content/plugins/map_prof/marker.png';
|
||||
$mp_icon_size = [50, 50];
|
||||
$mp_icon_label_color = "red";
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* inclusions :
|
||||
*/
|
||||
@@ -28,6 +17,27 @@ $mp_icon_label_color = "red";
|
||||
include_once(dirname(__FILE__) . '/mp_console_log.php');
|
||||
require_once(dirname(__FILE__) . '/mp_url_api.php');
|
||||
require_once(dirname(__FILE__) . '/mp_add_to_scripts.php');
|
||||
require_once(dirname(__FILE__) . '/settings/mp_required.php');
|
||||
require_once(dirname(__FILE__) . '/settings/mp_optionnals.php');
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* global variables :
|
||||
*/
|
||||
|
||||
$mp_icon_url = '/wp-content/plugins/map_prof/images/' . $mp_icon_file;
|
||||
$mp_icon_size = [50, 50];
|
||||
if (isset($mp_icon_size_setting)) {
|
||||
if (is_array($mp_icon_size_setting)) {
|
||||
if (count($mp_icon_size_setting) === 2) {
|
||||
if ( is_numeric($mp_icon_size_setting[0]) && is_numeric($mp_icon_size_setting[1]) ) {
|
||||
$mp_icon_size = $mp_icon_size_setting;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//$mp_icon_label_color = "red";
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user