@@ -6,6 +6,6 @@ |
||
| 6 | 6 | * Class Marker_View |
| 7 | 7 | * @package Clubdeuce\WPLib\Components\GoogleMaps |
| 8 | 8 | */ |
| 9 | -class Marker_View extends \WPLib_View_Base { |
|
| 9 | +class Marker_View extends \WPLib_View_Base { |
|
| 10 | 10 | |
| 11 | 11 | } |
| 12 | 12 | \ No newline at end of file |
@@ -12,10 +12,10 @@ |
||
| 12 | 12 | <script type="application/javascript"> |
| 13 | 13 | jQuery(document).ready(function() { |
| 14 | 14 | generate_map( |
| 15 | - "<?php echo esc_js($map_id); ?>", |
|
| 16 | - <?php echo json_encode($map_params); ?>, |
|
| 17 | - <?php echo json_encode($markers); ?>, |
|
| 18 | - <?php echo json_encode($info_windows); ?> |
|
| 15 | + "<?php echo esc_js( $map_id ); ?>", |
|
| 16 | + <?php echo json_encode( $map_params ); ?>, |
|
| 17 | + <?php echo json_encode( $markers ); ?>, |
|
| 18 | + <?php echo json_encode( $info_windows ); ?> |
|
| 19 | 19 | ); |
| 20 | 20 | }); |
| 21 | 21 | </script> |
@@ -63,7 +63,7 @@ |
||
| 63 | 63 | break; |
| 64 | 64 | } |
| 65 | 65 | |
| 66 | - if ( ! isset( $this->_location ) ) { |
|
| 66 | + if ( !isset($this->_location) ) { |
|
| 67 | 67 | break; |
| 68 | 68 | } |
| 69 | 69 | |
@@ -24,31 +24,31 @@ discard block |
||
| 24 | 24 | */ |
| 25 | 25 | protected $_location; |
| 26 | 26 | |
| 27 | - /** |
|
| 28 | - * Location_Model constructor. |
|
| 29 | - * |
|
| 30 | - * @param array $args |
|
| 31 | - */ |
|
| 32 | - function __construct( $args = array() ) { |
|
| 27 | + /** |
|
| 28 | + * Location_Model constructor. |
|
| 29 | + * |
|
| 30 | + * @param array $args |
|
| 31 | + */ |
|
| 32 | + function __construct( $args = array() ) { |
|
| 33 | 33 | |
| 34 | - $location = new WPLoc( $args ); |
|
| 34 | + $location = new WPLoc( $args ); |
|
| 35 | 35 | |
| 36 | - $args = wp_parse_args( $args, array( |
|
| 37 | - 'location' => $location, |
|
| 38 | - ) ); |
|
| 36 | + $args = wp_parse_args( $args, array( |
|
| 37 | + 'location' => $location, |
|
| 38 | + ) ); |
|
| 39 | 39 | |
| 40 | - parent::__construct( $args ); |
|
| 40 | + parent::__construct( $args ); |
|
| 41 | 41 | |
| 42 | - } |
|
| 42 | + } |
|
| 43 | 43 | |
| 44 | - /** |
|
| 45 | - * @return bool |
|
| 46 | - */ |
|
| 47 | - function has_location() { |
|
| 44 | + /** |
|
| 45 | + * @return bool |
|
| 46 | + */ |
|
| 47 | + function has_location() { |
|
| 48 | 48 | |
| 49 | - return $this->_has( '_location' ); |
|
| 49 | + return $this->_has( '_location' ); |
|
| 50 | 50 | |
| 51 | - } |
|
| 51 | + } |
|
| 52 | 52 | |
| 53 | 53 | /** |
| 54 | 54 | * @param string $method_name |
@@ -57,21 +57,21 @@ discard block |
||
| 57 | 57 | public function __call( $method_name, $args ) { |
| 58 | 58 | $value = null; |
| 59 | 59 | |
| 60 | - do { |
|
| 60 | + do { |
|
| 61 | 61 | |
| 62 | - if ( property_exists( $this, "_{$method_name}" ) ) { |
|
| 63 | - $property = "_{$method_name}"; |
|
| 64 | - $value = $this->{$property}; |
|
| 65 | - break; |
|
| 66 | - } |
|
| 62 | + if ( property_exists( $this, "_{$method_name}" ) ) { |
|
| 63 | + $property = "_{$method_name}"; |
|
| 64 | + $value = $this->{$property}; |
|
| 65 | + break; |
|
| 66 | + } |
|
| 67 | 67 | |
| 68 | - if ( ! isset( $this->_location ) ) { |
|
| 69 | - break; |
|
| 70 | - } |
|
| 68 | + if ( ! isset( $this->_location ) ) { |
|
| 69 | + break; |
|
| 70 | + } |
|
| 71 | 71 | |
| 72 | - $value = call_user_func_array( array( $this->_location, $method_name ), $args ); |
|
| 72 | + $value = call_user_func_array( array( $this->_location, $method_name ), $args ); |
|
| 73 | 73 | |
| 74 | - } while ( false ); |
|
| 74 | + } while ( false ); |
|
| 75 | 75 | |
| 76 | 76 | return $value; |
| 77 | 77 | } |
@@ -8,17 +8,17 @@ |
||
| 8 | 8 | */ |
| 9 | 9 | class Geocoder extends \Clubdeuce\WPGoogleMaps\Geocoder { |
| 10 | 10 | |
| 11 | - /** |
|
| 12 | - * @param string $address |
|
| 13 | - * |
|
| 14 | - * @return \Clubdeuce\WPGoogleMaps\Location|Location|\WP_Error |
|
| 15 | - */ |
|
| 16 | - function geocode( $address ) { |
|
| 11 | + /** |
|
| 12 | + * @param string $address |
|
| 13 | + * |
|
| 14 | + * @return \Clubdeuce\WPGoogleMaps\Location|Location|\WP_Error |
|
| 15 | + */ |
|
| 16 | + function geocode( $address ) { |
|
| 17 | 17 | |
| 18 | - $location = parent::geocode( $address ); |
|
| 18 | + $location = parent::geocode( $address ); |
|
| 19 | 19 | |
| 20 | - return new Location( array( 'location' => $location ) ); |
|
| 20 | + return new Location( array( 'location' => $location ) ); |
|
| 21 | 21 | |
| 22 | - } |
|
| 22 | + } |
|
| 23 | 23 | |
| 24 | 24 | } |
@@ -37,7 +37,7 @@ |
||
| 37 | 37 | break; |
| 38 | 38 | } |
| 39 | 39 | |
| 40 | - if ( ! isset( $this->_label ) ) { |
|
| 40 | + if ( !isset($this->_label) ) { |
|
| 41 | 41 | break; |
| 42 | 42 | } |
| 43 | 43 | |
@@ -11,46 +11,46 @@ |
||
| 11 | 11 | */ |
| 12 | 12 | class Marker_Label_Model extends Model_Base { |
| 13 | 13 | |
| 14 | - /** |
|
| 15 | - * @var \Clubdeuce\WPGoogleMaps\Marker_Label |
|
| 16 | - */ |
|
| 17 | - protected $_label; |
|
| 14 | + /** |
|
| 15 | + * @var \Clubdeuce\WPGoogleMaps\Marker_Label |
|
| 16 | + */ |
|
| 17 | + protected $_label; |
|
| 18 | 18 | |
| 19 | - /** |
|
| 20 | - * @return bool |
|
| 21 | - */ |
|
| 22 | - function has_label() { |
|
| 19 | + /** |
|
| 20 | + * @return bool |
|
| 21 | + */ |
|
| 22 | + function has_label() { |
|
| 23 | 23 | |
| 24 | - return $this->_has( '_label' ); |
|
| 24 | + return $this->_has( '_label' ); |
|
| 25 | 25 | |
| 26 | - } |
|
| 26 | + } |
|
| 27 | 27 | |
| 28 | - /** |
|
| 29 | - * @param string $method_name |
|
| 30 | - * @param array $args |
|
| 31 | - * |
|
| 32 | - * @return mixed |
|
| 33 | - */ |
|
| 34 | - function __call( $method_name, $args = array() ) { |
|
| 35 | - $value = null; |
|
| 28 | + /** |
|
| 29 | + * @param string $method_name |
|
| 30 | + * @param array $args |
|
| 31 | + * |
|
| 32 | + * @return mixed |
|
| 33 | + */ |
|
| 34 | + function __call( $method_name, $args = array() ) { |
|
| 35 | + $value = null; |
|
| 36 | 36 | |
| 37 | - do { |
|
| 37 | + do { |
|
| 38 | 38 | |
| 39 | - if ( property_exists( $this, "_{$method_name}" ) ) { |
|
| 40 | - $property = "_{$method_name}"; |
|
| 41 | - $value = $this->{$property}; |
|
| 42 | - break; |
|
| 43 | - } |
|
| 39 | + if ( property_exists( $this, "_{$method_name}" ) ) { |
|
| 40 | + $property = "_{$method_name}"; |
|
| 41 | + $value = $this->{$property}; |
|
| 42 | + break; |
|
| 43 | + } |
|
| 44 | 44 | |
| 45 | - if ( ! isset( $this->_label ) ) { |
|
| 46 | - break; |
|
| 47 | - } |
|
| 45 | + if ( ! isset( $this->_label ) ) { |
|
| 46 | + break; |
|
| 47 | + } |
|
| 48 | 48 | |
| 49 | - $value = call_user_func_array( array( $this->_label, $method_name ), $args ); |
|
| 49 | + $value = call_user_func_array( array( $this->_label, $method_name ), $args ); |
|
| 50 | 50 | |
| 51 | - } while ( false ); |
|
| 51 | + } while ( false ); |
|
| 52 | 52 | |
| 53 | - return $value; |
|
| 54 | - } |
|
| 53 | + return $value; |
|
| 54 | + } |
|
| 55 | 55 | |
| 56 | 56 | } |
@@ -19,19 +19,19 @@ |
||
| 19 | 19 | */ |
| 20 | 20 | class Marker_Label extends \WPLib_Item_Base { |
| 21 | 21 | |
| 22 | - /** |
|
| 23 | - * Marker_Label constructor. |
|
| 24 | - * |
|
| 25 | - * @param array $args |
|
| 26 | - */ |
|
| 27 | - function __construct( $args = array() ) { |
|
| 22 | + /** |
|
| 23 | + * Marker_Label constructor. |
|
| 24 | + * |
|
| 25 | + * @param array $args |
|
| 26 | + */ |
|
| 27 | + function __construct( $args = array() ) { |
|
| 28 | 28 | |
| 29 | - $args = wp_parse_args( $args, array( |
|
| 30 | - 'model' => new Marker_Label_Model( array( 'label' => new \Clubdeuce\WPGoogleMaps\Marker_Label( $args ) ) ), |
|
| 31 | - ) ); |
|
| 29 | + $args = wp_parse_args( $args, array( |
|
| 30 | + 'model' => new Marker_Label_Model( array( 'label' => new \Clubdeuce\WPGoogleMaps\Marker_Label( $args ) ) ), |
|
| 31 | + ) ); |
|
| 32 | 32 | |
| 33 | - parent::__construct( $args ); |
|
| 33 | + parent::__construct( $args ); |
|
| 34 | 34 | |
| 35 | - } |
|
| 35 | + } |
|
| 36 | 36 | |
| 37 | 37 | } |
| 38 | 38 | \ No newline at end of file |
@@ -22,7 +22,7 @@ discard block |
||
| 22 | 22 | */ |
| 23 | 23 | function has_map() { |
| 24 | 24 | |
| 25 | - return $this->_has('_map' ); |
|
| 25 | + return $this->_has( '_map' ); |
|
| 26 | 26 | |
| 27 | 27 | } |
| 28 | 28 | |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | break; |
| 44 | 44 | } |
| 45 | 45 | |
| 46 | - if ( ! isset( $this->_map ) ) { |
|
| 46 | + if ( !isset($this->_map) ) { |
|
| 47 | 47 | break; |
| 48 | 48 | } |
| 49 | 49 | |
@@ -12,45 +12,45 @@ |
||
| 12 | 12 | */ |
| 13 | 13 | class Map_Model extends Model_Base { |
| 14 | 14 | |
| 15 | - /** |
|
| 16 | - * @var WPMap |
|
| 17 | - */ |
|
| 18 | - protected $_map; |
|
| 15 | + /** |
|
| 16 | + * @var WPMap |
|
| 17 | + */ |
|
| 18 | + protected $_map; |
|
| 19 | 19 | |
| 20 | - /** |
|
| 21 | - * @return bool |
|
| 22 | - */ |
|
| 23 | - function has_map() { |
|
| 20 | + /** |
|
| 21 | + * @return bool |
|
| 22 | + */ |
|
| 23 | + function has_map() { |
|
| 24 | 24 | |
| 25 | - return $this->_has('_map' ); |
|
| 25 | + return $this->_has('_map' ); |
|
| 26 | 26 | |
| 27 | - } |
|
| 27 | + } |
|
| 28 | 28 | |
| 29 | - /** |
|
| 30 | - * @param string $method_name |
|
| 31 | - * @param array $args |
|
| 32 | - * |
|
| 33 | - * @return mixed |
|
| 34 | - */ |
|
| 35 | - function __call( $method_name, $args = array() ) { |
|
| 36 | - $value = null; |
|
| 29 | + /** |
|
| 30 | + * @param string $method_name |
|
| 31 | + * @param array $args |
|
| 32 | + * |
|
| 33 | + * @return mixed |
|
| 34 | + */ |
|
| 35 | + function __call( $method_name, $args = array() ) { |
|
| 36 | + $value = null; |
|
| 37 | 37 | |
| 38 | - do { |
|
| 38 | + do { |
|
| 39 | 39 | |
| 40 | - if ( property_exists( $this, "_{$method_name}" ) ) { |
|
| 41 | - $property = "_{$method_name}"; |
|
| 42 | - $value = $this->{$property}; |
|
| 43 | - break; |
|
| 44 | - } |
|
| 40 | + if ( property_exists( $this, "_{$method_name}" ) ) { |
|
| 41 | + $property = "_{$method_name}"; |
|
| 42 | + $value = $this->{$property}; |
|
| 43 | + break; |
|
| 44 | + } |
|
| 45 | 45 | |
| 46 | - if ( ! isset( $this->_map ) ) { |
|
| 47 | - break; |
|
| 48 | - } |
|
| 46 | + if ( ! isset( $this->_map ) ) { |
|
| 47 | + break; |
|
| 48 | + } |
|
| 49 | 49 | |
| 50 | - $value = call_user_func_array( array( $this->_map, $method_name ), $args ); |
|
| 50 | + $value = call_user_func_array( array( $this->_map, $method_name ), $args ); |
|
| 51 | 51 | |
| 52 | - } while ( false ); |
|
| 52 | + } while ( false ); |
|
| 53 | 53 | |
| 54 | - return $value; |
|
| 55 | - } |
|
| 54 | + return $value; |
|
| 55 | + } |
|
| 56 | 56 | } |
@@ -24,19 +24,19 @@ |
||
| 24 | 24 | */ |
| 25 | 25 | class Location extends \WPLib_Item_Base { |
| 26 | 26 | |
| 27 | - /** |
|
| 28 | - * Location constructor. |
|
| 29 | - * |
|
| 30 | - * @param array $args |
|
| 31 | - */ |
|
| 32 | - function __construct( $args = array() ) { |
|
| 27 | + /** |
|
| 28 | + * Location constructor. |
|
| 29 | + * |
|
| 30 | + * @param array $args |
|
| 31 | + */ |
|
| 32 | + function __construct( $args = array() ) { |
|
| 33 | 33 | |
| 34 | - $args = wp_parse_args( $args, array( |
|
| 35 | - 'model' => new Location_Model( array( 'location' => new \Clubdeuce\WPGoogleMaps\Location( $args ) ) ), |
|
| 36 | - ) ); |
|
| 34 | + $args = wp_parse_args( $args, array( |
|
| 35 | + 'model' => new Location_Model( array( 'location' => new \Clubdeuce\WPGoogleMaps\Location( $args ) ) ), |
|
| 36 | + ) ); |
|
| 37 | 37 | |
| 38 | - parent::__construct( $args ); |
|
| 38 | + parent::__construct( $args ); |
|
| 39 | 39 | |
| 40 | - } |
|
| 40 | + } |
|
| 41 | 41 | |
| 42 | 42 | } |
@@ -20,20 +20,20 @@ |
||
| 20 | 20 | */ |
| 21 | 21 | class Marker extends \WPLib_Item_Base { |
| 22 | 22 | |
| 23 | - /** |
|
| 24 | - * Marker_Model constructor. |
|
| 25 | - * |
|
| 26 | - * @param array $args |
|
| 27 | - */ |
|
| 28 | - function __construct( $args = array() ) { |
|
| 23 | + /** |
|
| 24 | + * Marker_Model constructor. |
|
| 25 | + * |
|
| 26 | + * @param array $args |
|
| 27 | + */ |
|
| 28 | + function __construct( $args = array() ) { |
|
| 29 | 29 | |
| 30 | - $args = wp_parse_args( $args, array( |
|
| 31 | - 'model' => new Marker_Model( array( 'marker' => new \Clubdeuce\WPGoogleMaps\Marker( $args ) ) ), |
|
| 32 | - ) ); |
|
| 30 | + $args = wp_parse_args( $args, array( |
|
| 31 | + 'model' => new Marker_Model( array( 'marker' => new \Clubdeuce\WPGoogleMaps\Marker( $args ) ) ), |
|
| 32 | + ) ); |
|
| 33 | 33 | |
| 34 | - parent::__construct( $args ); |
|
| 34 | + parent::__construct( $args ); |
|
| 35 | 35 | |
| 36 | - } |
|
| 36 | + } |
|
| 37 | 37 | |
| 38 | 38 | |
| 39 | 39 | } |