Snazzy Maps - Version 1.1.1

Version Description

Release Date: July 21st, 2015

  • Bug Fix: Renamed the Services_JSON class to fix a redeclare class error when working with other plugins.
Download this release

Release Info

Developer atmistinc
Plugin Icon 128x128 Snazzy Maps
Version 1.1.1
Comparing to
See all releases

Code changes from version 1.1.0 to 1.1.1

additional_php/{Services_JSON.php → SnazzyMaps_Services_JSON.php} RENAMED
@@ -46,7 +46,7 @@
46
  * DAMAGE.
47
  *
48
  * @category
49
- * @package Services_JSON
50
  * @author Michal Migurski <mike-json@teczno.com>
51
  * @author Matt Knapp <mdknapp[at]gmail[dot]com>
52
  * @author Brett Stimmerman <brettstimmerman[at]gmail[dot]com>
@@ -57,39 +57,39 @@
57
  */
58
 
59
  /**
60
- * Marker constant for Services_JSON::decode(), used to flag stack state
61
  */
62
- define('SERVICES_JSON_SLICE', 1);
63
 
64
  /**
65
- * Marker constant for Services_JSON::decode(), used to flag stack state
66
  */
67
- define('SERVICES_JSON_IN_STR', 2);
68
 
69
  /**
70
- * Marker constant for Services_JSON::decode(), used to flag stack state
71
  */
72
- define('SERVICES_JSON_IN_ARR', 3);
73
 
74
  /**
75
- * Marker constant for Services_JSON::decode(), used to flag stack state
76
  */
77
- define('SERVICES_JSON_IN_OBJ', 4);
78
 
79
  /**
80
- * Marker constant for Services_JSON::decode(), used to flag stack state
81
  */
82
- define('SERVICES_JSON_IN_CMT', 5);
83
 
84
  /**
85
- * Behavior switch for Services_JSON::decode()
86
  */
87
- define('SERVICES_JSON_LOOSE_TYPE', 16);
88
 
89
  /**
90
- * Behavior switch for Services_JSON::decode()
91
  */
92
- define('SERVICES_JSON_SUPPRESS_ERRORS', 32);
93
 
94
  /**
95
  * Converts to and from JSON format.
@@ -97,8 +97,8 @@ define('SERVICES_JSON_SUPPRESS_ERRORS', 32);
97
  * Brief example of use:
98
  *
99
  * <code>
100
- * // create a new instance of Services_JSON
101
- * $json = new Services_JSON();
102
  *
103
  * // convert a complexe value to JSON notation, and send it to the browser
104
  * $value = array('foo', 'bar', array(1, 2, 'baz'), array(3, array(4)));
@@ -112,7 +112,7 @@ define('SERVICES_JSON_SUPPRESS_ERRORS', 32);
112
  * $value = $json->decode($input);
113
  * </code>
114
  */
115
- class Services_JSON
116
  {
117
  /**
118
  * constructs a new JSON instance
@@ -120,17 +120,17 @@ class Services_JSON
120
  * @param int $use object behavior flags; combine with boolean-OR
121
  *
122
  * possible values:
123
- * - SERVICES_JSON_LOOSE_TYPE: loose typing.
124
  * "{...}" syntax creates associative arrays
125
  * instead of objects in decode().
126
- * - SERVICES_JSON_SUPPRESS_ERRORS: error suppression.
127
  * Values which can't be encoded (e.g. resources)
128
  * appear as NULL instead of throwing errors.
129
  * By default, a deeply-nested resource will
130
  * bubble up with an error, so all return values
131
  * from encode() should be checked with isError()
132
  */
133
- function Services_JSON($use = 0)
134
  {
135
  $this->use = $use;
136
  }
@@ -227,7 +227,7 @@ class Services_JSON
227
  * encodes an arbitrary variable into JSON format
228
  *
229
  * @param mixed $var any number, boolean, string, array, or object to be encoded.
230
- * see argument 1 to Services_JSON() above for array-parsing behavior.
231
  * if var is a strng, note that encode() always expects it
232
  * to be in ASCII or UTF-8 format!
233
  *
@@ -381,7 +381,7 @@ class Services_JSON
381
  array_values($var));
382
 
383
  foreach((array)$properties as $property) {
384
- if(Services_JSON::isError($property)) {
385
  return $property;
386
  }
387
  }
@@ -393,7 +393,7 @@ class Services_JSON
393
  $elements = array_map(array($this, 'encode'), $var);
394
 
395
  foreach((array)$elements as $element) {
396
- if(Services_JSON::isError($element)) {
397
  return $element;
398
  }
399
  }
@@ -408,7 +408,7 @@ class Services_JSON
408
  array_values($vars));
409
 
410
  foreach((array)$properties as $property) {
411
- if(Services_JSON::isError($property)) {
412
  return $property;
413
  }
414
  }
@@ -416,9 +416,9 @@ class Services_JSON
416
  return '{' . join(',', $properties) . '}';
417
 
418
  default:
419
- return ($this->use & SERVICES_JSON_SUPPRESS_ERRORS)
420
  ? 'null'
421
- : new Services_JSON_Error(gettype($var)." can not be encoded as JSON string");
422
  }
423
  }
424
 
@@ -435,7 +435,7 @@ class Services_JSON
435
  {
436
  $encoded_value = $this->encode($value);
437
 
438
- if(Services_JSON::isError($encoded_value)) {
439
  return $encoded_value;
440
  }
441
 
@@ -476,7 +476,7 @@ class Services_JSON
476
  *
477
  * @return mixed number, boolean, string, array, or object
478
  * corresponding to given JSON input string.
479
- * See argument 1 to Services_JSON() above for object-output behavior.
480
  * Note that decode() always returns strings
481
  * in ASCII or UTF-8 format!
482
  * @access public
@@ -611,19 +611,19 @@ class Services_JSON
611
  // array, or object notation
612
 
613
  if ($str{0} == '[') {
614
- $stk = array(SERVICES_JSON_IN_ARR);
615
  $arr = array();
616
  } else {
617
- if ($this->use & SERVICES_JSON_LOOSE_TYPE) {
618
- $stk = array(SERVICES_JSON_IN_OBJ);
619
  $obj = array();
620
  } else {
621
- $stk = array(SERVICES_JSON_IN_OBJ);
622
  $obj = new stdClass();
623
  }
624
  }
625
 
626
- array_push($stk, array('what' => SERVICES_JSON_SLICE,
627
  'where' => 0,
628
  'delim' => false));
629
 
@@ -631,7 +631,7 @@ class Services_JSON
631
  $chrs = $this->reduce_string($chrs);
632
 
633
  if ($chrs == '') {
634
- if (reset($stk) == SERVICES_JSON_IN_ARR) {
635
  return $arr;
636
 
637
  } else {
@@ -649,18 +649,18 @@ class Services_JSON
649
  $top = end($stk);
650
  $substr_chrs_c_2 = substr($chrs, $c, 2);
651
 
652
- if (($c == $strlen_chrs) || (($chrs{$c} == ',') && ($top['what'] == SERVICES_JSON_SLICE))) {
653
  // found a comma that is not inside a string, array, etc.,
654
  // OR we've reached the end of the character list
655
  $slice = substr($chrs, $top['where'], ($c - $top['where']));
656
- array_push($stk, array('what' => SERVICES_JSON_SLICE, 'where' => ($c + 1), 'delim' => false));
657
  //print("Found split at {$c}: ".substr($chrs, $top['where'], (1 + $c - $top['where']))."\n");
658
 
659
- if (reset($stk) == SERVICES_JSON_IN_ARR) {
660
  // we are in an array, so just push an element onto the stack
661
  array_push($arr, $this->decode($slice));
662
 
663
- } elseif (reset($stk) == SERVICES_JSON_IN_OBJ) {
664
  // we are in an object, so figure
665
  // out the property name and set an
666
  // element in an associative array,
@@ -672,7 +672,7 @@ class Services_JSON
672
  $key = $this->decode($parts[1]);
673
  $val = $this->decode($parts[2]);
674
 
675
- if ($this->use & SERVICES_JSON_LOOSE_TYPE) {
676
  $obj[$key] = $val;
677
  } else {
678
  $obj->$key = $val;
@@ -682,7 +682,7 @@ class Services_JSON
682
  $key = $parts[1];
683
  $val = $this->decode($parts[2]);
684
 
685
- if ($this->use & SERVICES_JSON_LOOSE_TYPE) {
686
  $obj[$key] = $val;
687
  } else {
688
  $obj->$key = $val;
@@ -691,13 +691,13 @@ class Services_JSON
691
 
692
  }
693
 
694
- } elseif ((($chrs{$c} == '"') || ($chrs{$c} == "'")) && ($top['what'] != SERVICES_JSON_IN_STR)) {
695
  // found a quote, and we are not inside a string
696
- array_push($stk, array('what' => SERVICES_JSON_IN_STR, 'where' => $c, 'delim' => $chrs{$c}));
697
  //print("Found start of string at {$c}\n");
698
 
699
  } elseif (($chrs{$c} == $top['delim']) &&
700
- ($top['what'] == SERVICES_JSON_IN_STR) &&
701
  ((strlen(substr($chrs, 0, $c)) - strlen(rtrim(substr($chrs, 0, $c), '\\'))) % 2 != 1)) {
702
  // found a quote, we're in a string, and it's not escaped
703
  // we know that it's not escaped becase there is _not_ an
@@ -706,35 +706,35 @@ class Services_JSON
706
  //print("Found end of string at {$c}: ".substr($chrs, $top['where'], (1 + 1 + $c - $top['where']))."\n");
707
 
708
  } elseif (($chrs{$c} == '[') &&
709
- in_array($top['what'], array(SERVICES_JSON_SLICE, SERVICES_JSON_IN_ARR, SERVICES_JSON_IN_OBJ))) {
710
  // found a left-bracket, and we are in an array, object, or slice
711
- array_push($stk, array('what' => SERVICES_JSON_IN_ARR, 'where' => $c, 'delim' => false));
712
  //print("Found start of array at {$c}\n");
713
 
714
- } elseif (($chrs{$c} == ']') && ($top['what'] == SERVICES_JSON_IN_ARR)) {
715
  // found a right-bracket, and we're in an array
716
  array_pop($stk);
717
  //print("Found end of array at {$c}: ".substr($chrs, $top['where'], (1 + $c - $top['where']))."\n");
718
 
719
  } elseif (($chrs{$c} == '{') &&
720
- in_array($top['what'], array(SERVICES_JSON_SLICE, SERVICES_JSON_IN_ARR, SERVICES_JSON_IN_OBJ))) {
721
  // found a left-brace, and we are in an array, object, or slice
722
- array_push($stk, array('what' => SERVICES_JSON_IN_OBJ, 'where' => $c, 'delim' => false));
723
  //print("Found start of object at {$c}\n");
724
 
725
- } elseif (($chrs{$c} == '}') && ($top['what'] == SERVICES_JSON_IN_OBJ)) {
726
  // found a right-brace, and we're in an object
727
  array_pop($stk);
728
  //print("Found end of object at {$c}: ".substr($chrs, $top['where'], (1 + $c - $top['where']))."\n");
729
 
730
  } elseif (($substr_chrs_c_2 == '/*') &&
731
- in_array($top['what'], array(SERVICES_JSON_SLICE, SERVICES_JSON_IN_ARR, SERVICES_JSON_IN_OBJ))) {
732
  // found a comment start, and we are in an array, object, or slice
733
- array_push($stk, array('what' => SERVICES_JSON_IN_CMT, 'where' => $c, 'delim' => false));
734
  $c++;
735
  //print("Found start of comment at {$c}\n");
736
 
737
- } elseif (($substr_chrs_c_2 == '*/') && ($top['what'] == SERVICES_JSON_IN_CMT)) {
738
  // found a comment end, and we're in one now
739
  array_pop($stk);
740
  $c++;
@@ -748,10 +748,10 @@ class Services_JSON
748
 
749
  }
750
 
751
- if (reset($stk) == SERVICES_JSON_IN_ARR) {
752
  return $arr;
753
 
754
- } elseif (reset($stk) == SERVICES_JSON_IN_OBJ) {
755
  return $obj;
756
 
757
  }
@@ -767,8 +767,8 @@ class Services_JSON
767
  {
768
  if (class_exists('pear')) {
769
  return PEAR::isError($data, $code);
770
- } elseif (is_object($data) && (get_class($data) == 'services_json_error' ||
771
- is_subclass_of($data, 'services_json_error'))) {
772
  return true;
773
  }
774
 
@@ -778,9 +778,9 @@ class Services_JSON
778
 
779
  if (class_exists('PEAR_Error')) {
780
 
781
- class Services_JSON_Error extends PEAR_Error
782
  {
783
- function Services_JSON_Error($message = 'unknown error', $code = null,
784
  $mode = null, $options = null, $userinfo = null)
785
  {
786
  parent::PEAR_Error($message, $code, $mode, $options, $userinfo);
@@ -792,9 +792,9 @@ if (class_exists('PEAR_Error')) {
792
  /**
793
  * @todo Ultimately, this class shall be descended from PEAR_Error
794
  */
795
- class Services_JSON_Error
796
  {
797
- function Services_JSON_Error($message = 'unknown error', $code = null,
798
  $mode = null, $options = null, $userinfo = null)
799
  {
800
 
46
  * DAMAGE.
47
  *
48
  * @category
49
+ * @package SnazzyMaps_Services_JSON
50
  * @author Michal Migurski <mike-json@teczno.com>
51
  * @author Matt Knapp <mdknapp[at]gmail[dot]com>
52
  * @author Brett Stimmerman <brettstimmerman[at]gmail[dot]com>
57
  */
58
 
59
  /**
60
+ * Marker constant for SnazzyMaps_Services_JSON::decode(), used to flag stack state
61
  */
62
+ define('SnazzyMaps_Services_JSON_SLICE', 1);
63
 
64
  /**
65
+ * Marker constant for SnazzyMaps_Services_JSON::decode(), used to flag stack state
66
  */
67
+ define('SnazzyMaps_Services_JSON_IN_STR', 2);
68
 
69
  /**
70
+ * Marker constant for SnazzyMaps_Services_JSON::decode(), used to flag stack state
71
  */
72
+ define('SnazzyMaps_Services_JSON_IN_ARR', 3);
73
 
74
  /**
75
+ * Marker constant for SnazzyMaps_Services_JSON::decode(), used to flag stack state
76
  */
77
+ define('SnazzyMaps_Services_JSON_IN_OBJ', 4);
78
 
79
  /**
80
+ * Marker constant for SnazzyMaps_Services_JSON::decode(), used to flag stack state
81
  */
82
+ define('SnazzyMaps_Services_JSON_IN_CMT', 5);
83
 
84
  /**
85
+ * Behavior switch for SnazzyMaps_Services_JSON::decode()
86
  */
87
+ define('SnazzyMaps_Services_JSON_LOOSE_TYPE', 16);
88
 
89
  /**
90
+ * Behavior switch for SnazzyMaps_Services_JSON::decode()
91
  */
92
+ define('SnazzyMaps_Services_JSON_SUPPRESS_ERRORS', 32);
93
 
94
  /**
95
  * Converts to and from JSON format.
97
  * Brief example of use:
98
  *
99
  * <code>
100
+ * // create a new instance of SnazzyMaps_Services_JSON
101
+ * $json = new SnazzyMaps_Services_JSON();
102
  *
103
  * // convert a complexe value to JSON notation, and send it to the browser
104
  * $value = array('foo', 'bar', array(1, 2, 'baz'), array(3, array(4)));
112
  * $value = $json->decode($input);
113
  * </code>
114
  */
115
+ class SnazzyMaps_Services_JSON
116
  {
117
  /**
118
  * constructs a new JSON instance
120
  * @param int $use object behavior flags; combine with boolean-OR
121
  *
122
  * possible values:
123
+ * - SnazzyMaps_Services_JSON_LOOSE_TYPE: loose typing.
124
  * "{...}" syntax creates associative arrays
125
  * instead of objects in decode().
126
+ * - SnazzyMaps_Services_JSON_SUPPRESS_ERRORS: error suppression.
127
  * Values which can't be encoded (e.g. resources)
128
  * appear as NULL instead of throwing errors.
129
  * By default, a deeply-nested resource will
130
  * bubble up with an error, so all return values
131
  * from encode() should be checked with isError()
132
  */
133
+ function SnazzyMaps_Services_JSON($use = 0)
134
  {
135
  $this->use = $use;
136
  }
227
  * encodes an arbitrary variable into JSON format
228
  *
229
  * @param mixed $var any number, boolean, string, array, or object to be encoded.
230
+ * see argument 1 to SnazzyMaps_Services_JSON() above for array-parsing behavior.
231
  * if var is a strng, note that encode() always expects it
232
  * to be in ASCII or UTF-8 format!
233
  *
381
  array_values($var));
382
 
383
  foreach((array)$properties as $property) {
384
+ if(SnazzyMaps_Services_JSON::isError($property)) {
385
  return $property;
386
  }
387
  }
393
  $elements = array_map(array($this, 'encode'), $var);
394
 
395
  foreach((array)$elements as $element) {
396
+ if(SnazzyMaps_Services_JSON::isError($element)) {
397
  return $element;
398
  }
399
  }
408
  array_values($vars));
409
 
410
  foreach((array)$properties as $property) {
411
+ if(SnazzyMaps_Services_JSON::isError($property)) {
412
  return $property;
413
  }
414
  }
416
  return '{' . join(',', $properties) . '}';
417
 
418
  default:
419
+ return ($this->use & SnazzyMaps_Services_JSON_SUPPRESS_ERRORS)
420
  ? 'null'
421
+ : new SnazzyMaps_Services_JSON_Error(gettype($var)." can not be encoded as JSON string");
422
  }
423
  }
424
 
435
  {
436
  $encoded_value = $this->encode($value);
437
 
438
+ if(SnazzyMaps_Services_JSON::isError($encoded_value)) {
439
  return $encoded_value;
440
  }
441
 
476
  *
477
  * @return mixed number, boolean, string, array, or object
478
  * corresponding to given JSON input string.
479
+ * See argument 1 to SnazzyMaps_Services_JSON() above for object-output behavior.
480
  * Note that decode() always returns strings
481
  * in ASCII or UTF-8 format!
482
  * @access public
611
  // array, or object notation
612
 
613
  if ($str{0} == '[') {
614
+ $stk = array(SnazzyMaps_Services_JSON_IN_ARR);
615
  $arr = array();
616
  } else {
617
+ if ($this->use & SnazzyMaps_Services_JSON_LOOSE_TYPE) {
618
+ $stk = array(SnazzyMaps_Services_JSON_IN_OBJ);
619
  $obj = array();
620
  } else {
621
+ $stk = array(SnazzyMaps_Services_JSON_IN_OBJ);
622
  $obj = new stdClass();
623
  }
624
  }
625
 
626
+ array_push($stk, array('what' => SnazzyMaps_Services_JSON_SLICE,
627
  'where' => 0,
628
  'delim' => false));
629
 
631
  $chrs = $this->reduce_string($chrs);
632
 
633
  if ($chrs == '') {
634
+ if (reset($stk) == SnazzyMaps_Services_JSON_IN_ARR) {
635
  return $arr;
636
 
637
  } else {
649
  $top = end($stk);
650
  $substr_chrs_c_2 = substr($chrs, $c, 2);
651
 
652
+ if (($c == $strlen_chrs) || (($chrs{$c} == ',') && ($top['what'] == SnazzyMaps_Services_JSON_SLICE))) {
653
  // found a comma that is not inside a string, array, etc.,
654
  // OR we've reached the end of the character list
655
  $slice = substr($chrs, $top['where'], ($c - $top['where']));
656
+ array_push($stk, array('what' => SnazzyMaps_Services_JSON_SLICE, 'where' => ($c + 1), 'delim' => false));
657
  //print("Found split at {$c}: ".substr($chrs, $top['where'], (1 + $c - $top['where']))."\n");
658
 
659
+ if (reset($stk) == SnazzyMaps_Services_JSON_IN_ARR) {
660
  // we are in an array, so just push an element onto the stack
661
  array_push($arr, $this->decode($slice));
662
 
663
+ } elseif (reset($stk) == SnazzyMaps_Services_JSON_IN_OBJ) {
664
  // we are in an object, so figure
665
  // out the property name and set an
666
  // element in an associative array,
672
  $key = $this->decode($parts[1]);
673
  $val = $this->decode($parts[2]);
674
 
675
+ if ($this->use & SnazzyMaps_Services_JSON_LOOSE_TYPE) {
676
  $obj[$key] = $val;
677
  } else {
678
  $obj->$key = $val;
682
  $key = $parts[1];
683
  $val = $this->decode($parts[2]);
684
 
685
+ if ($this->use & SnazzyMaps_Services_JSON_LOOSE_TYPE) {
686
  $obj[$key] = $val;
687
  } else {
688
  $obj->$key = $val;
691
 
692
  }
693
 
694
+ } elseif ((($chrs{$c} == '"') || ($chrs{$c} == "'")) && ($top['what'] != SnazzyMaps_Services_JSON_IN_STR)) {
695
  // found a quote, and we are not inside a string
696
+ array_push($stk, array('what' => SnazzyMaps_Services_JSON_IN_STR, 'where' => $c, 'delim' => $chrs{$c}));
697
  //print("Found start of string at {$c}\n");
698
 
699
  } elseif (($chrs{$c} == $top['delim']) &&
700
+ ($top['what'] == SnazzyMaps_Services_JSON_IN_STR) &&
701
  ((strlen(substr($chrs, 0, $c)) - strlen(rtrim(substr($chrs, 0, $c), '\\'))) % 2 != 1)) {
702
  // found a quote, we're in a string, and it's not escaped
703
  // we know that it's not escaped becase there is _not_ an
706
  //print("Found end of string at {$c}: ".substr($chrs, $top['where'], (1 + 1 + $c - $top['where']))."\n");
707
 
708
  } elseif (($chrs{$c} == '[') &&
709
+ in_array($top['what'], array(SnazzyMaps_Services_JSON_SLICE, SnazzyMaps_Services_JSON_IN_ARR, SnazzyMaps_Services_JSON_IN_OBJ))) {
710
  // found a left-bracket, and we are in an array, object, or slice
711
+ array_push($stk, array('what' => SnazzyMaps_Services_JSON_IN_ARR, 'where' => $c, 'delim' => false));
712
  //print("Found start of array at {$c}\n");
713
 
714
+ } elseif (($chrs{$c} == ']') && ($top['what'] == SnazzyMaps_Services_JSON_IN_ARR)) {
715
  // found a right-bracket, and we're in an array
716
  array_pop($stk);
717
  //print("Found end of array at {$c}: ".substr($chrs, $top['where'], (1 + $c - $top['where']))."\n");
718
 
719
  } elseif (($chrs{$c} == '{') &&
720
+ in_array($top['what'], array(SnazzyMaps_Services_JSON_SLICE, SnazzyMaps_Services_JSON_IN_ARR, SnazzyMaps_Services_JSON_IN_OBJ))) {
721
  // found a left-brace, and we are in an array, object, or slice
722
+ array_push($stk, array('what' => SnazzyMaps_Services_JSON_IN_OBJ, 'where' => $c, 'delim' => false));
723
  //print("Found start of object at {$c}\n");
724
 
725
+ } elseif (($chrs{$c} == '}') && ($top['what'] == SnazzyMaps_Services_JSON_IN_OBJ)) {
726
  // found a right-brace, and we're in an object
727
  array_pop($stk);
728
  //print("Found end of object at {$c}: ".substr($chrs, $top['where'], (1 + $c - $top['where']))."\n");
729
 
730
  } elseif (($substr_chrs_c_2 == '/*') &&
731
+ in_array($top['what'], array(SnazzyMaps_Services_JSON_SLICE, SnazzyMaps_Services_JSON_IN_ARR, SnazzyMaps_Services_JSON_IN_OBJ))) {
732
  // found a comment start, and we are in an array, object, or slice
733
+ array_push($stk, array('what' => SnazzyMaps_Services_JSON_IN_CMT, 'where' => $c, 'delim' => false));
734
  $c++;
735
  //print("Found start of comment at {$c}\n");
736
 
737
+ } elseif (($substr_chrs_c_2 == '*/') && ($top['what'] == SnazzyMaps_Services_JSON_IN_CMT)) {
738
  // found a comment end, and we're in one now
739
  array_pop($stk);
740
  $c++;
748
 
749
  }
750
 
751
+ if (reset($stk) == SnazzyMaps_Services_JSON_IN_ARR) {
752
  return $arr;
753
 
754
+ } elseif (reset($stk) == SnazzyMaps_Services_JSON_IN_OBJ) {
755
  return $obj;
756
 
757
  }
767
  {
768
  if (class_exists('pear')) {
769
  return PEAR::isError($data, $code);
770
+ } elseif (is_object($data) && (get_class($data) == 'SnazzyMaps_Services_JSON_error' ||
771
+ is_subclass_of($data, 'SnazzyMaps_Services_JSON_error'))) {
772
  return true;
773
  }
774
 
778
 
779
  if (class_exists('PEAR_Error')) {
780
 
781
+ class SnazzyMaps_Services_JSON_Error extends PEAR_Error
782
  {
783
+ function SnazzyMaps_Services_JSON_Error($message = 'unknown error', $code = null,
784
  $mode = null, $options = null, $userinfo = null)
785
  {
786
  parent::PEAR_Error($message, $code, $mode, $options, $userinfo);
792
  /**
793
  * @todo Ultimately, this class shall be descended from PEAR_Error
794
  */
795
+ class SnazzyMaps_Services_JSON_Error
796
  {
797
+ function SnazzyMaps_Services_JSON_Error($message = 'unknown error', $code = null,
798
  $mode = null, $options = null, $userinfo = null)
799
  {
800
 
admin/index.css CHANGED
@@ -1 +1 @@
1
- .container,.container-fluid{margin-right:auto;margin-left:auto}.container-fluid:after,.container-fluid:before,.container:after,.container:before,.row:after,.row:before{display:table;content:" "}.container,.container-fluid{padding-left:8px;padding-right:8px}.container-fluid:after,.container:after,.row:after{clear:both}@media (min-width:768px){.container{width:750px}}@media (min-width:992px){.container{width:970px}}@media (min-width:1200px){.container{width:1170px}}.row{margin-left:-8px;margin-right:-8px}.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{position:relative;min-height:1px;padding-left:8px;padding-right:8px}.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{float:left}.col-xs-1{width:8.33333%}.col-xs-2{width:16.66667%}.col-xs-3{width:25%}.col-xs-4{width:33.33333%}.col-xs-5{width:41.66667%}.col-xs-6{width:50%}.col-xs-7{width:58.33333%}.col-xs-8{width:66.66667%}.col-xs-9{width:75%}.col-xs-10{width:83.33333%}.col-xs-11{width:91.66667%}.col-xs-12{width:100%}.col-xs-pull-0{right:auto}.col-xs-pull-1{right:8.33333%}.col-xs-pull-2{right:16.66667%}.col-xs-pull-3{right:25%}.col-xs-pull-4{right:33.33333%}.col-xs-pull-5{right:41.66667%}.col-xs-pull-6{right:50%}.col-xs-pull-7{right:58.33333%}.col-xs-pull-8{right:66.66667%}.col-xs-pull-9{right:75%}.col-xs-pull-10{right:83.33333%}.col-xs-pull-11{right:91.66667%}.col-xs-pull-12{right:100%}.col-xs-push-0{left:auto}.col-xs-push-1{left:8.33333%}.col-xs-push-2{left:16.66667%}.col-xs-push-3{left:25%}.col-xs-push-4{left:33.33333%}.col-xs-push-5{left:41.66667%}.col-xs-push-6{left:50%}.col-xs-push-7{left:58.33333%}.col-xs-push-8{left:66.66667%}.col-xs-push-9{left:75%}.col-xs-push-10{left:83.33333%}.col-xs-push-11{left:91.66667%}.col-xs-push-12{left:100%}.col-xs-offset-0{margin-left:0}.col-xs-offset-1{margin-left:8.33333%}.col-xs-offset-2{margin-left:16.66667%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-4{margin-left:33.33333%}.col-xs-offset-5{margin-left:41.66667%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-7{margin-left:58.33333%}.col-xs-offset-8{margin-left:66.66667%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-10{margin-left:83.33333%}.col-xs-offset-11{margin-left:91.66667%}.col-xs-offset-12{margin-left:100%}@media (min-width:768px){.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9{float:left}.col-sm-1{width:8.33333%}.col-sm-2{width:16.66667%}.col-sm-3{width:25%}.col-sm-4{width:33.33333%}.col-sm-5{width:41.66667%}.col-sm-6{width:50%}.col-sm-7{width:58.33333%}.col-sm-8{width:66.66667%}.col-sm-9{width:75%}.col-sm-10{width:83.33333%}.col-sm-11{width:91.66667%}.col-sm-12{width:100%}.col-sm-pull-0{right:auto}.col-sm-pull-1{right:8.33333%}.col-sm-pull-2{right:16.66667%}.col-sm-pull-3{right:25%}.col-sm-pull-4{right:33.33333%}.col-sm-pull-5{right:41.66667%}.col-sm-pull-6{right:50%}.col-sm-pull-7{right:58.33333%}.col-sm-pull-8{right:66.66667%}.col-sm-pull-9{right:75%}.col-sm-pull-10{right:83.33333%}.col-sm-pull-11{right:91.66667%}.col-sm-pull-12{right:100%}.col-sm-push-0{left:auto}.col-sm-push-1{left:8.33333%}.col-sm-push-2{left:16.66667%}.col-sm-push-3{left:25%}.col-sm-push-4{left:33.33333%}.col-sm-push-5{left:41.66667%}.col-sm-push-6{left:50%}.col-sm-push-7{left:58.33333%}.col-sm-push-8{left:66.66667%}.col-sm-push-9{left:75%}.col-sm-push-10{left:83.33333%}.col-sm-push-11{left:91.66667%}.col-sm-push-12{left:100%}.col-sm-offset-0{margin-left:0}.col-sm-offset-1{margin-left:8.33333%}.col-sm-offset-2{margin-left:16.66667%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-4{margin-left:33.33333%}.col-sm-offset-5{margin-left:41.66667%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-7{margin-left:58.33333%}.col-sm-offset-8{margin-left:66.66667%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-10{margin-left:83.33333%}.col-sm-offset-11{margin-left:91.66667%}.col-sm-offset-12{margin-left:100%}}@media (min-width:992px){.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9{float:left}.col-md-1{width:8.33333%}.col-md-2{width:16.66667%}.col-md-3{width:25%}.col-md-4{width:33.33333%}.col-md-5{width:41.66667%}.col-md-6{width:50%}.col-md-7{width:58.33333%}.col-md-8{width:66.66667%}.col-md-9{width:75%}.col-md-10{width:83.33333%}.col-md-11{width:91.66667%}.col-md-12{width:100%}.col-md-pull-0{right:auto}.col-md-pull-1{right:8.33333%}.col-md-pull-2{right:16.66667%}.col-md-pull-3{right:25%}.col-md-pull-4{right:33.33333%}.col-md-pull-5{right:41.66667%}.col-md-pull-6{right:50%}.col-md-pull-7{right:58.33333%}.col-md-pull-8{right:66.66667%}.col-md-pull-9{right:75%}.col-md-pull-10{right:83.33333%}.col-md-pull-11{right:91.66667%}.col-md-pull-12{right:100%}.col-md-push-0{left:auto}.col-md-push-1{left:8.33333%}.col-md-push-2{left:16.66667%}.col-md-push-3{left:25%}.col-md-push-4{left:33.33333%}.col-md-push-5{left:41.66667%}.col-md-push-6{left:50%}.col-md-push-7{left:58.33333%}.col-md-push-8{left:66.66667%}.col-md-push-9{left:75%}.col-md-push-10{left:83.33333%}.col-md-push-11{left:91.66667%}.col-md-push-12{left:100%}.col-md-offset-0{margin-left:0}.col-md-offset-1{margin-left:8.33333%}.col-md-offset-2{margin-left:16.66667%}.col-md-offset-3{margin-left:25%}.col-md-offset-4{margin-left:33.33333%}.col-md-offset-5{margin-left:41.66667%}.col-md-offset-6{margin-left:50%}.col-md-offset-7{margin-left:58.33333%}.col-md-offset-8{margin-left:66.66667%}.col-md-offset-9{margin-left:75%}.col-md-offset-10{margin-left:83.33333%}.col-md-offset-11{margin-left:91.66667%}.col-md-offset-12{margin-left:100%}}@media (min-width:1200px){.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9{float:left}.col-lg-1{width:8.33333%}.col-lg-2{width:16.66667%}.col-lg-3{width:25%}.col-lg-4{width:33.33333%}.col-lg-5{width:41.66667%}.col-lg-6{width:50%}.col-lg-7{width:58.33333%}.col-lg-8{width:66.66667%}.col-lg-9{width:75%}.col-lg-10{width:83.33333%}.col-lg-11{width:91.66667%}.col-lg-12{width:100%}.col-lg-pull-0{right:auto}.col-lg-pull-1{right:8.33333%}.col-lg-pull-2{right:16.66667%}.col-lg-pull-3{right:25%}.col-lg-pull-4{right:33.33333%}.col-lg-pull-5{right:41.66667%}.col-lg-pull-6{right:50%}.col-lg-pull-7{right:58.33333%}.col-lg-pull-8{right:66.66667%}.col-lg-pull-9{right:75%}.col-lg-pull-10{right:83.33333%}.col-lg-pull-11{right:91.66667%}.col-lg-pull-12{right:100%}.col-lg-push-0{left:auto}.col-lg-push-1{left:8.33333%}.col-lg-push-2{left:16.66667%}.col-lg-push-3{left:25%}.col-lg-push-4{left:33.33333%}.col-lg-push-5{left:41.66667%}.col-lg-push-6{left:50%}.col-lg-push-7{left:58.33333%}.col-lg-push-8{left:66.66667%}.col-lg-push-9{left:75%}.col-lg-push-10{left:83.33333%}.col-lg-push-11{left:91.66667%}.col-lg-push-12{left:100%}.col-lg-offset-0{margin-left:0}.col-lg-offset-1{margin-left:8.33333%}.col-lg-offset-2{margin-left:16.66667%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-4{margin-left:33.33333%}.col-lg-offset-5{margin-left:41.66667%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-7{margin-left:58.33333%}.col-lg-offset-8{margin-left:66.66667%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-10{margin-left:83.33333%}.col-lg-offset-11{margin-left:91.66667%}.col-lg-offset-12{margin-left:100%}}.sm-plugin .box-shadow-cell,.sm-plugin .sm-style,.sm-plugin h2.nav-tab-wrapper,.sm-plugin h3.nav-tab-wrapper{background-color:#fff;border:1px solid #e5e5e5;-webkit-box-shadow:0 1px 1px -1px rgba(0,0,0,.1);box-shadow:0 1px 1px -1px rgba(0,0,0,.1)}.sm-plugin *{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.sm-plugin .clearfix:after{content:'';display:table;clear:both}.sm-plugin .button-error{background:#e74c3c;border-color:#d62c1a;color:#fff;-webkit-box-shadow:inset 0 1px 0 #ed7669,0 1px 0 rgba(0,0,0,.08);box-shadow:inset 0 1px 0 #ed7669,0 1px 0 rgba(0,0,0,.08)}.sm-plugin .button-error:focus,.sm-plugin .button-error:hover{background:#df2e1b;border-color:#d62c1a;color:#fff}.sm-plugin .welcome-panel{position:relative;margin-top:16px;margin-bottom:10px;padding:23px}.sm-plugin .welcome-box-close{position:absolute;top:0;right:0;padding:8px;opacity:.6;transition:opacity .15s ease}.sm-plugin .footer a,.sm-plugin .welcome-box-close{-webkit-transition:opacity .15s ease;-o-transition:opacity .15s ease}.sm-plugin .welcome-box-close:active,.sm-plugin .welcome-box-close:focus,.sm-plugin .welcome-box-close:hover{opacity:1}.sm-plugin #search-form{margin-bottom:16px}.sm-plugin #filters select,.sm-plugin #search-form,.sm-plugin #search-form .search-box input,.sm-plugin #search-form button{width:100%}@media (min-width:783px){.sm-plugin #filters,.sm-plugin #filters select,.sm-plugin #search-form,.sm-plugin #search-form .search-box input,.sm-plugin #search-form button{width:auto}.sm-plugin #search-form .search-box input[name=text]{float:left;height:28px;margin:0 4px 0 0}}@media (min-width:992px){.sm-plugin #search-form{margin:0;float:right}.sm-plugin #filters{margin:0;float:left}}.sm-plugin .footer{margin-top:16px;padding-top:16px;border-top:1px solid #e5e5e5}.sm-plugin .footer a{opacity:.75;filter:alpha(opacity=75);transition:opacity .15s ease}.sm-plugin .footer a:active,.sm-plugin .footer a:focus,.sm-plugin .footer a:hover{opacity:1;filter:alpha(opacity=100);-webkit-box-shadow:none;box-shadow:none}.sm-plugin .footer .icon-brand{width:180px;height:55px;margin-right:16px}.sm-plugin .footer .social{display:inline-block;margin-top:5px;margin-bottom:5px;vertical-align:middle}.sm-plugin .footer .social a{position:relative;width:20px;height:20px;margin:10px;float:left}.sm-plugin .footer .social a:after{content:'';display:block;position:absolute;top:-10px;right:-10px;bottom:-10px;left:-10px}.sm-plugin h2.nav-tab-wrapper,.sm-plugin h3.nav-tab-wrapper{display:inline-block;width:100%;margin-top:16px;margin-bottom:16px;padding:5px 10px}.sm-plugin .nav-tab{padding:10px;background-color:transparent;border:none;color:#0074a2;font-weight:400}.sm-plugin .nav-tab:focus{-webkit-box-shadow:none;box-shadow:none}.sm-plugin .nav-tab-active,.sm-plugin .nav-tab-active:hover{background-color:#fff;border:none;color:#333;font-weight:700}.sm-plugin .nav-tab-container{margin-top:0;margin-left:0}.sm-plugin .tablenav{height:auto}.sm-plugin .tablenav .alignleft,.sm-plugin .tablenav select{width:100%}.sm-plugin .tablenav.bottom{margin-top:-8px}.sm-plugin .tablenav a.disabled{color:#d3d3d3;pointer-events:none;cursor:default}.sm-plugin .nothing{margin-top:80px;margin-bottom:80px;text-align:center}.sm-plugin .nothing p{font-size:18px;color:#999}.sm-plugin .tablenav-pages{margin-top:16px;text-align:center}@media (min-width:783px){.sm-plugin .tablenav{margin-bottom:16px}.sm-plugin .tablenav .alignleft,.sm-plugin .tablenav select{width:auto}.sm-plugin .tablenav.top.row{margin-left:-8px;margin-right:-8px}.sm-plugin .tablenav-pages{margin-top:0;text-align:right}}.sm-plugin .sm-style{position:relative;margin-bottom:16px}.sm-plugin .sm-map{position:relative;width:100%;height:250px;overflow:hidden;border:1px solid #f0f0f0}.sm-plugin .sm-map img{display:block;position:absolute;top:50%;left:50%;z-index:1;-webkit-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);-o-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.sm-plugin .sm-map .overlay-icon{display:block;position:absolute;top:0;left:0;width:0;height:0;z-index:2;border-top:36px solid rgba(46,162,204,.85);border-left:36px solid rgba(46,162,204,.85);border-right:36px solid transparent;border-bottom:36px solid transparent}.sm-plugin .sm-map [class*=icon-]{position:absolute;top:-26px;left:-26px;width:24px;height:24px}.sm-plugin .sm-content{margin-top:-1px;padding:20px;border:1px solid #f0f0f0}.sm-plugin .sm-content h3{margin:0;font-weight:400}.sm-plugin .sm-content .author{margin-bottom:4px}.sm-plugin .sm-content .button{margin-top:10px}.sm-plugin .sm-content .favorites,.sm-plugin .sm-content .views{display:block}.sm-plugin .sm-content [class*=icon-]{width:13px;height:13px;margin-right:4px;margin-bottom:4px;opacity:.7;filter:alpha(opacity=70)}.sm-plugin .api-form{display:inline-block;margin-bottom:16px;padding:16px}.sm-plugin .api-form>*{vertical-align:middle}@media (min-width:600px) and (max-width:767px){.sm-plugin .sm-map{width:50%;left:50%;border-left:none}.sm-plugin .sm-content{position:absolute;top:0;left:0;width:50%;height:100%;margin-top:0}}.sm-plugin [class*=icon-]{display:inline-block;width:16px;height:16px;background-color:transparent;background-position:center;background-repeat:no-repeat;background-size:100%;vertical-align:middle}.sm-plugin .icon-star{background-image:url(images/star.svg)}.sm-plugin .icon-eye{background-image:url(images/eye.svg)}.sm-plugin .icon-googleplus{background-image:url(images/googleplus.svg)}.sm-plugin .icon-facebook{background-image:url(images/facebook.svg)}.sm-plugin .icon-twitter{background-image:url(images/twitter.svg)}.sm-plugin .icon-mail{background-image:url(images/mail.svg)}.sm-plugin .icon-checkmark{background-image:url(images/checkmark.svg)}.sm-plugin .icon-brand{background-image:url(images/logo-snazzymaps.svg)}.sm-plugin .icon-close{background-image:url(images/close.svg)}
1
+ .container,.container-fluid{margin-right:auto;margin-left:auto}.container-fluid:after,.container-fluid:before,.container:after,.container:before,.row:after,.row:before{display:table;content:" "}.container,.container-fluid{padding-left:8px;padding-right:8px}.container-fluid:after,.container:after,.row:after{clear:both}.sm-plugin .footer a,.sm-plugin .welcome-box-close{-webkit-transition:opacity .15s ease;-o-transition:opacity .15s ease}@media (min-width:768px){.container{width:750px}}@media (min-width:992px){.container{width:970px}}@media (min-width:1200px){.container{width:1170px}}.row{margin-left:-8px;margin-right:-8px}.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{position:relative;min-height:1px;padding-left:8px;padding-right:8px}.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{float:left}.col-xs-1{width:8.33333%}.col-xs-2{width:16.66667%}.col-xs-3{width:25%}.col-xs-4{width:33.33333%}.col-xs-5{width:41.66667%}.col-xs-6{width:50%}.col-xs-7{width:58.33333%}.col-xs-8{width:66.66667%}.col-xs-9{width:75%}.col-xs-10{width:83.33333%}.col-xs-11{width:91.66667%}.col-xs-12{width:100%}.col-xs-pull-0{right:auto}.col-xs-pull-1{right:8.33333%}.col-xs-pull-2{right:16.66667%}.col-xs-pull-3{right:25%}.col-xs-pull-4{right:33.33333%}.col-xs-pull-5{right:41.66667%}.col-xs-pull-6{right:50%}.col-xs-pull-7{right:58.33333%}.col-xs-pull-8{right:66.66667%}.col-xs-pull-9{right:75%}.col-xs-pull-10{right:83.33333%}.col-xs-pull-11{right:91.66667%}.col-xs-pull-12{right:100%}.col-xs-push-0{left:auto}.col-xs-push-1{left:8.33333%}.col-xs-push-2{left:16.66667%}.col-xs-push-3{left:25%}.col-xs-push-4{left:33.33333%}.col-xs-push-5{left:41.66667%}.col-xs-push-6{left:50%}.col-xs-push-7{left:58.33333%}.col-xs-push-8{left:66.66667%}.col-xs-push-9{left:75%}.col-xs-push-10{left:83.33333%}.col-xs-push-11{left:91.66667%}.col-xs-push-12{left:100%}.col-xs-offset-0{margin-left:0}.col-xs-offset-1{margin-left:8.33333%}.col-xs-offset-2{margin-left:16.66667%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-4{margin-left:33.33333%}.col-xs-offset-5{margin-left:41.66667%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-7{margin-left:58.33333%}.col-xs-offset-8{margin-left:66.66667%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-10{margin-left:83.33333%}.col-xs-offset-11{margin-left:91.66667%}.col-xs-offset-12{margin-left:100%}@media (min-width:768px){.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9{float:left}.col-sm-1{width:8.33333%}.col-sm-2{width:16.66667%}.col-sm-3{width:25%}.col-sm-4{width:33.33333%}.col-sm-5{width:41.66667%}.col-sm-6{width:50%}.col-sm-7{width:58.33333%}.col-sm-8{width:66.66667%}.col-sm-9{width:75%}.col-sm-10{width:83.33333%}.col-sm-11{width:91.66667%}.col-sm-12{width:100%}.col-sm-pull-0{right:auto}.col-sm-pull-1{right:8.33333%}.col-sm-pull-2{right:16.66667%}.col-sm-pull-3{right:25%}.col-sm-pull-4{right:33.33333%}.col-sm-pull-5{right:41.66667%}.col-sm-pull-6{right:50%}.col-sm-pull-7{right:58.33333%}.col-sm-pull-8{right:66.66667%}.col-sm-pull-9{right:75%}.col-sm-pull-10{right:83.33333%}.col-sm-pull-11{right:91.66667%}.col-sm-pull-12{right:100%}.col-sm-push-0{left:auto}.col-sm-push-1{left:8.33333%}.col-sm-push-2{left:16.66667%}.col-sm-push-3{left:25%}.col-sm-push-4{left:33.33333%}.col-sm-push-5{left:41.66667%}.col-sm-push-6{left:50%}.col-sm-push-7{left:58.33333%}.col-sm-push-8{left:66.66667%}.col-sm-push-9{left:75%}.col-sm-push-10{left:83.33333%}.col-sm-push-11{left:91.66667%}.col-sm-push-12{left:100%}.col-sm-offset-0{margin-left:0}.col-sm-offset-1{margin-left:8.33333%}.col-sm-offset-2{margin-left:16.66667%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-4{margin-left:33.33333%}.col-sm-offset-5{margin-left:41.66667%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-7{margin-left:58.33333%}.col-sm-offset-8{margin-left:66.66667%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-10{margin-left:83.33333%}.col-sm-offset-11{margin-left:91.66667%}.col-sm-offset-12{margin-left:100%}}@media (min-width:992px){.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9{float:left}.col-md-1{width:8.33333%}.col-md-2{width:16.66667%}.col-md-3{width:25%}.col-md-4{width:33.33333%}.col-md-5{width:41.66667%}.col-md-6{width:50%}.col-md-7{width:58.33333%}.col-md-8{width:66.66667%}.col-md-9{width:75%}.col-md-10{width:83.33333%}.col-md-11{width:91.66667%}.col-md-12{width:100%}.col-md-pull-0{right:auto}.col-md-pull-1{right:8.33333%}.col-md-pull-2{right:16.66667%}.col-md-pull-3{right:25%}.col-md-pull-4{right:33.33333%}.col-md-pull-5{right:41.66667%}.col-md-pull-6{right:50%}.col-md-pull-7{right:58.33333%}.col-md-pull-8{right:66.66667%}.col-md-pull-9{right:75%}.col-md-pull-10{right:83.33333%}.col-md-pull-11{right:91.66667%}.col-md-pull-12{right:100%}.col-md-push-0{left:auto}.col-md-push-1{left:8.33333%}.col-md-push-2{left:16.66667%}.col-md-push-3{left:25%}.col-md-push-4{left:33.33333%}.col-md-push-5{left:41.66667%}.col-md-push-6{left:50%}.col-md-push-7{left:58.33333%}.col-md-push-8{left:66.66667%}.col-md-push-9{left:75%}.col-md-push-10{left:83.33333%}.col-md-push-11{left:91.66667%}.col-md-push-12{left:100%}.col-md-offset-0{margin-left:0}.col-md-offset-1{margin-left:8.33333%}.col-md-offset-2{margin-left:16.66667%}.col-md-offset-3{margin-left:25%}.col-md-offset-4{margin-left:33.33333%}.col-md-offset-5{margin-left:41.66667%}.col-md-offset-6{margin-left:50%}.col-md-offset-7{margin-left:58.33333%}.col-md-offset-8{margin-left:66.66667%}.col-md-offset-9{margin-left:75%}.col-md-offset-10{margin-left:83.33333%}.col-md-offset-11{margin-left:91.66667%}.col-md-offset-12{margin-left:100%}}@media (min-width:1200px){.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9{float:left}.col-lg-1{width:8.33333%}.col-lg-2{width:16.66667%}.col-lg-3{width:25%}.col-lg-4{width:33.33333%}.col-lg-5{width:41.66667%}.col-lg-6{width:50%}.col-lg-7{width:58.33333%}.col-lg-8{width:66.66667%}.col-lg-9{width:75%}.col-lg-10{width:83.33333%}.col-lg-11{width:91.66667%}.col-lg-12{width:100%}.col-lg-pull-0{right:auto}.col-lg-pull-1{right:8.33333%}.col-lg-pull-2{right:16.66667%}.col-lg-pull-3{right:25%}.col-lg-pull-4{right:33.33333%}.col-lg-pull-5{right:41.66667%}.col-lg-pull-6{right:50%}.col-lg-pull-7{right:58.33333%}.col-lg-pull-8{right:66.66667%}.col-lg-pull-9{right:75%}.col-lg-pull-10{right:83.33333%}.col-lg-pull-11{right:91.66667%}.col-lg-pull-12{right:100%}.col-lg-push-0{left:auto}.col-lg-push-1{left:8.33333%}.col-lg-push-2{left:16.66667%}.col-lg-push-3{left:25%}.col-lg-push-4{left:33.33333%}.col-lg-push-5{left:41.66667%}.col-lg-push-6{left:50%}.col-lg-push-7{left:58.33333%}.col-lg-push-8{left:66.66667%}.col-lg-push-9{left:75%}.col-lg-push-10{left:83.33333%}.col-lg-push-11{left:91.66667%}.col-lg-push-12{left:100%}.col-lg-offset-0{margin-left:0}.col-lg-offset-1{margin-left:8.33333%}.col-lg-offset-2{margin-left:16.66667%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-4{margin-left:33.33333%}.col-lg-offset-5{margin-left:41.66667%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-7{margin-left:58.33333%}.col-lg-offset-8{margin-left:66.66667%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-10{margin-left:83.33333%}.col-lg-offset-11{margin-left:91.66667%}.col-lg-offset-12{margin-left:100%}}.sm-plugin .box-shadow-cell,.sm-plugin .sm-style,.sm-plugin h2.nav-tab-wrapper,.sm-plugin h3.nav-tab-wrapper{background-color:#fff;border:1px solid #e5e5e5;-webkit-box-shadow:0 1px 1px -1px rgba(0,0,0,.1);box-shadow:0 1px 1px -1px rgba(0,0,0,.1)}.sm-plugin *{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.sm-plugin .clearfix:after{content:'';display:table;clear:both}.sm-plugin .button-error{background:#e74c3c;border-color:#d62c1a;color:#fff;-webkit-box-shadow:inset 0 1px 0 #ed7669,0 1px 0 rgba(0,0,0,.08);box-shadow:inset 0 1px 0 #ed7669,0 1px 0 rgba(0,0,0,.08)}.sm-plugin .button-error:focus,.sm-plugin .button-error:hover{background:#df2e1b;border-color:#d62c1a;color:#fff}.sm-plugin .welcome-panel{position:relative;margin-top:16px;margin-bottom:10px;padding:23px}.sm-plugin .welcome-box-close{position:absolute;top:0;right:0;padding:8px;opacity:.6;transition:opacity .15s ease}.sm-plugin .welcome-box-close:active,.sm-plugin .welcome-box-close:focus,.sm-plugin .welcome-box-close:hover{opacity:1}.sm-plugin #search-form{margin-bottom:16px}.sm-plugin #filters select,.sm-plugin #search-form,.sm-plugin #search-form .search-box input,.sm-plugin #search-form button{width:100%}@media (min-width:783px){.sm-plugin #filters,.sm-plugin #filters select,.sm-plugin #search-form,.sm-plugin #search-form .search-box input,.sm-plugin #search-form button{width:auto}.sm-plugin #search-form .search-box input[name=text]{float:left;height:28px;margin:0 4px 0 0}}@media (min-width:992px){.sm-plugin #search-form{margin:0;float:right}.sm-plugin #filters{margin:0;float:left}}.sm-plugin .footer{margin-top:16px;padding-top:16px;border-top:1px solid #e5e5e5}.sm-plugin .footer a{opacity:.75;filter:alpha(opacity=75);transition:opacity .15s ease}.sm-plugin .footer a:active,.sm-plugin .footer a:focus,.sm-plugin .footer a:hover{opacity:1;filter:alpha(opacity=100);-webkit-box-shadow:none;box-shadow:none}.sm-plugin .footer .icon-brand{width:180px;height:55px;margin-right:16px}.sm-plugin .footer .social{display:inline-block;margin-top:5px;margin-bottom:5px;vertical-align:middle}.sm-plugin .footer .social a{position:relative;width:20px;height:20px;margin:10px;float:left}.sm-plugin .footer .social a:after{content:'';display:block;position:absolute;top:-10px;right:-10px;bottom:-10px;left:-10px}.sm-plugin h2.nav-tab-wrapper,.sm-plugin h3.nav-tab-wrapper{display:inline-block;width:100%;margin-top:16px;margin-bottom:16px;padding:5px 10px}.sm-plugin .nav-tab{padding:10px;background-color:transparent;border:none;color:#0074a2;font-weight:400}.sm-plugin .nav-tab:focus{-webkit-box-shadow:none;box-shadow:none}.sm-plugin .nav-tab-active,.sm-plugin .nav-tab-active:hover{background-color:#fff;border:none;color:#333;font-weight:700}.sm-plugin .nav-tab-container{margin-top:0;margin-left:0}.sm-plugin .tablenav{height:auto}.sm-plugin .tablenav .alignleft,.sm-plugin .tablenav select{width:100%}.sm-plugin .tablenav.bottom{margin-top:-8px}.sm-plugin .tablenav a.disabled{color:#d3d3d3;pointer-events:none;cursor:default}.sm-plugin .nothing{margin-top:80px;margin-bottom:80px;text-align:center}.sm-plugin .nothing p{font-size:18px;color:#999}.sm-plugin .tablenav-pages{margin-top:16px;text-align:center}@media (min-width:783px){.sm-plugin .tablenav{margin-bottom:16px}.sm-plugin .tablenav .alignleft,.sm-plugin .tablenav select{width:auto}.sm-plugin .tablenav.top.row{margin-left:-8px;margin-right:-8px}.sm-plugin .tablenav-pages{margin-top:0;text-align:right}}.sm-plugin .sm-style{position:relative;margin-bottom:16px}.sm-plugin .sm-map{position:relative;width:100%;height:250px;overflow:hidden;border:1px solid #f0f0f0}.sm-plugin .sm-map img{display:block;position:absolute;top:50%;left:50%;z-index:1;-webkit-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);-o-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.sm-plugin .sm-map .overlay-icon{display:block;position:absolute;top:0;left:0;width:0;height:0;z-index:2;border-top:36px solid rgba(46,162,204,.85);border-left:36px solid rgba(46,162,204,.85);border-right:36px solid transparent;border-bottom:36px solid transparent}.sm-plugin .sm-map [class*=icon-]{position:absolute;top:-26px;left:-26px;width:24px;height:24px}.sm-plugin .sm-content{margin-top:-1px;padding:20px;border:1px solid #f0f0f0}.sm-plugin .sm-content h3{margin:0;font-weight:400}.sm-plugin .sm-content .author{margin-bottom:4px}.sm-plugin .sm-content .button{margin-top:10px}.sm-plugin .sm-content .favorites,.sm-plugin .sm-content .views{display:block}.sm-plugin .sm-content [class*=icon-]{width:13px;height:13px;margin-right:4px;margin-bottom:4px;opacity:.7;filter:alpha(opacity=70)}.sm-plugin .api-form{display:inline-block;margin-bottom:16px;padding:16px}.sm-plugin .api-form>*{vertical-align:middle}@media (min-width:600px)and (max-width:767px){.sm-plugin .sm-map{width:50%;left:50%;border-left:none}.sm-plugin .sm-content{position:absolute;top:0;left:0;width:50%;height:100%;margin-top:0}}.sm-plugin [class*=icon-]{display:inline-block;width:16px;height:16px;background-color:transparent;background-position:center;background-repeat:no-repeat;background-size:100%;vertical-align:middle}.sm-plugin .icon-star{background-image:url(images/star.svg)}.sm-plugin .icon-eye{background-image:url(images/eye.svg)}.sm-plugin .icon-googleplus{background-image:url(images/googleplus.svg)}.sm-plugin .icon-facebook{background-image:url(images/facebook.svg)}.sm-plugin .icon-twitter{background-image:url(images/twitter.svg)}.sm-plugin .icon-mail{background-image:url(images/mail.svg)}.sm-plugin .icon-checkmark{background-image:url(images/checkmark.svg)}.sm-plugin .icon-brand{background-image:url(images/logo-snazzymaps.svg)}.sm-plugin .icon-close{background-image:url(images/close.svg)}
admin/styles.php CHANGED
@@ -29,7 +29,7 @@ defined( 'ABSPATH' ) OR exit;
29
 
30
  //When a new style is selected we have to go through some checks
31
  if(isset($_POST['new_style'])){
32
- $json = new Services_JSON();
33
  $newStyle = _object_to_array($json->decode(urldecode($_POST['new_style'])));
34
  if(!_getStyle($styles, $newStyle['id'])){
35
  $styles[] = $newStyle;
29
 
30
  //When a new style is selected we have to go through some checks
31
  if(isset($_POST['new_style'])){
32
+ $json = new SnazzyMaps_Services_JSON();
33
  $newStyle = _object_to_array($json->decode(urldecode($_POST['new_style'])));
34
  if(!_getStyle($styles, $newStyle['id'])){
35
  $styles[] = $newStyle;
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://snazzymaps.com/about
4
  Tags: google,maps,google maps,styled maps,styles,color,schemes,themes
5
  Requires at least: 2.8
6
  Tested up to: 4.2.2
7
- Stable tag: 1.1.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -97,6 +97,11 @@ If you happen to find any other map plugins that don't work please send us an em
97
 
98
  == Changelog ==
99
 
 
 
 
 
 
100
  = 1.1.0 =
101
  Release Date: June 15th, 2015
102
 
4
  Tags: google,maps,google maps,styled maps,styles,color,schemes,themes
5
  Requires at least: 2.8
6
  Tested up to: 4.2.2
7
+ Stable tag: 1.1.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
97
 
98
  == Changelog ==
99
 
100
+ = 1.1.1 =
101
+ Release Date: July 21st, 2015
102
+
103
+ * Bug Fix: Renamed the Services_JSON class to fix a redeclare class error when working with other plugins.
104
+
105
  = 1.1.0 =
106
  Release Date: June 15th, 2015
107
 
snazzymaps.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Snazzy Maps
4
  * Plugin URI: https://snazzymaps.com/plugins
5
  * Description: Apply styles to your Google Maps with the official Snazzy Maps WordPress plugin.
6
- * Version: 1.1.0
7
  * Author: Atmist
8
  * Author URI: http://atmist.com/
9
  * License: GPL2
@@ -30,15 +30,17 @@ defined( 'ABSPATH' ) OR exit;
30
  //This API key is used to explore the styles in snazzy maps
31
  define('API_BASE', 'https://snazzymaps.com/');
32
  define('API_KEY', 'ecaccc3c-44fa-486c-9503-5d473587a493');
33
- define('SNAZZY_VERSION_NUMBER', '1.1.0');
34
 
35
  if(!defined('_DS')) {
36
  define('_DS', '/');
37
  }
38
 
39
  include_once(plugin_dir_path(__FILE__) . _DS . 'admin' . _DS . 'index.php');
40
- include_once(plugin_dir_path(__FILE__) . _DS . 'additional_php' . _DS . 'Services_JSON.php');
41
-
 
 
42
  //Required for converting the data returned by the JSON Service
43
  function _object_to_array($object)
44
  {
@@ -75,7 +77,7 @@ function enqueue_script() {
75
  $in_footer = false);
76
 
77
  //We have to use l10n_print_after so we can support older versions of WordPress
78
- $json = new Services_JSON();
79
  wp_localize_script($handle, 'SnazzyDataForSnazzyMaps',
80
  array('l10n_print_after' => 'SnazzyDataForSnazzyMaps=' . $json->encode($uniqueStyle)));
81
  }
3
  * Plugin Name: Snazzy Maps
4
  * Plugin URI: https://snazzymaps.com/plugins
5
  * Description: Apply styles to your Google Maps with the official Snazzy Maps WordPress plugin.
6
+ * Version: 1.1.1
7
  * Author: Atmist
8
  * Author URI: http://atmist.com/
9
  * License: GPL2
30
  //This API key is used to explore the styles in snazzy maps
31
  define('API_BASE', 'https://snazzymaps.com/');
32
  define('API_KEY', 'ecaccc3c-44fa-486c-9503-5d473587a493');
33
+ define('SNAZZY_VERSION_NUMBER', '1.1.1');
34
 
35
  if(!defined('_DS')) {
36
  define('_DS', '/');
37
  }
38
 
39
  include_once(plugin_dir_path(__FILE__) . _DS . 'admin' . _DS . 'index.php');
40
+ if (!class_exists('SnazzyMaps_Services_JSON'))
41
+ {
42
+ include_once(plugin_dir_path(__FILE__) . _DS . 'additional_php' . _DS . 'SnazzyMaps_Services_JSON.php');
43
+ }
44
  //Required for converting the data returned by the JSON Service
45
  function _object_to_array($object)
46
  {
77
  $in_footer = false);
78
 
79
  //We have to use l10n_print_after so we can support older versions of WordPress
80
+ $json = new SnazzyMaps_Services_JSON();
81
  wp_localize_script($handle, 'SnazzyDataForSnazzyMaps',
82
  array('l10n_print_after' => 'SnazzyDataForSnazzyMaps=' . $json->encode($uniqueStyle)));
83
  }