Changeset 1746651
- Timestamp:
- 10/15/2017 09:57:49 AM (8 years ago)
- Location:
- geocoded-posts/trunk
- Files:
-
- 4 edited
-
geocoded-posts.php (modified) (1 diff)
-
includes/class-geocoded-posts-editor.php (modified) (1 diff)
-
includes/class-geocoded-posts-geocoder.php (modified) (1 diff)
-
readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
geocoded-posts/trunk/geocoded-posts.php
r1657008 r1746651 11 11 * Plugin URI: https://github.com/svrooij/wp-geocoded-posts 12 12 * Description: Widget with geocoded posts and editing geo location on a post. 13 * Version: 0.0. 413 * Version: 0.0.5 14 14 * Author: Stephan van Rooij 15 15 * Author URI: https://svrooij.nl -
geocoded-posts/trunk/includes/class-geocoded-posts-editor.php
r1657008 r1746651 119 119 120 120 // Update the meta field in the database. 121 update_post_meta( $post_id, 'geo_locality', strip_tags($_POST['geocoded_posts_locality'])); 121 if(!empty($_POST['geocoded_posts_locality'])){ 122 update_post_meta( $post_id, 'geo_locality', strip_tags($_POST['geocoded_posts_locality'])); 123 } 122 124 update_post_meta( $post_id, 'geo_latitude', $latitude ); 123 125 update_post_meta( $post_id, 'geo_longitude', $longitude ); 126 127 // Who would want to add a location and not set it to public...?? 128 if(0==$public && !get_post_meta($post_id,'geo_public',true)){ 129 $public = 1; 130 } 124 131 update_post_meta( $post_id, 'geo_public', $public ); 125 132 } -
geocoded-posts/trunk/includes/class-geocoded-posts-geocoder.php
r1657008 r1746651 108 108 $fetched_locality = $localityObjs[$right_key]->formatted_address; 109 109 update_post_meta($post_id, 'geo_locality', $fetched_locality); 110 111 // Set the location to public, the Wordpress App doesn't do this when connected through wordpress.com 112 add_post_meta($post_id,'geo_public',1); 113 110 114 } catch(Exception $e){ 111 115 if(WP_DEBUG){ -
geocoded-posts/trunk/readme.txt
r1657008 r1746651 4 4 Tags: geocode, location, metadata 5 5 Requires at least: 4.4 6 Tested up to: 4. 7.47 Stable tag: 0.0. 46 Tested up to: 4.8.2 7 Stable tag: 0.0.5 8 8 License: MIT 9 9 License URI: https://raw.githubusercontent.com/svrooij/wp-geocoded-posts/master/LICENSE … … 21 21 - Showing a widget with the latest x (configurable number) posts that have a geolocation. 22 22 - Automatically looking up the locality of a new post. 23 - Exposing a 'geo' object for each post in the REST api with 'latitude', 'longitude' and 'locality' 23 - Exposing a 'geo' object for each post in the REST api with 'latitude', 'longitude' and 'locality'. 24 - Posts from the mobile app connected through wordpress.com get the geo_public set automatically. 24 25 25 26 Things that are on my wish list are: 26 27 27 - Manually bulk geocoding old posts 28 - Manually bulk geocoding old posts. 28 29 - Make the widget work with the api, so it will work with static html. 29 30 - Displaying the geocoded posts on a map with a shortcode or something. … … 45 46 == Changelog == 46 47 48 = 0.0.5 = 49 * Setting 'geo_public' to 1 when a post comes in through wordpress.com 50 * If you add a location it is set to public by default. 51 47 52 = 0.0.4 = 48 53 * Automatically create (and restore) backup location, in case the mobile app updates the location to 0,0.
Note: See TracChangeset
for help on using the changeset viewer.