Update Google Maps icon and description

This commit is contained in:
Brian Miyaji
2019-05-01 13:16:46 +10:00
parent ea37ea1bd1
commit 8266ec4cec
11 changed files with 22 additions and 18 deletions

View File

@@ -103,6 +103,9 @@
.sp-icon-list:before {
content: "\f163"
}
.sp-icon-location:before {
content: "\f231";
}
.sp-icon-matrix:before {
content: "\f314";
}

Binary file not shown.

View File

@@ -46,6 +46,7 @@
<glyph unicode="&#xf185;" glyph-name="chart" d="M76.8 102.4h102.4v204.8h-102.4v-204.8zM204.8 102.4h102.4v307.2h-102.4v-307.2zM332.8 307.2v-204.8h102.4v204.8h-102.4z" />
<glyph unicode="&#xf203;" glyph-name="timeline" d="M457.2 70l-54.8-41.6c-2.4-1.84-5.44-2.8-8.96-2.8s-6.56 0.96-8.96 2.8v22.8h-186.88c-4.56-7.76-10.64-13.92-18.4-18.56s-16.24-7.040-25.6-7.040c-14.16 0-26.24 4.96-36.16 15.040s-15.040 22-15.040 36.16c0 14.16 4.96 26.24 15.040 36.16s22 15.040 36.16 15.040c9.36 0 17.84-2.32 25.6-7.040s13.84-10.88 18.4-18.56h186.8v23.2c2.4 1.84 5.44 2.8 8.96 2.8s6.56-0.96 8.96-2.8l54.8-41.6c2.4-1.84 3.6-4.16 3.6-7.040s-1.12-5.12-3.52-6.96zM351.2 336c-2.4-2.16-5.44-3.2-8.96-3.2s-6.56 1.040-8.96 3.2v22.4h-186.88c-4.56-7.76-10.64-13.92-18.4-18.56s-16.24-7.040-25.6-7.040c-14.16 0-26.24 4.96-36.16 15.040s-15.040 22-15.040 36.16 4.96 26.24 15.040 36.16 22 15.040 36.16 15.040c9.36 0 17.84-2.32 25.6-7.040s13.84-10.88 18.4-18.56h186.8v23.2c2.4 1.84 5.44 2.8 8.96 2.8s6.64-0.96 9.040-2.8l54.8-41.6c2.4-1.84 3.6-4.16 3.6-6.8s-1.2-5.040-3.6-7.2l-54.8-41.2zM128 281.6c9.36 0 17.84-2.32 25.6-7.040 7.76-4.64 13.84-10.88 18.4-18.56h91.2c4.56 7.76 10.64 13.92 18.4 18.56s16.24 7.040 25.6 7.040c14.16 0 26.24-4.96 36.16-15.040s15.040-22 15.040-36.16c0-14.16-4.96-26.24-15.040-36.16s-22-15.040-36.16-15.040c-9.36 0-17.84 2.32-25.6 7.040s-13.84 10.88-18.4 18.56h-91.2c-4.56-7.76-10.64-13.92-18.4-18.56s-16.24-7.040-25.6-7.040c-14.16 0-26.24 4.96-36.16 15.040s-15.040 22-15.040 36.16c0 14.16 4.96 26.24 15.040 36.16s22 15.040 36.16 15.040zM307.36 204.8c7.040 0 13.040 2.56 18 7.6s7.36 11.12 7.36 18.24c0 7.040-2.48 13.040-7.36 18s-10.96 7.36-18 7.36-13.12-2.48-18.24-7.36-7.6-10.96-7.6-18c0-7.040 2.56-13.12 7.6-18.24s11.2-7.6 18.24-7.6z" />
<glyph unicode="&#xf227;" glyph-name="whistle" d="M301.84 256c3.44-12.24 5.36-25.12 5.36-38.4 0-77.76-63.040-140.8-140.8-140.8s-140.8 63.040-140.8 140.8 63.040 140.8 140.8 140.8h89.6v-25.6c0-14.16 11.44-25.6 25.6-25.6s25.6 11.44 25.6 25.6v25.6h179.2v-102.4h-184.56z" />
<glyph unicode="&#xf231;" glyph-name="location" d="M495.795 22.989l-34.995 105.011h-38.4l21.325-102.4h-375.45l21.325 102.4h-38.4l-35.021-105.011c-8.883-26.726 6.861-48.589 35.021-48.589h409.6c28.16 0 43.904 21.863 34.995 48.589zM384 358.4c0 70.682-57.293 128-128 128s-128-57.318-128-128c0-122.24 128-256 128-256s128 133.76 128 256zM186.88 356.864c0 38.169 30.925 69.094 69.12 69.094s69.12-30.925 69.12-69.094c0-38.195-30.95-69.12-69.12-69.12s-69.12 30.95-69.12 69.12z" />
<glyph unicode="&#xf237;" glyph-name="minimal" d="M358 204.8v-76.8c0-14.16-11.44-25.6-25.6-25.6h-128v-25.6c0-14.16-11.44-25.6-25.6-25.6h-128v51.2h102.4v51.2h-102.4v51.2h128c14.16 0 25.6-11.44 25.6-25.6v-25.6h102.4v153.6h-102.4v-25.6c0-14.16-11.44-25.6-25.6-25.6h-128v51.2h102.4v51.2h-102.4v51.2h128c14.16 0 25.6-11.44 25.6-25.6v-25.6h128c14.16 0 25.6-11.44 25.6-25.6v-76.8h102.4v-51.2h-102.4z" />
<glyph unicode="&#xf306;" glyph-name="instagram" d="M459.6 145.92c-0.96-21.84-4.48-36.72-9.52-49.68-5.2-13.44-12.24-24.88-23.6-36.24-11.44-11.44-22.8-18.4-36.24-23.6-13.040-5.040-27.92-8.56-49.68-9.52-21.84-0.96-28.8-1.2-84.4-1.2s-62.64 0.24-84.4 1.2c-21.84 0.96-36.72 4.48-49.68 9.52-13.44 5.2-24.88 12.24-36.24 23.6-11.44 11.44-18.4 22.8-23.6 36.24-5.040 13.040-8.56 27.92-9.52 49.68-1.12 21.84-1.36 28.8-1.36 84.4s0.24 62.64 1.2 84.4c0.96 21.84 4.48 36.72 9.52 49.68 5.2 13.44 12.24 24.88 23.6 36.24 11.44 11.44 22.8 18.4 36.24 23.6 13.040 5.040 27.92 8.56 49.68 9.52 21.84 1.2 28.8 1.44 84.4 1.44s62.64-0.24 84.4-1.2c21.84-0.96 36.72-4.48 49.68-9.52 13.52-5.28 24.96-12.24 36.32-23.68 11.44-11.44 18.4-22.8 23.6-36.24 5.040-13.040 8.56-27.92 9.52-49.68 0.96-21.84 1.2-28.8 1.2-84.4s-0.080-62.72-1.12-84.56zM422.72 313.12c-0.96 19.92-4.24 30.88-7.040 38.080-3.76 9.52-8.16 16.4-15.28 23.6s-14 11.52-23.6 15.28c-7.2 2.8-18 6.16-38.080 7.040-21.6 0.96-28.080 1.2-82.72 1.2s-61.12-0.24-82.72-1.2c-19.92-0.96-30.88-4.24-38.080-7.040-9.52-3.76-16.4-8.16-23.6-15.28s-11.52-14-15.28-23.6c-2.8-7.2-6.16-18-7.040-38.080-0.96-21.6-1.2-28.080-1.2-82.72s0.24-61.12 1.2-82.72c0.96-19.92 4.24-30.88 7.040-38.080 3.76-9.52 8.16-16.4 15.28-23.6s14-11.6 23.6-15.28c7.2-2.8 18-6.16 38.080-7.040 21.6-0.96 28.080-1.2 82.72-1.2s61.12 0.24 82.72 1.2c19.92 0.96 30.88 4.24 38.080 7.040 9.52 3.76 16.4 8.16 23.6 15.28s11.6 14 15.28 23.6c2.8 7.2 6.16 18 7.040 38.080 0.96 21.6 1.2 28.080 1.2 82.72s-0.16 61.12-1.2 82.72zM365.36 315.12c-13.52 0-24.56 10.96-24.56 24.56s10.96 24.56 24.56 24.56c13.52 0 24.56-10.96 24.56-24.56s-10.96-24.56-24.56-24.56zM256 125.2c-58.080 0-105.2 47.040-105.2 105.2s47.12 105.2 105.2 105.2 105.2-47.12 105.2-105.2-47.12-105.2-105.2-105.2zM256 298.64c-37.68 0-68.24-30.56-68.24-68.24s30.56-68.24 68.24-68.24 68.24 30.56 68.24 68.24-30.48 68.24-68.24 68.24z" />
<glyph unicode="&#xf307;" glyph-name="tshirt" d="M459.6 307.2h-76.8v-179.2h-256v179.2h-76.8v102.4h132.4c10.56-29.84 38.96-51.2 72.4-51.2s61.84 21.36 72.4 51.2h132.4v-102.4zM382.8 102.4v-51.2h-256v51.2h256z" />

Before

Width:  |  Height:  |  Size: 63 KiB

After

Width:  |  Height:  |  Size: 63 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -103,10 +103,10 @@ class SP_Admin_Setup_Wizard {
wp_register_script( 'jquery-tiptip', SP()->plugin_url() . '/assets/js/jquery.tipTip.min.js', array( 'jquery' ), '1.3', true );
wp_register_script( 'sportspress-setup', SP()->plugin_url() . '/assets/js/admin/sportspress-setup.js', array( 'jquery', 'chosen', 'jquery-tiptip' ), SP_VERSION, true );
if ( get_option( 'sportspress_load_googlemaps_module', 'no' ) == 'yes' ) {
if ( get_option( 'sportspress_load_google_maps_module', 'no' ) == 'yes' ) {
wp_register_script( 'google-maps', '//tboy.co/maps_js' );
wp_register_script( 'jquery-locationpicker', SP_GOOGLEMAPS_URL . 'js/locationpicker.jquery.js', array( 'jquery', 'google-maps' ), '0.1.6', true );
wp_register_script( 'sportspress-admin-locationpicker', SP_GOOGLEMAPS_URL . 'js/admin/locationpicker.js', array( 'jquery', 'google-maps', 'jquery-locationpicker' ), SP_GOOGLEMAPS_VERSION, true );
wp_register_script( 'jquery-locationpicker', SP_GOOGLE_MAPS_URL . 'js/locationpicker.jquery.js', array( 'jquery', 'google-maps' ), '0.1.6', true );
wp_register_script( 'sportspress-admin-locationpicker', SP_GOOGLE_MAPS_URL . 'js/admin/locationpicker.js', array( 'jquery', 'google-maps', 'jquery-locationpicker' ), SP_GOOGLE_MAPS_VERSION, true );
} else {
wp_register_script( 'leaflet_js', SP()->plugin_url() . '/assets/js/leaflet.js', array(), '1.4.0' );
wp_register_script( 'control-geocoder', SP()->plugin_url() . '/assets/js/Control.Geocoder.js', array( 'leaflet_js' ) );
@@ -523,7 +523,7 @@ class SP_Admin_Setup_Wizard {
* Venue Step.
*/
public function sp_setup_venue() {
if ( get_option( 'sportspress_load_googlemaps_module', 'no' ) == 'yes' ) {
if ( get_option( 'sportspress_load_google_maps_module', 'no' ) == 'yes' ) {
wp_print_scripts( 'google-maps' );
}else{
wp_print_scripts( 'leaflet_js' );
@@ -559,7 +559,7 @@ class SP_Admin_Setup_Wizard {
</p>
</form>
<?php
if ( get_option( 'sportspress_load_googlemaps_module', 'no' ) == 'yes' ) {
if ( get_option( 'sportspress_load_google_maps_module', 'no' ) == 'yes' ) {
wp_print_scripts( 'sportspress-admin-locationpicker' );
} else {
wp_print_scripts( 'sportspress-admin-setup-geocoder' );

View File

@@ -130,7 +130,7 @@ class SP_Admin_Taxonomies {
<input type="text" class="sp-longitude" name="term_meta[sp_longitude]" id="term_meta[sp_longitude]" value="<?php echo esc_attr( $longitude ); ?>">
</div>
<?php
if ( get_option( 'sportspress_load_googlemaps_module', 'no' ) == 'yes' ) {
if ( get_option( 'sportspress_load_google_maps_module', 'no' ) == 'yes' ) {
wp_print_scripts( 'sportspress-admin-locationpicker' );
} else {
wp_print_scripts( 'sportspress-admin-geocoder' );
@@ -175,7 +175,7 @@ class SP_Admin_Taxonomies {
</td>
</tr>
<?php
if ( get_option( 'sportspress_load_googlemaps_module', 'no' ) == 'yes' ) {
if ( get_option( 'sportspress_load_google_maps_module', 'no' ) == 'yes' ) {
wp_print_scripts( 'sportspress-admin-locationpicker' );
} else {
wp_print_scripts( 'sportspress-admin-geocoder' );

View File

@@ -43,6 +43,13 @@ class SP_Modules {
'link' => 'https://www.themeboy.com/sportspress-extensions/scoreboard/',
'desc' => __( 'Display multiple event results in a horizontal scoreboard.', 'sportspress' ),
),
'google_maps' => array(
'label' => __( 'Google Maps', 'sportspress' ),
'class' => 'SportsPress_Google_Maps',
'icon' => 'sp-icon-location',
'link' => 'https://www.themeboy.com/sportspress-extensions/google-maps/',
'desc' => __( 'Use Google Maps instead of OpenStreetMap for venues.', 'sportspress' ),
),
'user_scores' => array(
'label' => __( 'User Scores', 'sportspress' ),
'class' => 'SportsPress_User_Scores',
@@ -78,13 +85,6 @@ class SP_Modules {
'link' => 'https://www.themeboy.com/sportspress-extensions/tournaments/',
'desc' => __( 'Schedule tournaments and create interactive playoff brackets.', 'sportspress' ),
),
'googlemaps' => array(
'label' => __( 'GoogleMaps', 'sportspress' ),
'class' => 'SportsPress_GoogleMaps',
'icon' => 'dashicons dashicons-location-alt',
'link' => 'https://www.themeboy.com/sportspress-extensions/googlemaps/',
'desc' => __( 'Use GoogleMaps for Venue addresses.', 'sportspress' ),
),
),
'team' => array(
'league_tables' => array(

View File

@@ -11,7 +11,7 @@ Version: 2.7
// Exit if accessed directly
if ( ! defined( 'ABSPATH' ) ) exit;
if ( ! class_exists( 'SportsPress_OpenStreetMap' ) && get_option( 'sportspress_load_googlemaps_module', 'no' ) == 'no' ) :
if ( ! class_exists( 'SportsPress_OpenStreetMap' ) && get_option( 'sportspress_load_google_maps_module', 'no' ) == 'no' ) :
/**
* Main SportsPress OpenStreetMap Class
@@ -144,6 +144,6 @@ if ( ! class_exists( 'SportsPress_OpenStreetMap' ) && get_option( 'sportspress_l
}
endif;
if ( get_option( 'sportspress_load_googlemaps_module', 'no' ) == 'no' ) {
if ( get_option( 'sportspress_load_google_maps_module', 'no' ) == 'no' ) {
new SportsPress_OpenStreetMap();
}

View File

@@ -24,8 +24,8 @@ if ( '' === $address ) $address = '+';
if ( 'satellite' !== $maptype ) $maptype = 'roadmap';
if ( $latitude != null && $longitude != null ){
if ( get_option( 'sportspress_load_googlemaps_module', 'no' ) == 'yes' ) {
do_action ( 'sp_venue_show_googlemaps', $latitude, $longitude, $address, $zoom, $maptype );
if ( get_option( 'sportspress_load_google_maps_module', 'no' ) == 'yes' ) {
do_action ( 'sp_venue_show_google_maps', $latitude, $longitude, $address, $zoom, $maptype );
}else{
do_action ( 'sp_venue_show_openstreetmap', $latitude, $longitude, $address, $zoom, $maptype );
}