Changeset 1691310
- Timestamp:
- 07/05/2017 03:11:23 PM (7 years ago)
- Location:
- wp-places/trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
wp-places/trunk/WP_Places.php
r1656022 r1691310 4 4 * Plugin URI: https://www.binarygary.com/ 5 5 * Description: Add location data to your WordPress. 6 * Version: 2. 0.66 * Version: 2. 7 7 * Author: Gary Kovar 8 8 * Author URI: https://www.binarygary.com/ … … 15 15 * 16 16 * @package WP_Places 17 * @version 2. 0.017 * @version 2..0 18 18 */ 19 19 -
wp-places/trunk/includes/class-meta-boxes.php
r1656022 r1691310 51 51 add_action( 'cmb2_init', array( $this, 'setup_meta_box' ) ); 52 52 add_action( 'admin_head', array( $this, 'legacy_transition' ) ); 53 54 55 53 56 } 54 57 } … … 92 95 ) ); 93 96 97 98 99 100 101 94 102 } 95 103 … … 108 116 */ 109 117 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 $; 115 123 } 116 124 … … 131 139 if ( ! empty( $value ) ) { 132 140 return $this->plugin->place_data->get_standard_address( $value ); 133 } else {134 return null;135 141 } 136 142 } … … 148 154 function get_current_post_type() { 149 155 150 //error_log(print_r(get_current_screen(),true));151 156 152 157 global $post, $typenow, $current_screen; … … 193 198 } 194 199 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 195 233 } -
wp-places/trunk/includes/class-settings.php
r1563125 r1691310 134 134 $old_setting[ 'style' ] = get_option( 'WP_Places_CSS' ); 135 135 $old_setting[ 'show_div' ] = get_option( 'WP_Places_Display_Div' ); 136 136 137 137 138 update_option( 'wp_places_settings', $old_setting ); -
wp-places/trunk/includes/map-shortcode.php
r1563125 r1691310 5 5 function wp_places_get_coordinates( $posts = '' ) { 6 6 7 //print_r($posts);8 9 10 7 if ( count( $posts ) < 2 ) { 11 8 return; … … 13 10 14 11 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');21 12 22 13 if ( $old_meta = get_post_meta( $post->ID, '_WP_Places_meta_Google_response', true ) ) { … … 34 25 $lng = $placeArray['lng']; 35 26 $name = $placeArray['name']; 36 //$address="1316 W Adams St. jacksonville FL 32204";37 27 setup_postdata( $post ); 38 28 $description = $placeArray['formattedAddress']; … … 56 46 } 57 47 58 //print_r($arr); 59 60 echo "<a href=#reviews>View Articles</a>"; 48 echo '<a href=#reviews>View Articles</a>'; 61 49 echo "<script src=\"https://maps.googleapis.com/maps/api/js?key=AIzaSyB0s2HTycYFSdIce8nkkXuWy5Is9IA3Q54&callback=initMap\" async defer></script>"; 62 50 echo "<script> -
wp-places/trunk/readme.txt
r1656022 r1691310 2 2 Contributors: binarygary 3 3 Tags: Google Places, Business Information, Location, Google Places API Web Services 4 Stable Tag: 2. 0.64 Stable Tag: 2. 5 5 Requires at least: 4.0 6 Tested up to: 4. 76 Tested up to: 4. 7 7 License: GPLv3 or later 8 8 License URI: https://www.gnu.org/licenses/gpl.html 9 10 9 11 10 WP_Places populates up-to-the-minute information about almost any location or business. Display address, phone number, hours of operation, and website. … … 13 12 == Description == 14 13 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.14 If you find you regularly write blog posts about (local?) 16 15 17 16 WP_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. … … 45 44 == Changelog == 46 45 46 47 48 49 50 47 51 = 2.0.6 = 48 52 * Fixes bug related to losing google place ID. … … 52 56 53 57 = 2.0.4 = 54 * Adds support for including in customCPT.58 * Adds support for including in CPT. 55 59 56 60 = 2.0.0 =
Note: See TracChangeset
for help on using the changeset viewer.