diff --git a/wp-plugin/gancio.php b/wp-plugin/gancio.php index 662c0928..fadcab6b 100644 --- a/wp-plugin/gancio.php +++ b/wp-plugin/gancio.php @@ -3,7 +3,7 @@ Plugin Name: WPGancio Plugin URI: https://gancio.org Description: Connects an user of a gancio instance to a Wordpress user so that published events are automatically pushed with Gancio API. -Version: 1.10 +Version: 1.12 Author: Gancio License: AGPL 3.0 diff --git a/wp-plugin/oauth.php b/wp-plugin/oauth.php index a39d3db5..3e1976a6 100644 --- a/wp-plugin/oauth.php +++ b/wp-plugin/oauth.php @@ -8,10 +8,8 @@ add_action('eventorganiser_save_event', 'wpgancio_eo_save_event', 15); function wpgancio_eo_save_event ($post_id) { $event = get_post( $post_id ); - printf(eo_get_share($post_id)); // do not save if it's a draft - if ($event->post_status != 'publish' || !eo_get_share($post_id) ) { - printf("This event shouldn't be shared"); + if ($event->post_status != 'publish') { return; } @@ -25,16 +23,12 @@ function wpgancio_eo_save_event ($post_id) { $tags = array_map('tagName', $tmp_tags); } - - $gancio_id = get_post_meta($post_id, 'wpgancio_gancio_id', TRUE); - $start_datetime = eo_get_schedule_start( 'U', $post_id ); // get place details $venue_id = eo_get_venue($post_id); $place_name = eo_get_venue_name($venue_id); $place_address = eo_get_venue_address($venue_id); - $instance_url = get_option('wpgancio_instance_url') ?: get_site_option('wpgancio_instance_url'); $body = array ( 'title' => $event->post_title, @@ -52,9 +46,6 @@ function wpgancio_eo_save_event ($post_id) { } wpgancio_send_event_to_instance($body, $post_id); - - set_transient("wpgancio_message_{$post_id}", "Event updated. {$event_url}"); - update_post_meta($post_id, 'wpgancio_gancio_id', intval($data->id)); } add_action('wp_trash_post', 'wpgancio_eo_delete_post', 15); @@ -100,10 +91,6 @@ function wpgancio_tec_save_event($post_id) { $tags = array_map('tagName', $tmp_tags); } - // gancio instance details - $gancio_id = get_post_meta($post_id, 'wpgancio_gancio_id', TRUE); - $instance_url = get_option('wpgancio_instance_url') ?: get_site_option('wpgancio_instance_url'); - // get the event start time // the timestamp generated byt the plugin function is 2h shifted, substract 7200 s --> 2h $start_datetime = strtotime(tribe_get_start_date( $event, true, Tribe__Date_Utils::DBDATETIMEFORMAT )) - 7200; diff --git a/wp-plugin/readme.txt b/wp-plugin/readme.txt index 873d1eb8..390c56fd 100644 --- a/wp-plugin/readme.txt +++ b/wp-plugin/readme.txt @@ -3,8 +3,8 @@ Contributors: lesion, nutria Donate link: https://gancio.org Tags: events, gancio, fediverse, AP, activity pub Requires at least: 4.7 -Tested up to: 6.4 -Stable tag: 1.10 +Tested up to: 6.5 +Stable tag: 1.12 Requires PHP: 7.0 License: AGPLv3 or later License URI: https://www.gnu.org/licenses/agpl-3.0.html @@ -19,6 +19,9 @@ for this to work an event manager plugin is required, [Event Organiser](https:// == Changelog == += 1.12 = +* Restore Event Organizer functionality + = 1.11 = * Add support to The Events Calendar WordPress plugin