diff --git a/README.md b/README.md new file mode 100644 index 0000000..b18132d --- /dev/null +++ b/README.md @@ -0,0 +1,10 @@ +# Wordpress Plugin - Soundmap + +Es una versión revisada del viejo plugin de Soinumapa desarrollado por Xavier Balderas. + +## Configuración + +* Descarga el plugin en la carpeta **wp-content/plugins** +* Activa el plugin en la sección **Plugins** de tu instancia de Wordpress +* Configura el area del mapa visualizada en **Ajustes > SoundMap** +* Crear los puntos necesarios en la sección **Markers** diff --git a/css/soundmap.add.css b/css/soundmap.add.css index 5cf6518..018b684 100644 --- a/css/soundmap.add.css +++ b/css/soundmap.add.css @@ -1,6 +1,7 @@ #map_canvas { - height: 400px; + min-height: 400px; width: 100%; + background:#ccc; } #soundmap-attachments-list { margin-top: 10px; diff --git a/soundmap.php b/soundmap.php index 37fe978..118689a 100644 --- a/soundmap.php +++ b/soundmap.php @@ -135,7 +135,8 @@ if (!class_exists('Soundmap')){ echo ''; echo ''; echo ''; - echo ''; + echo ''; + echo ''; } function load_options(){ @@ -167,18 +168,8 @@ if (!class_exists('Soundmap')){ }// admin_menu function enqueue_map_scripts(){ - /* Register the basic scripts needed for presenting the maps. - - Google Maps - - LeafletJS - - Leaflet Google Plugin - - LeafletCSS - */ - //wp_enqueue_script( 'google-maps', 'http://maps.google.com/maps/api/js?v=3.7&sensor=false' ); // Google Maps - //wp_enqueue_script('mapboxjs','https://api.mapbox.com/mapbox.js/v2.2.4/mapbox.js',array(),'2.2.4',TRUE); // add Leaflet.js - wp_enqueue_script('leafletjs','https://unpkg.com/leaflet@1.3.4/dist/leaflet.js',array(),'1.3.4',TRUE); // add Leaflet.js - //wp_enqueue_style('mapboxcss','https://api.mapbox.com/mapbox.js/v2.2.4/mapbox.css',array(),'2.2.4','all'); // add CSS Leaflet - wp_enqueue_style('leafletcss',"https://unpkg.com/leaflet@1.3.4/dist/leaflet.css",array(),'1.3.4','all'); // add CSS Leaflet - //wp_enqueue_script('leaflet-plugin-google', plugins_url('js/leaflet/plugins/Google.js', __FILE__), array('leafletjs', 'google-maps'), '0.7.2', TRUE); + wp_enqueue_script('leafletjs','https://unpkg.com/leaflet@1.6.0/dist/leaflet.js',array(),'1.6.0',TRUE); // add Leaflet.js + wp_enqueue_style('leafletcss',"https://unpkg.com/leaflet@1.6.0/dist/leaflet.css",array(),'1.6.0','all'); // add CSS Leaflet } function wp_enqueue_scripts(){ @@ -205,8 +196,9 @@ if (!class_exists('Soundmap')){ if (($hook == 'post-new.php' || $hook == 'post.php') && $current_screen->post_type == "marker"){ $this->enqueue_map_scripts(); - wp_enqueue_script('soundmap-add', plugins_url('js/soundmap.add.js', __FILE__), array(), '0.1', TRUE); + wp_enqueue_script('underscore'); wp_enqueue_style('soundmap-add-css', plugins_url('css/soundmap.add.css', __FILE__), array(), '0.1', 'all'); + wp_enqueue_script('soundmap-add', plugins_url('js/soundmap.add.js', __FILE__), array(), '0.1', TRUE); $params = array(); $params['origin'] = $this->config['origin'];