MapPress Easy Google Maps - Version 2.40.6

Version Description

Download this release

Release Info

Developer chrisvrichardson
Plugin Icon 128x128 MapPress Easy Google Maps
Version 2.40.6
Comparing to
See all releases

Code changes from version 2.40.5 to 2.40.6

Files changed (3) hide show
  1. mappress.php +2 -2
  2. mappress_settings.php +18 -14
  3. readme.txt +7 -2
mappress.php CHANGED
@@ -4,7 +4,7 @@ Plugin Name: MapPress Easy Google Maps
4
  Plugin URI: http://www.wphostreviews.com/mappress
5
  Author URI: http://www.wphostreviews.com/mappress
6
  Description: MapPress makes it easy to insert Google Maps in WordPress posts and pages.
7
- Version: 2.40.5
8
  Author: Chris Richardson
9
  Thanks to all the translators and to Matthias Stasiak for his wonderful icons (http://code.google.com/p/google-maps-icons/)
10
  */
@@ -29,7 +29,7 @@ Thanks to all the translators and to Matthias Stasiak for his wonderful icons (h
29
  @include_once dirname( __FILE__ ) . '/pro/mappress_widget.php';
30
 
31
  class Mappress {
32
- const VERSION = '2.40.5';
33
 
34
  static
35
  $baseurl,
4
  Plugin URI: http://www.wphostreviews.com/mappress
5
  Author URI: http://www.wphostreviews.com/mappress
6
  Description: MapPress makes it easy to insert Google Maps in WordPress posts and pages.
7
+ Version: 2.40.6
8
  Author: Chris Richardson
9
  Thanks to all the translators and to Matthias Stasiak for his wonderful icons (http://code.google.com/p/google-maps-icons/)
10
  */
29
  @include_once dirname( __FILE__ ) . '/pro/mappress_widget.php';
30
 
31
  class Mappress {
32
+ const VERSION = '2.40.6';
33
 
34
  static
35
  $baseurl,
mappress_settings.php CHANGED
@@ -162,6 +162,7 @@ class Mappress_Settings {
162
  add_settings_field('directionsUnits', __('Directions units', 'mappress'), array(&$this, 'set_directions_units'), 'mappress', 'localization_settings');
163
 
164
  add_settings_section('misc_settings', __('Miscellaneous', 'mappress'), array(&$this, 'section_settings'), 'mappress');
 
165
  add_settings_field('adaptive', __('Adaptive display', 'mappress'), array(&$this, 'set_adaptive'), 'mappress', 'misc_settings');
166
  add_settings_field('noCSS', __('Turn off CSS', 'mappress'), array(&$this, 'set_no_css'), 'mappress', 'misc_settings');
167
  add_settings_field('onLoad', __('Load maps last', 'mappress'), array(&$this, 'set_onload'), 'mappress', 'misc_settings');
@@ -190,19 +191,6 @@ class Mappress_Settings {
190
  $size['height'] = max(200, min(2048, (int) $size['height']));
191
  }
192
 
193
- // If resize was clicked then resize ALL maps
194
- if (isset($_POST['force_resize']) && $_POST['resize_from']['width'] && $_POST['resize_from']['height']
195
- && $_POST['resize_to']['width'] && $_POST['resize_to']['height']) {
196
- $maps = Mappress_Map::get_list();
197
- foreach ($maps as $map) {
198
- if ($map->width == $_POST['resize_from']['width'] && $map->height == $_POST['resize_from']['height']) {
199
- $map->width = $_POST['resize_to']['width'];
200
- $map->height = $_POST['resize_to']['height'];
201
- $map->save($postid);
202
- }
203
- }
204
- }
205
-
206
  // If NO post types selected, set value to empty array
207
  if (!isset($input['postTypes']))
208
  $input['postTypes'] = array();
@@ -381,7 +369,6 @@ class Mappress_Settings {
381
  _e ('Enabled by default', 'mappress');
382
  }
383
 
384
-
385
  function set_tooltips() {
386
  echo self::checkbox($this->options->tooltips, 'mappress_options[tooltips]', __('Show POI titles as a "tooltip" on mouse-over', 'mappress'));
387
  }
@@ -498,6 +485,23 @@ class Mappress_Settings {
498
  echo self::checkbox($this->options->onLoad, 'mappress_options[onLoad]', __("Load maps in window 'load' event", 'mappress'));
499
  }
500
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
501
  /**
502
  * Like metabox
503
  *
162
  add_settings_field('directionsUnits', __('Directions units', 'mappress'), array(&$this, 'set_directions_units'), 'mappress', 'localization_settings');
163
 
164
  add_settings_section('misc_settings', __('Miscellaneous', 'mappress'), array(&$this, 'section_settings'), 'mappress');
165
+ add_settings_field('sizes', __('Map sizes', 'mappress'), array(&$this, 'set_sizes'), 'mappress', 'misc_settings');
166
  add_settings_field('adaptive', __('Adaptive display', 'mappress'), array(&$this, 'set_adaptive'), 'mappress', 'misc_settings');
167
  add_settings_field('noCSS', __('Turn off CSS', 'mappress'), array(&$this, 'set_no_css'), 'mappress', 'misc_settings');
168
  add_settings_field('onLoad', __('Load maps last', 'mappress'), array(&$this, 'set_onload'), 'mappress', 'misc_settings');
191
  $size['height'] = max(200, min(2048, (int) $size['height']));
192
  }
193
 
 
 
 
 
 
 
 
 
 
 
 
 
 
194
  // If NO post types selected, set value to empty array
195
  if (!isset($input['postTypes']))
196
  $input['postTypes'] = array();
369
  _e ('Enabled by default', 'mappress');
370
  }
371
 
 
372
  function set_tooltips() {
373
  echo self::checkbox($this->options->tooltips, 'mappress_options[tooltips]', __('Show POI titles as a "tooltip" on mouse-over', 'mappress'));
374
  }
485
  echo self::checkbox($this->options->onLoad, 'mappress_options[onLoad]', __("Load maps in window 'load' event", 'mappress'));
486
  }
487
 
488
+ function set_sizes() {
489
+ $headers = array(__('Default', 'mappress'), __('Width', 'mappress'), __('Height', 'mappress'));
490
+ $rows = array();
491
+
492
+ foreach($this->options->sizes as $i => $size) {
493
+ $checked = ($i == $this->options->size) ? "checked='checked'" : "";
494
+ $rows[] = array(
495
+ "<input type='radio' name='mappress_options[size]' value='$i' $checked />",
496
+ "<input type='text' size='3' name='mappress_options[sizes][$i][width]' value='{$size['width']}' />",
497
+ "<input type='text' size='3' name='mappress_options[sizes][$i][height]' value='{$size['height']}' />"
498
+ );
499
+ }
500
+ echo __('Enter sizes in px or %', 'mappress') . ": <br/>";
501
+ echo self::table($headers, $rows);
502
+ }
503
+
504
+
505
  /**
506
  * Like metabox
507
  *
readme.txt CHANGED
@@ -1,10 +1,10 @@
1
- === MapPress Easy Google Maps ===
2
  Contributors: chrisvrichardson
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=4339298
4
  Tags: google maps,google,map,maps,easy,poi,mapping,mapper,gps,lat,lon,latitude,longitude,geocoder,geocoding,georss,geo rss,geo,v3,marker,mashup,mash,api,v3,buddypress,mashup,geo,wp-geo,geo mashup,simplemap,simple,wpml
5
  Requires at least: 3.3
6
  Tested up to: 3.5
7
- Stable tag: 2.40.5
8
 
9
  MapPress is the most popular and easiest way to create great-looking Google Maps and driving directions in your blog.
10
 
@@ -95,6 +95,11 @@ See full [installation intructions and Documentation](http://www.wphostreviews.c
95
 
96
  The fulll MapPress change log available here: [Change Log](http://wphostreviews.com/mappress-changelog)
97
 
 
 
 
 
 
98
  2.40.5
99
  =
100
  * Fixed: directions not working after Nextgen workaround
1
+ === MapPress Easy Google Maps ===
2
  Contributors: chrisvrichardson
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=4339298
4
  Tags: google maps,google,map,maps,easy,poi,mapping,mapper,gps,lat,lon,latitude,longitude,geocoder,geocoding,georss,geo rss,geo,v3,marker,mashup,mash,api,v3,buddypress,mashup,geo,wp-geo,geo mashup,simplemap,simple,wpml
5
  Requires at least: 3.3
6
  Tested up to: 3.5
7
+ Stable tag: 2.40.6
8
 
9
  MapPress is the most popular and easiest way to create great-looking Google Maps and driving directions in your blog.
10
 
95
 
96
  The fulll MapPress change log available here: [Change Log](http://wphostreviews.com/mappress-changelog)
97
 
98
+ 2.40.6
99
+ =
100
+ * Fixed: warning message on settings screen
101
+ * Changed: custom map sizes are now available in all versions of the plugin
102
+
103
  2.40.5
104
  =
105
  * Fixed: directions not working after Nextgen workaround