Skip to content

Commit

Permalink
release: new version
Browse files Browse the repository at this point in the history
### Info
- Update WP tested up to version
- Added two new hooks `rop_before_prepare_post` and `rop_before_share` that fire before post is shared
- Clean up some old options from version < 8.0 when housekeeping option is turned on
  • Loading branch information
UVLabs authored Apr 21, 2022
2 parents 91ea5e9 + 983833c commit 4f25fb7
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 1 deletion.
2 changes: 2 additions & 0 deletions includes/admin/class-rop-admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -1125,6 +1125,7 @@ public function rop_cron_job() {
continue;
}

do_action( 'rop_before_prepare_post', $post );
$post_data = $queue->prepare_post_object( $post, $account );

if ( $revive_network_active ) {
Expand All @@ -1149,6 +1150,7 @@ public function rop_cron_job() {
$duplicate = $posts_selector_model->buffer_has_post_id( $account, $post );

if ( $duplicate === false ) {
do_action( 'rop_before_share', $post_data );
$response = $service->share( $post_data, $account_data );
} else {
$logger->info( Rop_I18n::get_labels( 'sharing.post_already_shared' ), array( 'extra' => $post_data ) );
Expand Down
4 changes: 4 additions & 0 deletions includes/admin/services/class-rop-linkedin-service.php
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,10 @@ public function authenticate( $args ) {

$api = $this->get_api( $args['client_id'], $args['secret'] );

if( ! is_object( $api ) ){
return false;
}

$this->credentials['token'] = $token;
$this->credentials['client_id'] = $args['client_id'];
$this->credentials['secret'] = $args['secret'];
Expand Down
2 changes: 1 addition & 1 deletion tweet-old-post.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
* Author: revive.social
* Author URI: https://revive.social/
* Requires at least: 3.5
* Tested up to: 5.7
* Tested up to: 5.9
* Stable tag: trunk
* WordPress Available: yes
* Pro Slug: tweet-old-post-pro
Expand Down
23 changes: 23 additions & 0 deletions uninstall.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,35 @@
'rop_facebook_via_rs_app',
'rop_twitter_via_rs_app',
'rop_linkedin_via_rs_app',
'rop_db_version',
'rop_pro_db_version',
'rop_first_install_date',
'rop_first_install_version',
'rop_linkedin_refresh_token_notice',
'rop_buffer_via_rs_app',
'rop_tumblr_via_rs_app',
'rop_data_migrated_tax',
'rop_changed_shortener',
/**
* Old ROP options
*/
'cwp_topnew_active_status',
'cwp_topnew_notice',
'cwp_top_app_id',
'cwp_top_app_secret',
'cwp_top_consumer_key_tumblr',
'cwp_top_consumer_secret_tumblr',
'cwp_top_consumer_url_tumblr',
'cwp_top_global_schedule',
'cwp_top_lk_app_id',
'cwp_top_lk_app_secret',
'cwp_top_logged_in_users',
'cwp_top_oauth_token',
'cwp_top_oauth_token_secret',
'cwp_top_oauth_token_secret_tumblr',
'cwp_top_oauth_token_tumblr',
'top_settings',

/**
* Related functions
*
Expand Down

0 comments on commit 4f25fb7

Please sign in to comment.