diff --git a/README.md b/README.md index 77a13f8..a58b05f 100755 --- a/README.md +++ b/README.md @@ -1,9 +1,10 @@ # Simple Location # **Contributors:** dshanske **Tags:** geolocation, geo, maps, location, indieweb -**Stable tag:** 3.2.1 +**Stable tag:** 3.2.2 **Requires at least:** 4.7 -**Tested up to:** 4.8.1 +**Tested up to:** 4.8.2 +**Requires PHP:** 5.3 **License:** GPLv2 or later **License URI:** http://www.gnu.org/licenses/gpl-2.0.html @@ -50,6 +51,9 @@ will now be required to show maps for services that require API keys. ## Changelog ## +### Version 3.2.2 ### + * Allow setting timezone from Micropub posts(requires update to Micropub plugin) + ### Version 3.2.1 ### * Show settings for current default map provider only * Add style settings for each map provider ( props @miklb ) diff --git a/includes/class-post-timezone.php b/includes/class-post-timezone.php index f4ffda5..c0eea64 100644 --- a/includes/class-post-timezone.php +++ b/includes/class-post-timezone.php @@ -10,6 +10,13 @@ public static function init() { add_filter( 'get_the_modified_time' , array( 'Post_Timezone', 'get_the_time' ), 12, 2 ); add_action( 'post_submitbox_misc_actions', array( 'Post_Timezone', 'post_submitbox' ) ); add_action( 'save_post', array( 'Post_Timezone', 'postbox_save_post_meta' ) ); + add_action( 'after_micropub', array( 'Post_Timezone', 'after_micropub' ), 10, 2 ); + } + + public static function after_micropub( $input, $args ) { + if ( array_key_exists( 'timezone', $args ) ) { + update_post_meta( $args['ID'], 'geo_timezone', $args['timezone'] ); + } } public static function post_submitbox() { diff --git a/languages/simple-location.pot b/languages/simple-location.pot index 35d615f..c4bb291 100644 --- a/languages/simple-location.pot +++ b/languages/simple-location.pot @@ -2,9 +2,9 @@ # This file is distributed under the same license as the Simple Location package. msgid "" msgstr "" -"Project-Id-Version: Simple Location 3.2.1\n" +"Project-Id-Version: Simple Location 3.2.2\n" "Report-Msgid-Bugs-To: http://wordpress.org/support/plugin/simple-location\n" -"POT-Creation-Date: 2017-08-20 05:41:04+00:00\n" +"POT-Creation-Date: 2017-10-17 21:13:39+00:00\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -221,7 +221,7 @@ msgstr "" msgid "Location: " msgstr "" -#: includes/class-post-timezone.php:34 +#: includes/class-post-timezone.php:41 msgid "Timezone:" msgstr "" diff --git a/readme.txt b/readme.txt index 28db2c1..bf051ca 100755 --- a/readme.txt +++ b/readme.txt @@ -1,9 +1,10 @@ === Simple Location === Contributors: dshanske Tags: geolocation, geo, maps, location, indieweb -Stable tag: 3.2.1 +Stable tag: 3.2.2 Requires at least: 4.7 -Tested up to: 4.8.1 +Tested up to: 4.8.2 +Requires PHP: 5.3 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html @@ -50,6 +51,9 @@ will now be required to show maps for services that require API keys. == Changelog == += Version 3.2.2 = + * Allow setting timezone from Micropub posts(requires update to Micropub plugin) + = Version 3.2.1 = * Show settings for current default map provider only * Add style settings for each map provider ( props @miklb ) diff --git a/simple-location.php b/simple-location.php index 1da9e2f..518d8db 100755 --- a/simple-location.php +++ b/simple-location.php @@ -3,7 +3,7 @@ * Plugin Name: Simple Location * Plugin URI: https://wordpress.org/plugins/simple-location/ * Description: Adds Location to Wordpress - * Version: 3.2.1 + * Version: 3.2.2 * Author: David Shanske * Author URI: https://david.shanske.com * Text Domain: simple-location @@ -20,7 +20,7 @@ class Simple_Location_Plugin { - public static $version = '3.2.1'; + public static $version = '3.2.2'; public static function activate() { require_once( plugin_dir_path( __FILE__ ) . 'includes/class-geo-data.php' );