Plugin Directory

Changeset 1691310

Timestamp:
07/05/2017 03:11:23 PM (7 years ago)
Author:
binarygary
Message:

Adds google maps api auto select.

Location:
wp-places/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • wp-places/trunk/WP_Places.php

    r1656022 r1691310  
    44 * Plugin URI:  https://www.binarygary.com/
    55 * Description: Add location data to your WordPress.
    6  * Version:     2.0.6
     6 * Version:     2.
    77 * Author:      Gary Kovar
    88 * Author URI:  https://www.binarygary.com/
     
    1515 *
    1616 * @package WP_Places
    17  * @version 2.0.0
     17 * @version 2..0
    1818 */
    1919
  • wp-places/trunk/includes/class-meta-boxes.php

    r1656022 r1691310  
    5151            add_action( 'cmb2_init', array( $this, 'setup_meta_box' ) );
    5252            add_action( 'admin_head', array( $this, 'legacy_transition' ) );
     53
     54
     55
    5356        }
    5457    }
     
    9295        ) );
    9396
     97
     98
     99
     100
     101
    94102    }
    95103
     
    108116     */
    109117    public function get_google_place_id( $value, $field_args, $field ) {
    110         if ( $this->display_place_information( get_post_meta( $field->object_id, '_wp_places', TRUE ) ) == $value ) {
    111             return get_post_meta( $field->object_id, '_wp_places', TRUE );
    112         }
    113         $search_value = $this->plugin->google_places_api->search( $value );
    114         return $search_value;
     118        if ( ) {
     119            return ;
     120        }
     121
     122        return $;
    115123    }
    116124
     
    131139        if ( ! empty( $value ) ) {
    132140            return $this->plugin->place_data->get_standard_address( $value );
    133         } else {
    134             return null;
    135141        }
    136142    }
     
    148154    function get_current_post_type() {
    149155
    150         //error_log(print_r(get_current_screen(),true));
    151156
    152157        global $post, $typenow, $current_screen;
     
    193198    }
    194199
     200
     201
     202
     203
     204
     205
     206
     207
     208
     209
     210
     211
     212
     213
     214
     215
     216
     217
     218
     219
     220
     221
     222
     223
     224
     225
     226
     227
     228
     229
     230
     231
     232
    195233}
  • wp-places/trunk/includes/class-settings.php

    r1563125 r1691310  
    134134        $old_setting[ 'style' ]                   = get_option( 'WP_Places_CSS' );
    135135        $old_setting[ 'show_div' ]                = get_option( 'WP_Places_Display_Div' );
     136
    136137
    137138        update_option( 'wp_places_settings', $old_setting );
  • wp-places/trunk/includes/map-shortcode.php

    r1563125 r1691310  
    55function wp_places_get_coordinates( $posts = '' ) {
    66
    7     //print_r($posts);
    8 
    9 
    107    if ( count( $posts ) < 2 ) {
    118        return;
     
    1310
    1411    foreach ( $posts as $post ) {
    15 
    16         //$lat=get_post_meta($post, _WP_Places_lat, TRUE);
    17         //$lng=get_post_meta($post, _WP_Places_lng, TRUE);
    18         //$name=get_post_meta($post, _WP_Places_name, TRUE);
    19 
    20         //$apikey=get_option('WP_Places_Google_Id_Setting');
    2112
    2213        if ( $old_meta = get_post_meta( $post->ID, '_WP_Places_meta_Google_response', true ) ) {
     
    3425        $lng  = $placeArray['lng'];
    3526        $name = $placeArray['name'];
    36         //$address="1316 W Adams St. jacksonville FL 32204";
    3727        setup_postdata( $post );
    3828        $description = $placeArray['formattedAddress'];
     
    5646    }
    5747
    58     //print_r($arr);
    59 
    60     echo "<a href=#reviews>View Articles</a>";
     48    echo '<a href=#reviews>View Articles</a>';
    6149    echo "<script src=\"https://maps.googleapis.com/maps/api/js?key=AIzaSyB0s2HTycYFSdIce8nkkXuWy5Is9IA3Q54&callback=initMap\" async defer></script>";
    6250    echo "<script>
  • wp-places/trunk/readme.txt

    r1656022 r1691310  
    22Contributors: binarygary
    33Tags: Google Places, Business Information, Location, Google Places API Web Services
    4 Stable Tag: 2.0.6
     4Stable Tag: 2.
    55Requires at least: 4.0
    6 Tested up to: 4.7
     6Tested up to: 4.
    77License: GPLv3 or later
    88License URI: https://www.gnu.org/licenses/gpl.html
    9 
    109
    1110WP_Places populates up-to-the-minute information about almost any location or business. Display address, phone number, hours of operation, and website.
     
    1312== Description ==
    1413
    15 If you find you regularly write blog posts about (local?) businesses you might want to provide info such as hours, phone number, address to your users.  However, this can be difficult to keep current.  Fortunately Google offers an API called Google Places API Web Service.   Google Place API Web Service allows you to Add up-to-date information about millions of locations. 
     14If you find you regularly write blog posts about (local?)
    1615
    1716WP_Places Plugin requires a Google Places API Web Service Key. However, at the time of writing the API key is free and provides up to 1,000 requests per 24 hour period. If you verify your identity (by providing Google a Credit Card) they will increase your daily request per 24 hours to 150,000.
     
    4544== Changelog ==
    4645
     46
     47
     48
     49
     50
    4751= 2.0.6 =
    4852* Fixes bug related to losing google place ID.
     
    5256
    5357= 2.0.4 =
    54 * Adds support for including in custom CPT.
     58* Adds support for including in CPT.
    5559
    5660= 2.0.0 =
Note: See TracChangeset for help on using the changeset viewer.