Plugin Directory

Changeset 2434579


Ignore:
Timestamp:
12/08/2020 07:11:38 PM (5 years ago)
Author:
codeinwp
Message:

Release v8.6.3

Location:
tweet-old-post
Files:
625 added
19 edited

Legend:

Unmodified
Added
Removed
  • tweet-old-post/trunk/CHANGELOG.md

    r2429855 r2434579  
    11
     2 ### v8.6.3 - 2020-12-08
     3 **Changes:**
     4 * Info Pro: Add Revive Network base support. Apply to be a Beta tester [here](https://forms.gle/M4mcqrFZze4Pe4pu7)
     5 
    26 ### v8.6.2 - 2020-12-01
    37 **Changes:**
  • tweet-old-post/trunk/includes/admin/abstract/class-rop-services-abstract.php

    r2424726 r2434579  
    260260
    261261    /**
    262      * Method to retrieve an service id.
     262     * Method to get currently active accounts for the service.
    263263     *
    264264     * @since   8.0.0
     
    806806        return $given_id;
    807807    }
     808
    808809}
  • tweet-old-post/trunk/includes/admin/class-rop-admin.php

    r2425024 r2434579  
    588588                $this,
    589589                'rop_main_page',
    590             )
     590            ),
     591            0
    591592        );
    592593        add_submenu_page(
     
    10191020        $service_factory = new Rop_Services_Factory();
    10201021        $refresh_rop_data = false;
     1022        $revive_network_active = false;
     1023
     1024        if ( class_exists( 'Revive_Network_Rop_Post_Helper' ) ) {
     1025            $revive_network_active = true;
     1026        }
    10211027
    10221028        $cron = new Rop_Cron_Helper();
     
    10471053                            $service = $service_factory->build( $account_data['service'] );
    10481054                            $service->set_credentials( $account_data['credentials'] );
     1055
    10491056                            foreach ( $posts as $post ) {
    10501057                                $post_shared = $account . '_post_id_' . $post;
     
    10541061                                    continue;
    10551062                                }
     1063
    10561064                                $post_data = $queue->prepare_post_object( $post, $account );
     1065
     1066                                if ( $revive_network_active ) {
     1067
     1068                                    if ( Revive_Network_Rop_Post_Helper::rn_is_revive_network_share( $post_data['post_id'] ) ) {
     1069
     1070                                        $revive_network_settings = Revive_Network_Rop_Post_Helper::revive_network_get_plugin_settings();
     1071                                        $delete_post_after_share = $revive_network_settings['delete_rss_item_after_share'];
     1072
     1073                                        // adjust post data to suit Revive Network
     1074                                        $post_data = Revive_Network_Rop_Post_Helper::revive_network_prepare_revive_network_share( $post_data );
     1075                                    }
     1076                                }
     1077
    10571078                                $logger->info( 'Posting', array( 'extra' => $post_data ) );
    1058                                 $service->share( $post_data, $account_data );
    1059                                 update_option( 'rop_last_post_shared', $post_shared );
     1079                                $response = $service->share( $post_data, $account_data );
     1080
     1081                                if ( $revive_network_active ) {
     1082
     1083                                    if ( Revive_Network_Rop_Post_Helper::rn_is_revive_network_share( $post_data['post_id'] ) ) {
     1084                                        // Delete Feed post after it has been shared if the option is checked in RN settings.
     1085                                        if ( $response === true && ! empty( $delete_post_after_share ) ) {
     1086
     1087                                            Revive_Network_Rop_Post_Helper::rn_delete_revive_network_feed_post( $post, $account, $queue );
     1088
     1089                                        }
     1090                                    }
     1091                                }
     1092
     1093                                if ( $response === true ) {
     1094                                    update_option( 'rop_last_post_shared', $post_shared );
     1095                                }
    10601096                            }
    10611097                        } catch ( Exception $exception ) {
  • tweet-old-post/trunk/includes/admin/helpers/class-rop-cron-helper.php

    r2424726 r2434579  
    4545    public static function rop_cron_schedules( $schedules ) {
    4646        $schedules['5min'] = array(
    47             'interval' => 1 * 60,
     47            'interval' => 5 * 60,
    4848            'display'  => Rop_I18n::get_labels( 'general.cron_interval' ),
    4949        );
  • tweet-old-post/trunk/includes/admin/helpers/class-rop-post-format-helper.php

    r2345570 r2434579  
    771771        $post_url        = apply_filters( 'rop_raw_post_url', $post_url, $post_id );
    772772        $global_settings = new Rop_Global_Settings();
     773
     774        if ( $global_settings->license_type() <= 0 ) {
     775            $post_url = $this->rop_prepare_utm_link( $post_url, true );
     776        }
     777
     778        if ( $global_settings->license_type() > 0 ) {
     779            $post_url = $this->rop_prepare_utm_link( $post_url, false );
     780        }
     781
     782        return $post_url;
     783    }
     784
     785    /**
     786     * Method to add the UTM tags to the post URL.
     787     *
     788     * @since   8.6.0
     789     * @access  public
     790     *
     791     * @param   string $post_url The post url.
     792     * @param   bool   $free Whether this is a free plan.
     793     *
     794     * @return string
     795     */
     796    public function rop_prepare_utm_link( $post_url, $free = true ) {
     797
    773798        $settings_model  = new Rop_Settings_Model();
    774799
    775         if ( $settings_model->get_ga_tracking() && $global_settings->license_type() <= 0 ) {
    776             $params                 = array();
    777             $params['utm_source']   = 'ReviveOldPost';
    778             $params['utm_medium']   = 'social';
    779             $params['utm_campaign'] = 'ReviveOldPost';
    780             $post_url               = add_query_arg( $params, $post_url );
    781         }
    782 
    783         if ( $settings_model->get_ga_tracking() && $global_settings->license_type() > 0 ) {
    784             $utm_source   = $this->get_utm_tags( 'utm_campaign_source' );
    785             $utm_medium   = $this->get_utm_tags( 'utm_campaign_medium' );
    786             $utm_campaign = $this->get_utm_tags( 'utm_campaign_name' );
    787 
    788             $params                 = array();
    789             $params['utm_source']   = empty( $utm_source ) ? 'ReviveOldPost' : $utm_source;
    790             $params['utm_medium']   = empty( $utm_medium ) ? 'social' : $utm_medium;
    791             $params['utm_campaign'] = empty( $utm_campaign ) ? 'ReviveOldPost' : $utm_campaign;
    792             $post_url               = empty( $post_url ) ? '' : add_query_arg( $params, $post_url );
    793 
     800        if ( $settings_model->get_ga_tracking() ) {
     801
     802            if ( $free ) {
     803
     804                $params                 = array();
     805                $params['utm_source']   = 'ReviveOldPost';
     806                $params['utm_medium']   = 'social';
     807                $params['utm_campaign'] = 'ReviveOldPost';
     808                $post_url               = add_query_arg( $params, $post_url );
     809
     810            } else {
     811
     812                $utm_source   = $this->get_utm_tags( 'utm_campaign_source' );
     813                $utm_medium   = $this->get_utm_tags( 'utm_campaign_medium' );
     814                $utm_campaign = $this->get_utm_tags( 'utm_campaign_name' );
     815
     816                $params                 = array();
     817                $params['utm_source']   = empty( $utm_source ) ? 'ReviveOldPost' : $utm_source;
     818                $params['utm_medium']   = empty( $utm_medium ) ? 'social' : $utm_medium;
     819                $params['utm_campaign'] = empty( $utm_campaign ) ? 'ReviveOldPost' : $utm_campaign;
     820                $post_url               = empty( $post_url ) ? '' : add_query_arg( $params, $post_url );
     821
     822            }
    794823        }
    795824
    796825        return $post_url;
     826
    797827    }
    798828
  • tweet-old-post/trunk/includes/admin/models/class-rop-posts-selector-model.php

    r2344119 r2434579  
    571571        }
    572572
    573         $this->set( 'posts_buffer', $this->buffer, $refresh );
     573        return $this->set( 'posts_buffer', $this->buffer, $refresh );
    574574    }
    575575
     
    642642        }
    643643
    644         return $post;
     644        if ( empty( $post ) ) {
     645            return $post_id;
     646        } else {
     647            return $post;
     648        }
     649
    645650    }
    646651
  • tweet-old-post/trunk/includes/admin/models/class-rop-queue-model.php

    r2424726 r2434579  
    137137     */
    138138    public function update_queue( $queue ) {
    139 
    140139        $this->set( $this->queue_namespace, $queue );
    141140        $this->queue = $queue;
     
    272271        $queue   = $this->build_queue();
    273272        $ordered = array();
     273
    274274        foreach ( $queue as $account_id => $data ) {
    275275            foreach ( $data as $index => $events_posts ) {
     
    285285                        continue;
    286286                    }
     287
     288                    /*
     289                     Prevents queue from showing posts that do not exist
     290                    * on the website. This can occur when a post is deleted
     291                    * and queue hasn't yet refreshed.
     292                    */
     293                    if ( empty( get_post_status( $post_id ) ) ) {
     294                        continue;
     295                    }
     296
    287297                    $ordered[] = array(
    288298                        'time'      => $events_posts['time'],
  • tweet-old-post/trunk/includes/admin/models/class-rop-scheduler-model.php

    r2424726 r2434579  
    257257            $account_events = array();
    258258        }
     259
    259260        if ( count( $account_events ) === self::EVENTS_PER_ACCOUNT ) {
    260261            return $account_events;
     
    304305            $events = $this->get_upcoming_events( $account_id, $retry );
    305306        }
    306 
    307307        return $events;
    308308    }
  • tweet-old-post/trunk/includes/admin/services/class-rop-facebook-service.php

    r2424726 r2434579  
    493493                )
    494494            );
     495
     496            return true;
     497
    495498        } else {
    496499            return false;
    497500        }
     501
    498502    }
    499503
     
    989993    public function rop_fb_scrape_url( $posting_type, $post_id, $token ) {
    990994
     995        if ( get_post_type( $post_id ) === 'revive-network-share' ) {
     996            $this->logger->info( 'This is a Revive Network share, skipped Facebook scraping.' );
     997            return;
     998        }
     999
    9911000        // Scrape post URL before sharing
    9921001        if ( $posting_type !== 'video' && $posting_type !== 'photo' ) {
  • tweet-old-post/trunk/includes/admin/services/class-rop-gmb-service.php

    r2424726 r2434579  
    510510            );
    511511
     512            return true;
    512513        } else {
    513514
    514515            $this->logger->alert_error( Rop_I18n::get_labels( 'errors.gmb_failed_share' ) . print_r( $response, true ) );
    515                 return false;
    516         }
    517 
    518         return true;
     516            return false;
     517        }
    519518
    520519    }
  • tweet-old-post/trunk/includes/admin/services/class-rop-tumblr-service.php

    r2424726 r2434579  
    513513                )
    514514            );
     515
     516            return true;
     517
    515518        } catch ( Exception $exception ) {
    516519            $this->logger->alert_error( 'Posting failed to Tumblr. Error: ' . $exception->getMessage() );
     
    520523        }
    521524
    522         return true;
    523525    }
    524526
  • tweet-old-post/trunk/includes/admin/services/class-rop-twitter-service.php

    r2424726 r2434579  
    512512            $this->logger->alert_error( sprintf( 'Error posting on twitter. Error: %s', json_encode( $response ) ) );
    513513            $this->rop_get_error_docs( $response );
    514         }
    515 
    516         return false;
     514            return false;
     515        }
     516
    517517    }
    518518
  • tweet-old-post/trunk/includes/class-rop.php

    r2429855 r2434579  
    6969
    7070        $this->plugin_name = 'rop';
    71         $this->version     = '8.6.2';
     71        $this->version     = '8.6.3';
    7272
    7373        $this->load_dependencies();
  • tweet-old-post/trunk/readme.md

    r2429855 r2434579  
    262262
    263263## Changelog ##
     264### 8.6.3 - 2020-12-08  ###
     265
     266* Info Pro: Add Revive Network base support. Apply to be a Beta tester [here](https://forms.gle/M4mcqrFZze4Pe4pu7)
     267
     268
    264269### 8.6.2 - 2020-12-01  ###
    265270
  • tweet-old-post/trunk/readme.txt

    r2429855 r2434579  
    262262
    263263== Changelog ==
     264= 8.6.3 - 2020-12-08  =
     265
     266* Info Pro: Add Revive Network base support. Apply to be a Beta tester [here](https://forms.gle/M4mcqrFZze4Pe4pu7)
     267
     268
    264269= 8.6.2 - 2020-12-01  =
    265270
  • tweet-old-post/trunk/themeisle-hash.json

    r2429855 r2434579  
    1 {"class-rop-autoloader.php":"7bfbb1554230d0ace777adb2e42bebeb","index.php":"39ab8276fb0e4bd3fcab3270822c5977","tweet-old-post.php":"78e23f0125a3090803b2bafb35f757c9","uninstall.php":"c350fd79cac473d2dcdabc0bc277dd23"}
     1{"class-rop-autoloader.php":"7bfbb1554230d0ace777adb2e42bebeb","index.php":"39ab8276fb0e4bd3fcab3270822c5977","tweet-old-post.php":"d692d8dec95b2cbc8df1297a85cd75a1","uninstall.php":"c350fd79cac473d2dcdabc0bc277dd23"}
  • tweet-old-post/trunk/tweet-old-post.php

    r2429855 r2434579  
    1717 * Plugin URI: https://revive.social/
    1818 * 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!
    19  * Version:           8.6.2
     19 * Version:           8.6.3
    2020 * Author:            revive.social
    2121 * Author URI:        https://revive.social/
     
    163163
    164164    define( 'ROP_PRO_URL', 'http://revive.social/plugins/revive-old-post/' );
    165     define( 'ROP_LITE_VERSION', '8.6.2' );
     165    define( 'ROP_LITE_VERSION', '8.6.3' );
    166166    define( 'ROP_LITE_BASE_FILE', __FILE__ );
    167167    define( 'ROP_DEBUG', false );
  • tweet-old-post/trunk/vendor/autoload.php

    r2429855 r2434579  
    55require_once __DIR__ . '/composer' . '/autoload_real.php';
    66
    7 return ComposerAutoloaderInit648538c5635d154b1759c7b825a9295a::getLoader();
     7return ComposerAutoloaderInit63e15ca4910a8f6c8f8c6fcc0a5960a5::getLoader();
  • tweet-old-post/trunk/vendor/composer/autoload_real.php

    r2429855 r2434579  
    33// autoload_real.php @generated by Composer
    44
    5 class ComposerAutoloaderInit648538c5635d154b1759c7b825a9295a
     5class ComposerAutoloaderInit63e15ca4910a8f6c8f8c6fcc0a5960a5
    66{
    77    private static $loader;
     
    2020        }
    2121
    22         spl_autoload_register(array('ComposerAutoloaderInit648538c5635d154b1759c7b825a9295a', 'loadClassLoader'), true, true);
     22        spl_autoload_register(array('ComposerAutoloaderInit63e15ca4910a8f6c8f8c6fcc0a5960a5', 'loadClassLoader'), true, true);
    2323        self::$loader = $loader = new \Composer\Autoload\ClassLoader();
    24         spl_autoload_unregister(array('ComposerAutoloaderInit648538c5635d154b1759c7b825a9295a', 'loadClassLoader'));
     24        spl_autoload_unregister(array('ComposerAutoloaderInit63e15ca4910a8f6c8f8c6fcc0a5960a5', 'loadClassLoader'));
    2525
    2626        $map = require __DIR__ . '/autoload_namespaces.php';
     
    4343        $includeFiles = require __DIR__ . '/autoload_files.php';
    4444        foreach ($includeFiles as $fileIdentifier => $file) {
    45             composerRequire648538c5635d154b1759c7b825a9295a($fileIdentifier, $file);
     45            composerRequire63e15ca4910a8f6c8f8c6fcc0a5960a5($fileIdentifier, $file);
    4646        }
    4747
     
    5050}
    5151
    52 function composerRequire648538c5635d154b1759c7b825a9295a($fileIdentifier, $file)
     52function composerRequire63e15ca4910a8f6c8f8c6fcc0a5960a5($fileIdentifier, $file)
    5353{
    5454    if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
Note: See TracChangeset for help on using the changeset viewer.