17 changes: 11 additions & 6 deletions assets/js/build/dashboard.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/js/build/dashboard.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion composer.json
Expand Up @@ -23,7 +23,7 @@
"build": "sh bin/dist.sh",
"test": "vendor/bin/phpunit",
"lint": "vendor/bin/phpcs",
"beautify": "vendor/bin/phpcbf"
"format": "vendor/bin/phpcbf"
},
"autoload": {
"files": [
Expand Down
31 changes: 26 additions & 5 deletions includes/admin/class-rop-admin.php
Expand Up @@ -1573,8 +1573,8 @@ public function rop_wpml_filter_accounts( $post_id, $share_to_accounts ) {
foreach ( $share_to_accounts as $account_id ) {

$rop_account_post_format = $post_format_model->get_post_format( $account_id );
if( empty( $rop_account_post_format['wpml_language'] ) ){

if ( empty( $rop_account_post_format['wpml_language'] ) ) {
continue;
};

Expand All @@ -1583,10 +1583,9 @@ public function rop_wpml_filter_accounts( $post_id, $share_to_accounts ) {
if ( $post_lang_code === $rop_account_lang_code ) {
$filtered_share_to_accounts[] = $account_id;
}

}

return empty($filtered_share_to_accounts) ? $share_to_accounts : $filtered_share_to_accounts;
return empty( $filtered_share_to_accounts ) ? $share_to_accounts : $filtered_share_to_accounts;

}

Expand Down Expand Up @@ -1619,7 +1618,6 @@ public function rop_hide_pinterest_network_btn() {

}


/**
* Hides the pinterest account button
*
Expand All @@ -1640,5 +1638,28 @@ public function rop_is_edit_post_screen() {

}

/**
* Hide and remove remote cron feature.
*
* This feature will be discontinued.
*
* @since 9.0.4
* @access public
*/
public function rop_remove_remote_cron() {

$installed_at_version = get_option( 'rop_first_install_version' );

if ( empty( $installed_at_version ) ) {
return false;
}

if ( version_compare( $installed_at_version, '9.0.3', '<=' ) ) {
delete_option( 'rop_use_remote_cron' );
delete_option( 'rop_is_sharing_cron_active' );
delete_option( 'rop_remote_cron_terms_agree' );
delete_option( 'rop_access_token' );
}

}
}
8 changes: 4 additions & 4 deletions includes/admin/models/class-rop-posts-selector-model.php
Expand Up @@ -735,9 +735,9 @@ public function rop_wpml_id( $post_id, $account_id = '' ) {
}

if ( ! empty( $rop_account_lang_code ) ) {
$lang_code = apply_filters( 'rop_wpml_lang', $rop_account_lang_code);
$lang_code = apply_filters( 'rop_wpml_lang', $rop_account_lang_code );
}

if ( is_array( $post_id ) ) {

$post = array();
Expand Down Expand Up @@ -786,7 +786,7 @@ public function rop_wpml_id( $post_id, $account_id = '' ) {
* @access public
*/
public function rop_wpml_link( $url, $account_id ) {

$default_lang = apply_filters( 'wpml_default_language', null );
$lang_code = '';

Expand All @@ -800,7 +800,7 @@ public function rop_wpml_link( $url, $account_id ) {
}

if ( ! empty( $rop_account_lang_code ) ) {
$lang_code = apply_filters( 'rop_wpml_lang', $rop_account_lang_code);
$lang_code = apply_filters( 'rop_wpml_lang', $rop_account_lang_code );
}

$wpml_url = apply_filters( 'wpml_permalink', $url, $lang_code );
Expand Down
10 changes: 6 additions & 4 deletions includes/admin/services/class-rop-gmb-service.php
Expand Up @@ -309,6 +309,7 @@ private function gmb_image_post( $post_details, $args, $new_post ) {
$locale = get_locale();

$new_post->setLanguageCode( $locale );
$new_post->setTopicType( 'STANDARD' );

if ( ! empty( $post_details['post_url'] ) ) {
$action_type = apply_filters( 'rop_gmb_action_type', 'LEARN_MORE' );
Expand Down Expand Up @@ -354,8 +355,8 @@ private function gmb_text_post( $post_details, $args, $new_post ) {
$locale = get_locale();

$new_post->setLanguageCode( $locale );

$new_post->setSummary( $post_details['content'] );
$new_post->setTopicType( 'STANDARD' );
$new_post->setSummary( $post_details['content'] );

return $new_post;

Expand Down Expand Up @@ -388,7 +389,7 @@ private function gmb_article_post( $post_details, $args, $new_post ) {
$url = $this->get_url( $post_details );

$new_post->setLanguageCode( $locale );

$new_post->setTopicType( 'STANDARD' );
$new_post->setSummary( $post_details['content'] );

$call_to_action = new Google_Service_MyBusiness_CallToAction();
Expand Down Expand Up @@ -430,7 +431,7 @@ private function gmb_link_with_no_image_post( $post_details, $args, $new_post )
$url = $this->get_url( $post_details );

$new_post->setLanguageCode( $locale );

$new_post->setTopicType( 'STANDARD' );
$new_post->setSummary( $post_details['content'] );

$call_to_action = new Google_Service_MyBusiness_CallToAction();
Expand Down Expand Up @@ -483,6 +484,7 @@ public function share( $post_details, $args = array() ) {

$access_token = $this->gmb_refresh_access_token();
$client->setAccessToken( $access_token );
$client->setApiFormatV2( true );

$post_id = $post_details['post_id'];
$post_url = $post_details['post_url'];
Expand Down
4 changes: 3 additions & 1 deletion includes/class-rop.php
Expand Up @@ -68,7 +68,7 @@ class Rop {
public function __construct() {

$this->plugin_name = 'rop';
$this->version = '9.0.3';
$this->version = '9.0.4';

$this->load_dependencies();
$this->set_locale();
Expand Down Expand Up @@ -137,6 +137,8 @@ private function define_admin_hooks() {
$this->loader->add_action( 'admin_notices', $plugin_admin, 'rop_cron_event_status_notice' );
$this->loader->add_action( 'admin_notices', $plugin_admin_notices, 'rop_revive_network_nag_delayed' );

$this->loader->add_action( 'admin_init', $plugin_admin, 'rop_remove_remote_cron' );

$this->loader->add_action( 'admin_init', $plugin_admin, 'rop_dismiss_linkedin_api_v2_notice' );
$this->loader->add_action( 'admin_notices', $plugin_admin, 'rop_linkedin_api_v2_notice' );
$this->loader->add_action( 'admin_notices', $plugin_admin, 'bitly_shortener_upgrade_notice' );
Expand Down
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "tweet-old-post",
"version": "9.0.3",
"version": "9.0.4",
"description": "Tweet Old Posts plugin",
"repository": {
"type": "git",
Expand Down
14 changes: 13 additions & 1 deletion readme.txt
Expand Up @@ -2,7 +2,7 @@
Contributors: codeinwp,marius2012,marius_codeinwp,hardeepasrani,Madalin_Themeisle, rsocial, uriahs-victor
Tags: share to social media, auto publish, auto post, social media scheduling, social media auto posting, social media marketing, social media automation, social media sharing
Requires at least: 4.7
Tested up to: 5.7
Tested up to: 5.8
Requires PHP: 7.1
Stable tag: trunk

Expand Down Expand Up @@ -299,6 +299,18 @@ http://revive.social/plugins/revive-old-post

== Changelog ==

##### [Version 9.0.4](https://github.com/Codeinwp/tweet-old-post/compare/v9.0.3...v9.0.4) (2021-08-17)

### Fixes
- Google My Business posts were not sharing because of missing Topic Type field

### Changes
- Turned off Remote Cron feature. Use [this doc](https://docs.revive.social/article/686-fix-revive-old-post-not-posting) if you have issues where your posts aren't sharing.
- Google My Business errors will now return more information with details on why the post didn't share.




##### [Version 9.0.3](https://github.com/Codeinwp/tweet-old-post/compare/v9.0.2...v9.0.3) (2021-06-24)

### Fixes
Expand Down
4 changes: 2 additions & 2 deletions tweet-old-post.php
Expand Up @@ -16,7 +16,7 @@
* Plugin Name: Revive Old Posts
* Plugin URI: https://revive.social/
* Description: WordPress plugin that helps you to keeps your old posts alive by sharing them and driving more traffic to them from twitter/facebook or linkedin. It also helps you to promote your content. You can set time and no of posts to share to drive more traffic.For questions, comments, or feature requests, <a href="http://revive.social/support/?utm_source=plugindesc&utm_medium=announce&utm_campaign=top">contact </a> us!
* Version: 9.0.3
* Version: 9.0.4
* Author: revive.social
* Author URI: https://revive.social/
* Requires at least: 3.5
Expand Down Expand Up @@ -162,7 +162,7 @@ function run_rop() {
define( 'ROP_CRON_ALTERNATIVE', $use_remote_cron );

define( 'ROP_PRO_URL', 'http://revive.social/plugins/revive-old-post/' );
define( 'ROP_LITE_VERSION', '9.0.3' );
define( 'ROP_LITE_VERSION', '9.0.4' );
define( 'ROP_LITE_BASE_FILE', __FILE__ );
$debug = false;
if ( function_exists( 'wp_get_environment_type' ) ) {
Expand Down
15 changes: 10 additions & 5 deletions vue/src/vue-elements/settings-tab-panel.vue
Expand Up @@ -2,14 +2,15 @@
<div class="tab-view">
<div class="panel-body">
<div class="container" :class="'rop-tab-state-'+is_loading">
<div class="columns py-2" v-if="this.apply_exclude_limit_cron" >
<!-- Disabled Remote Cron feature and left code commented out -->
<!-- <div class="columns py-2" v-if="this.apply_exclude_limit_cron" >
<div class="column col-6 col-sm-12 vertical-align rop-control">
<b>{{labels.cron_type_label}}</b>
<p class="text-gray"><span v-html="labels.cron_type_label_desc"></span></p>
</div>
<div class="column col-6 col-sm-12 vertical-align text-left rop-control">
<div class="form-group">
<!-- @category New Cron System -->
<div style="padding: 10px; text-align: left;">
<toggle-button
:value="rop_cron_remote"
Expand All @@ -34,8 +35,8 @@
<small v-html="labels.cron_type_notice"></small>
</div>
</div>
</div>
<span class="divider" v-if="this.apply_exclude_limit_cron && ! isBiz" ></span>
</div> -->
<!-- <span class="divider" v-if="this.apply_exclude_limit_cron && ! isBiz" ></span> -->

<!-- Minimum interval between shares -->

Expand All @@ -50,7 +51,11 @@

</div>
</div>
<span class="divider"></span>

<span class="divider" v-if="! isBiz"></span>

<!-- Min Post Age -->

<div class="columns py-2">
<div class="column col-6 col-sm-12 vertical-align">
<b>{{labels.min_days_title}}</b>
Expand Down