Plugin Directory

Changeset 1552337


Ignore:
Timestamp:
12/12/2016 06:29:57 AM (9 years ago)
Author:
tcoder
Message:

modified assets/screenshot-1.png
modified trunk/img/style-1.png
modified trunk/img/style-2.png
modified trunk/inc/settings.php
modified trunk/plugin-hook.php
modified trunk/readme.txt
modified trunk/uninstall.php
added tags/1.2
added tags/1.2/css
added tags/1.2/css/tcbd-map-css.css
added tags/1.2/img
added tags/1.2/img/style-1.png
added tags/1.2/img/style-2.png
added tags/1.2/inc
added tags/1.2/inc/settings.php
added tags/1.2/js
added tags/1.2/js/icon.png
added tags/1.2/js/tcbd-maplace-0.1.3.min.js
added tags/1.2/js/tinymce.js
added tags/1.2/plugin-hook.php
added tags/1.2/readme.txt
added tags/1.2/uninstall.php
added trunk/img/style-3.png
added trunk/img/style-4.png

Location:
tcbd-google-map
Files:
17 added
7 edited

Legend:

Unmodified
Added
Removed
  • tcbd-google-map/trunk/inc/settings.php

    r1281716 r1552337  
    1919        register_setting( 'TCBD_Google_Map_register_setting', 'tcbd_google_map_style' );
    2020        register_setting( 'TCBD_Google_Map_register_setting', 'tcbd_google_map_scroll_zoom' );
     21        register_setting( 'TCBD_Google_Map_register_setting', 'tcbd_google_map_api_key' );
    2122    }
    2223    add_action( 'admin_init', 'TCBD_Google_Map_register_settings' );
     
    4849        }
    4950       
     51        if( get_option('tcbd_google_map_api_key') ){
     52            $tcbd_google_map_api = get_option('tcbd_google_map_api_key');
     53        }else{
     54            $tcbd_google_map_api = null;
     55        }
     56       
    5057       
    5158        ?>
    5259            <div class="wrap">
    53                 <h2>TCBD Google Map Settings</h2>
     60                <h2 style="margin-bottom: 30px;">TCBD Google Map Settings</h2>
    5461               
    5562                <?php if( isset($_GET['settings-updated']) && $_GET['settings-updated'] ){ ?>
     
    5966                    </div>
    6067                <?php } ?>
     68           
    6169               
    6270                <form method="post" action="options.php">
    6371                    <?php settings_fields( 'TCBD_Google_Map_register_setting' ); ?>
    64                    
     72                   
     73                    <div class="error updated settings-error notice is-dismissible">
     74                        <h1>Important Notification</h1>
     75                        <p></p>
     76                        <p><strong>*ALL* Google Maps now require an API key to function.</strong> <a href="https://googlegeodevelopers.blogspot.co.za/2016/06/building-for-scale-updates-to-google.html" target="_BLANK">You can read more about that here.</a></p>
     77                        <p>Before creating a map please follow these steps:</p>
     78                        <ol>
     79                            <li>
     80                                <a target="_BLANK" href="https://console.developers.google.com/flows/enableapi?apiid=maps_backend,geocoding_backend,directions_backend,distance_matrix_backend,elevation_backend&amp;keyType=CLIENT_SIDE&amp;reusekey=true" class="">Create an API key now (free)</a>
     81                            </li>
     82                            <li>
     83                                Paste your API key and press 'Save Changes'.
     84                            </li>
     85                        </ol>
     86                        <button type="button" class="notice-dismiss"><span class="screen-reader-text">Dismiss this notice.</span></button>
     87                    </div>
     88                   
    6589                    <table class="form-table">
    6690                        <tbody>
    6791                       
    6892                            <tr>
     93                                <th scope="row"><label for="tcbd_google_maps_api_key">Google Map API Key:</label></th>
     94                                <td>
     95                                    <input class="regular-text" name="tcbd_google_map_api_key" type="text" id="tcbd_google_maps_api_key" value="<?php echo esc_attr( $tcbd_google_map_api ); ?>" placeholder="Google Maps JavaScript API Key">
     96                                    <p class="description">Create an API key from <a target="_blank" href="https://console.developers.google.com/flows/enableapi?apiid=maps_backend,geocoding_backend,directions_backend,distance_matrix_backend,elevation_backend&amp;keyType=CLIENT_SIDE&amp;reusekey=true">Here.</a></p>
     97                                </td>
     98                            </tr>
     99                       
     100                            <tr>
    69101                                <th scope="row"><label for="tcbd_google_map_latitude">Latitude Number:</label></th>
    70102                                <td>
     
    83115                           
    84116                            <tr>
    85                                 <th scope="row"><label for="tcbd_google_map_zoom">Map Zoom:</label></th>
     117                                <th scope="row"><label for="tcbd_google_map_zoom">Map Zoom Level:</label></th>
    86118                                <td>
    87119                                    <input class="regular-text" name="tcbd_google_map_zoom" type="text" id="tcbd_google_map_zoom" value="<?php echo esc_attr( $map_zoom ); ?>">
     
    90122                                                       
    91123                            <tr>
    92                                 <th scope="row"><label for="tcbd_google_map_marker">Show Marker:</label></th>
     124                                <th scope="row"><label for="tcbd_google_map_marker">Map Marker:</label></th>
    93125                                <td>
    94126                                    <?php
     
    101133                                    <label for="tcbd_google_map_marker">
    102134                                        <input type="checkbox" id="tcbd_google_map_marker" name="tcbd_google_map_marker" value="1" <?php checked( 1, $show_marker ); ?> >
    103                                         You may turn on/off the Google Map Marker icon.
     135                                        On
    104136                                    </label>
    105137                                </td>
     
    118150                                    <label for="tcbd_google_map_scroll_zoom">
    119151                                        <input type="checkbox" id="tcbd_google_map_scroll_zoom" name="tcbd_google_map_scroll_zoom" value="1" <?php checked( 1, $show_marker ); ?> >
    120                                         You may turn on/off the Google Map Mousewheel Scroll zoom.
     152                                        On
    121153                                    </label>
    122154                                </td>
     
    130162                                            $map_style = get_option( 'tcbd_google_map_style' );
    131163                                        }else{
    132                                             $map_style = 0;
     164                                            $map_style = 1;
    133165                                        }
    134166                                    ?>
    135                                     <label title="Style 1">
    136                                         <input type="radio" name="tcbd_google_map_style" value="0" <?php checked( $map_style, '0' ); ?> > <span class="tcbd-map-text">Style 1</span>
    137                                         <span class="tcbd-map-image"><img src="<?php echo TCBD_GOOGLE_MAP_PLUGIN_URL ?>/img/style-2.png" alt="" /></span>
    138                                     </label>
    139                                     <label title="Style 2">
    140                                         <input id="tcbd_google_map_style" type="radio" name="tcbd_google_map_style" value="1" <?php checked( $map_style, '1' ); ?> > <span class="tcbd-map-text">Style 2</span>
    141                                         <span class="tcbd-map-image"><img src="<?php echo TCBD_GOOGLE_MAP_PLUGIN_URL ?>/img/style-1.png" alt="" /></span>
     167                                    <label style="margin-bottom: 15px;" title="Style 1">
     168                                        <input type="radio" name="tcbd_google_map_style" value="1" <?php checked( $map_style, '1' ); ?> > <span class="tcbd-map-text">Style 1</span>
     169                                        <span class="tcbd-map-image"><img style="margin-top: 10px;" src="<?php echo TCBD_GOOGLE_MAP_PLUGIN_URL ?>/img/style-1.png" alt="" /></span>
     170                                    </label>
     171                                    <label style="margin-bottom: 15px;" title="Style 2">
     172                                        <input id="tcbd_google_map_style" type="radio" name="tcbd_google_map_style" value="2" <?php checked( $map_style, '2' ); ?> > <span class="tcbd-map-text">Style 2</span>
     173                                        <span class="tcbd-map-image"><img style="margin-top: 10px;" src="<?php echo TCBD_GOOGLE_MAP_PLUGIN_URL ?>/img/style-2.png" alt="" /></span>
     174                                    </label>
     175                                    <label style="margin-bottom: 15px;" title="Style 3">
     176                                        <input id="tcbd_google_map_style" type="radio" name="tcbd_google_map_style" value="3" <?php checked( $map_style, '3' ); ?> > <span class="tcbd-map-text">Style 3</span>
     177                                        <span class="tcbd-map-image"><img style="margin-top: 10px;" src="<?php echo TCBD_GOOGLE_MAP_PLUGIN_URL ?>/img/style-3.png" alt="" /></span>
     178                                    </label>
     179                                    <label style="margin-bottom: 15px;" title="Style 4">
     180                                        <input id="tcbd_google_map_style" type="radio" name="tcbd_google_map_style" value="4" <?php checked( $map_style, '4' ); ?> > <span class="tcbd-map-text">Style 4</span>
     181                                        <span class="tcbd-map-image"><img style="margin-top: 10px;" src="<?php echo TCBD_GOOGLE_MAP_PLUGIN_URL ?>/img/style-4.png" alt="" /></span>
    142182                                    </label>
    143183                                </td>
  • tcbd-google-map/trunk/plugin-hook.php

    r1281716 r1552337  
    22/*
    33Plugin Name: TCBD Google Map
    4 Plugin URI: http://demos.tcoderbd.com/wordpress_plugins/tcbd-google-map-awesome-wordpress-plugin/
    5 Description: This plugin will enable google map in your Wordpress theme.
     4Plugin URI: http://tcoderbd.com
     5Description: This plugin will enable awesome google map in your Wordpress theme.
    66Author: Md Touhidul Sadeek
    7 Version: 1.2
     7Version: 2.0
    88Author URI: http://tcoderbd.com
    99*/
     
    9494
    9595function tcbd_fb_scripts(){
     96       
     97    if( get_option('tcbd_google_map_api_key') ){
     98        $tcbd_google_map_api = get_option('tcbd_google_map_api_key');
     99    }
    96100   
    97101    // Google Map API
    98     wp_enqueue_script('tcbd-google-map',  '//maps.google.com/maps/api/js?sensor=false&libraries=geometry&v=3.7');
     102    wp_enqueue_script('tcbd-google-map',  '//maps.google.com/maps/api/js?sensor=false&libraries=geometry&v=3.7&key='.$tcbd_google_map_api.'');
    99103   
    100104    // Latest jQuery WordPress
     
    167171                zoom: <?php echo $map_zoom; ?>
    168172            }]
    169             <?php if( $map_style == 1 ): ?>
     173            <?php if( $map_style == 2 ): ?>
    170174            ,styles: {
    171175                'Night': [{
     
    184188            }
    185189            <?php endif; ?>
    186             <?php if( $scroll_zoom == 1 ): ?>
     190            <?php if( $map_style == 3 ): ?>
     191            ,styles: {
     192                'Night': [
     193                            {
     194                                "featureType": "administrative.locality",
     195                                "elementType": "all",
     196                                "stylers": [
     197                                    {
     198                                        "hue": "#2c2e33"
     199                                    },
     200                                    {
     201                                        "saturation": 7
     202                                    },
     203                                    {
     204                                        "lightness": 19
     205                                    },
     206                                    {
     207                                        "visibility": "on"
     208                                    }
     209                                ]
     210                            },
     211                            {
     212                                "featureType": "landscape",
     213                                "elementType": "all",
     214                                "stylers": [
     215                                    {
     216                                        "hue": "#ffffff"
     217                                    },
     218                                    {
     219                                        "saturation": -100
     220                                    },
     221                                    {
     222                                        "lightness": 100
     223                                    },
     224                                    {
     225                                        "visibility": "simplified"
     226                                    }
     227                                ]
     228                            },
     229                            {
     230                                "featureType": "poi",
     231                                "elementType": "all",
     232                                "stylers": [
     233                                    {
     234                                        "hue": "#ffffff"
     235                                    },
     236                                    {
     237                                        "saturation": -100
     238                                    },
     239                                    {
     240                                        "lightness": 100
     241                                    },
     242                                    {
     243                                        "visibility": "off"
     244                                    }
     245                                ]
     246                            },
     247                            {
     248                                "featureType": "road",
     249                                "elementType": "geometry",
     250                                "stylers": [
     251                                    {
     252                                        "hue": "#bbc0c4"
     253                                    },
     254                                    {
     255                                        "saturation": -93
     256                                    },
     257                                    {
     258                                        "lightness": 31
     259                                    },
     260                                    {
     261                                        "visibility": "simplified"
     262                                    }
     263                                ]
     264                            },
     265                            {
     266                                "featureType": "road",
     267                                "elementType": "labels",
     268                                "stylers": [
     269                                    {
     270                                        "hue": "#bbc0c4"
     271                                    },
     272                                    {
     273                                        "saturation": -93
     274                                    },
     275                                    {
     276                                        "lightness": 31
     277                                    },
     278                                    {
     279                                        "visibility": "on"
     280                                    }
     281                                ]
     282                            },
     283                            {
     284                                "featureType": "road.arterial",
     285                                "elementType": "labels",
     286                                "stylers": [
     287                                    {
     288                                        "hue": "#bbc0c4"
     289                                    },
     290                                    {
     291                                        "saturation": -93
     292                                    },
     293                                    {
     294                                        "lightness": -2
     295                                    },
     296                                    {
     297                                        "visibility": "simplified"
     298                                    }
     299                                ]
     300                            },
     301                            {
     302                                "featureType": "road.local",
     303                                "elementType": "geometry",
     304                                "stylers": [
     305                                    {
     306                                        "hue": "#e9ebed"
     307                                    },
     308                                    {
     309                                        "saturation": -90
     310                                    },
     311                                    {
     312                                        "lightness": -8
     313                                    },
     314                                    {
     315                                        "visibility": "simplified"
     316                                    }
     317                                ]
     318                            },
     319                            {
     320                                "featureType": "transit",
     321                                "elementType": "all",
     322                                "stylers": [
     323                                    {
     324                                        "hue": "#e9ebed"
     325                                    },
     326                                    {
     327                                        "saturation": 10
     328                                    },
     329                                    {
     330                                        "lightness": 69
     331                                    },
     332                                    {
     333                                        "visibility": "on"
     334                                    }
     335                                ]
     336                            },
     337                            {
     338                                "featureType": "water",
     339                                "elementType": "all",
     340                                "stylers": [
     341                                    {
     342                                        "hue": "#e9ebed"
     343                                    },
     344                                    {
     345                                        "saturation": -78
     346                                    },
     347                                    {
     348                                        "lightness": 67
     349                                    },
     350                                    {
     351                                        "visibility": "simplified"
     352                                    }
     353                                ]
     354                            }
     355                        ]
     356            }
     357            <?php endif; ?>
     358            <?php if( $map_style == 4 ): ?>
     359            ,styles: {
     360                'G': [
     361                            {
     362                                "featureType": "all",
     363                                "elementType": "labels.text.fill",
     364                                "stylers": [
     365                                    {
     366                                        "saturation": 36
     367                                    },
     368                                    {
     369                                        "color": "#000000"
     370                                    },
     371                                    {
     372                                        "lightness": 40
     373                                    }
     374                                ]
     375                            },
     376                            {
     377                                "featureType": "all",
     378                                "elementType": "labels.text.stroke",
     379                                "stylers": [
     380                                    {
     381                                        "visibility": "on"
     382                                    },
     383                                    {
     384                                        "color": "#000000"
     385                                    },
     386                                    {
     387                                        "lightness": 16
     388                                    }
     389                                ]
     390                            },
     391                            {
     392                                "featureType": "all",
     393                                "elementType": "labels.icon",
     394                                "stylers": [
     395                                    {
     396                                        "visibility": "off"
     397                                    }
     398                                ]
     399                            },
     400                            {
     401                                "featureType": "administrative",
     402                                "elementType": "geometry.fill",
     403                                "stylers": [
     404                                    {
     405                                        "color": "#000000"
     406                                    },
     407                                    {
     408                                        "lightness": 20
     409                                    }
     410                                ]
     411                            },
     412                            {
     413                                "featureType": "administrative",
     414                                "elementType": "geometry.stroke",
     415                                "stylers": [
     416                                    {
     417                                        "color": "#000000"
     418                                    },
     419                                    {
     420                                        "lightness": 17
     421                                    },
     422                                    {
     423                                        "weight": 1.2
     424                                    }
     425                                ]
     426                            },
     427                            {
     428                                "featureType": "landscape",
     429                                "elementType": "geometry",
     430                                "stylers": [
     431                                    {
     432                                        "color": "#000000"
     433                                    },
     434                                    {
     435                                        "lightness": 20
     436                                    }
     437                                ]
     438                            },
     439                            {
     440                                "featureType": "poi",
     441                                "elementType": "geometry",
     442                                "stylers": [
     443                                    {
     444                                        "color": "#000000"
     445                                    },
     446                                    {
     447                                        "lightness": 21
     448                                    }
     449                                ]
     450                            },
     451                            {
     452                                "featureType": "road.highway",
     453                                "elementType": "geometry.fill",
     454                                "stylers": [
     455                                    {
     456                                        "color": "#000000"
     457                                    },
     458                                    {
     459                                        "lightness": 17
     460                                    }
     461                                ]
     462                            },
     463                            {
     464                                "featureType": "road.highway",
     465                                "elementType": "geometry.stroke",
     466                                "stylers": [
     467                                    {
     468                                        "color": "#000000"
     469                                    },
     470                                    {
     471                                        "lightness": 29
     472                                    },
     473                                    {
     474                                        "weight": 0.2
     475                                    }
     476                                ]
     477                            },
     478                            {
     479                                "featureType": "road.arterial",
     480                                "elementType": "geometry",
     481                                "stylers": [
     482                                    {
     483                                        "color": "#000000"
     484                                    },
     485                                    {
     486                                        "lightness": 18
     487                                    }
     488                                ]
     489                            },
     490                            {
     491                                "featureType": "road.local",
     492                                "elementType": "geometry",
     493                                "stylers": [
     494                                    {
     495                                        "color": "#000000"
     496                                    },
     497                                    {
     498                                        "lightness": 16
     499                                    }
     500                                ]
     501                            },
     502                            {
     503                                "featureType": "transit",
     504                                "elementType": "geometry",
     505                                "stylers": [
     506                                    {
     507                                        "color": "#000000"
     508                                    },
     509                                    {
     510                                        "lightness": 19
     511                                    }
     512                                ]
     513                            },
     514                            {
     515                                "featureType": "water",
     516                                "elementType": "geometry",
     517                                "stylers": [
     518                                    {
     519                                        "color": "#000000"
     520                                    },
     521                                    {
     522                                        "lightness": 17
     523                                    }
     524                                ]
     525                            }
     526                        ]
     527            }
     528            <?php endif; ?>
     529            <?php if( $scroll_zoom == 0 ): ?>
    187530            ,map_options: {
    188531                scrollwheel: false
  • tcbd-google-map/trunk/readme.txt

    r1281716 r1552337  
    33Tags: address, best google maps, best maps, bing maps, cluster, cross-browser, custom google map, custom google maps, directions, easy map, geo, geo-mashup, geocoder, georss, gmaps, google earth, google map, google map plugin, google map short code, google map shortcode, google map widget, google maps, google maps v3, googlemaps, gpx, grouping, kml, latitude, location, location by address, longitude, map, map directions, map markers, map plugin, map short code, map styles, map widget, maps, marker, openstreetmap, panoramio, pin, place, point, polygons, polylines, Post, post map, posts, routes, shape, store locator, streetview, wp google map, wp google maps, wp maps
    44Requires at least: 3.0
    5 Tested up to: 4.3.1
    6 Stable tag: 1.2
     5Tested up to: 4.7
     6Stable tag: 2.0
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    1818* Customizable.
    1919* Map size - width & height.
    20 * Style Map.
     20* Style Map (4 diffrent styles).
    2121* Zoom level.
    2222* Mouse Wheel Scroll Zoom trun on/off.
    2323* Turn on/off Google Map marker.
    2424
    25 = Demo =
    26 
    27 * [Click Here](http://demos.tcoderbd.com/wordpress_plugins/tcbd-google-map-awesome-wordpress-plugin/)
    2825
    2926== Screenshots ==
     
    6461* Mouse Wheel Scroll Zoom trun on/off
    6562
     63= 2.0 =
     64* Google Map Api Key
     65* New 2 map style added
     66* Fix Bugs
     67
  • tcbd-google-map/trunk/uninstall.php

    r1281716 r1552337  
    2020delete_option('tcbd_google_map_style');
    2121delete_option('tcbd_google_map_scroll_zoom');
     22delete_option('tcbd_google_map_api_key');
Note: See TracChangeset for help on using the changeset viewer.