Skip to content

Commit

Permalink
Merge branch 'development' of girish.github.com:Codeinwp/tweet-old-po…
Browse files Browse the repository at this point in the history
…st into feat/pro/523
  • Loading branch information
girishpanchal30 committed Jul 9, 2024
2 parents a67c778 + 91464a0 commit 705595e
Show file tree
Hide file tree
Showing 15 changed files with 345 additions and 188 deletions.
9 changes: 9 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
version: 2
updates:

# Maintain dependencies for Composer
- package-ecosystem: "composer"
directory: "/"
target-branch: "development"
schedule:
interval: "weekly"
23 changes: 23 additions & 0 deletions .github/workflows/sync-branches.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Sync branches
on:
push:
branches:
- 'master'
- 'development'
jobs:
sync-branch:
runs-on: ubuntu-latest
if: ${{ github.repository_owner == 'Codeinwp' }} #Disable on forks
steps:
- uses: actions/checkout@master
- name: Retrieve branch name
id: retrieve-branch-name
run: echo "::set-output name=branch_name::$(REF=${GITHUB_HEAD_REF:-$GITHUB_REF} && echo ${REF#refs/heads/} | sed 's/\//-/g')"
- name: Merge master -> development
if: ${{ steps.retrieve-branch-name.outputs.branch_name == 'master' }}
uses: Codeinwp/merge-branch@master
with:
type: now
from_branch: master
target_branch: development
github_token: ${{ secrets.BOT_TOKEN }}
64 changes: 64 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,67 @@
##### [Version 9.0.31](https://github.com/Codeinwp/tweet-old-post/compare/v9.0.30...v9.0.31) (2024-06-04)

- Fixed sharing on LinkedIn: updated LinkedIn API Version
- Updated Facebook API Version

##### [Version 9.0.30](https://github.com/Codeinwp/tweet-old-post/compare/v9.0.29...v9.0.30) (2024-05-22)

- Updated internal dependencies

##### [Version 9.0.29](https://github.com/Codeinwp/tweet-old-post/compare/v9.0.28...v9.0.29) (2024-05-20)

- Updated internal dependencies

##### [Version 9.0.28](https://github.com/Codeinwp/tweet-old-post/compare/v9.0.27...v9.0.28) (2024-05-20)

- Updated internal dependencies

##### [Version 9.0.27](https://github.com/Codeinwp/tweet-old-post/compare/v9.0.26...v9.0.27) (2024-04-23)

### Bug Fixes
- Fixed issue with titles not always showing correct escaped characters.
- Fixed instant sharing not working correctly with scheduled posts, only published posts are now eligible.

### Improvements
- Improved compatibility with newer versions of PHP
- Updated internal dependencies

##### [Version 9.0.26](https://github.com/Codeinwp/tweet-old-post/compare/v9.0.25...v9.0.26) (2024-02-29)

### Fixes
- Updated dependencies

##### [Version 9.0.25](https://github.com/Codeinwp/tweet-old-post/compare/v9.0.24...v9.0.25) (2024-02-20)

### Fixes

- Page will refresh when a social media account is added.
- Instant sharing checkbox will now be selected when "Instant sharing by default" is active

##### [Version 9.0.24](https://github.com/Codeinwp/tweet-old-post/compare/v9.0.23...v9.0.24) (2024-02-12)

### Fixes
- Social media accounts are not selected with Instant sharing activated

##### [Version 9.0.23](https://github.com/Codeinwp/tweet-old-post/compare/v9.0.22...v9.0.23) (2024-02-01)

### Improvements
- Quota limit handling when sharing in X Network (re-quires re-login with your X account)
- Button to export Logs as a text file
- New logs display design
- Sharing tweets via the RoP server


### Bux Fixes:
- `is.gd` URL shortener error handling
- Fixed instant sharing issue with scheduled posts

##### [Version 9.0.22](https://github.com/Codeinwp/tweet-old-post/compare/v9.0.21...v9.0.22) (2023-12-22)

### Fixes
- Changed the default usage of X (ex Twitter) to own API keys
- Updated the JS pipeline
- Fixed compatibility issue with the LearnPress plugin

##### [Version 9.0.21](https://github.com/Codeinwp/tweet-old-post/compare/v9.0.20...v9.0.21) (2023-09-27)

- Implemented post-sharing limit API to prevent sharing errors
Expand Down
29 changes: 21 additions & 8 deletions includes/admin/class-rop-admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -661,14 +661,6 @@ public function menu_pages() {
'rop_addons_page',
)
);

add_submenu_page(
'TweetOldPost',
__( 'Roadmap', 'tweet-old-post' ),
__( 'Plugin Roadmap', 'tweet-old-post' ),
'manage_options',
'https://trello.com/b/svAZqXO1/roadmap-revive-old-posts'
);
}

/**
Expand Down Expand Up @@ -1851,4 +1843,25 @@ public function register_survey() {
do_action( 'themeisle_sdk_dependency_enqueue_script', 'survey' );
wp_localize_script( $survey_handler, 'ropSurveyData', $this->get_survey_metadata() );
}

/**
* Add upgrade to pro plugin action link.
*
* @param array $actions Plugin actions.
* @param string $plugin_file Path to the plugin file relative to the plugins directory.
*
* @return array
*/
public function rop_upgrade_to_pro_plugin_action( $actions, $plugin_file ) {
$global_settings = new \Rop_Global_Settings();
if ( $global_settings->license_type() < 1 ) {
return array_merge(
array(
'upgrade_link' => '<a href="' . tsdk_utmify( Rop_I18n::UPSELL_LINK, 'rowaction', 'plugins' ) . '" target="_blank" title="' . __( 'More Features', 'tweet-old-post' ) . '" style="color: #006400;font-weight:700;">' . __( 'Upgrade to Pro', 'tweet-old-post' ) . '</a>',
),
$actions
);
}
return $actions;
}
}
30 changes: 4 additions & 26 deletions includes/admin/class-rop-rest-api.php
Original file line number Diff line number Diff line change
Expand Up @@ -590,6 +590,10 @@ private function save_general_settings( $data ) {
$this->response->set_code( '200' )
->set_data( $settings_model->get_settings() );

// Save tracking flag.
$tracking = filter_var( $data['tracking'], FILTER_VALIDATE_BOOLEAN );
update_option( 'tweet_old_post_logger_flag', $tracking ? 'yes' : 'no' );

$cron_status = filter_var( get_option( 'rop_is_sharing_cron_active', 'no' ), FILTER_VALIDATE_BOOLEAN );

if ( true === $cron_status && defined( 'ROP_CRON_ALTERNATIVE' ) && true === ROP_CRON_ALTERNATIVE ) {
Expand Down Expand Up @@ -1292,30 +1296,4 @@ private function add_account_vk( $data ) {

return $this->response->to_array();
}

/**
* API method called to toggle tracking.
*
* @SuppressWarnings(PHPMD.UnusedPrivateMethod) As it is called dynamically.
*
* @param array $data The data from request.
* @return array The response.
*/
private function toggle_tracking( $data ) {
if ( ! isset( $data['tracking'] ) ) {
$this->response->set_code( '400' )
->set_message( 'Tracking data not found' )
->set_data( array() );

return $this->response->to_array();
}

$tracking = filter_var( $data['tracking'], FILTER_VALIDATE_BOOLEAN );
update_option( 'tweet_old_post_logger_flag', $tracking ? 'yes' : 'no' );

return $this->response->set_code( '200' )
->set_message( 'OK' )
->set_data( array( 'tracking' => $tracking ) )
->to_array();
}
}
7 changes: 4 additions & 3 deletions includes/class-rop-i18n.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ public static function get_labels( $key = '' ) {
'gmb_app_signin_btn' => __( 'Sign in to Google My Business', 'tweet-old-post' ),
'vk_app_signin_btn' => __( 'Sign in to Vkontake', 'tweet-old-post' ),
'app_option_signin' => __( 'Or', 'tweet-old-post' ),
'rs_app_info' => sprintf( __( 'We collect some info, learn more %1$shere%2$s.', 'tweet-old-post' ), '<a class="text-bold" href="https://docs.revive.social/article/1066-info-we-collect-in-seamless-social-network-connection" target="_blank">', '</a>' ),
'service_popup_title' => __( 'Service Credentials', 'tweet-old-post' ),
'sign_in_btn' => __( 'Sign In', 'tweet-old-post' ),
'field_required' => __( 'This field is required', 'tweet-old-post' ),
Expand Down Expand Up @@ -202,6 +201,9 @@ public static function get_labels( $key = '' ) {
'exclude_single_post' => __( 'Exclude this post', 'tweet-old-post' ),
'no_posts_found' => __( 'No posts found.', 'tweet-old-post' ),
'load_more_posts' => __( 'Load more posts.', 'tweet-old-post' ),
'tracking_field' => __( 'Contributing', 'tweet-old-post' ),
'tracking' => __( 'Send anonymous data to help us understand how you use the plugin.', 'tweet-old-post' ),
'tracking_info' => __( 'What do we track?', 'tweet-old-post' ),
),
'post_format' => array(
'yes_text' => __( 'Yes', 'tweet-old-post' ),
Expand Down Expand Up @@ -346,8 +348,6 @@ public static function get_labels( $key = '' ) {
'to' => __( 'to', 'tweet-old-post' ),
'by' => __( 'by', 'tweet-old-post' ),
'review_it' => __( 'Leave a review', 'tweet-old-post' ),
'tracking' => __( 'Send anonymous data to help us understand how you use the plugin.', 'tweet-old-post' ),
'tracking_info' => __( 'What do we track?', 'tweet-old-post' ), 'global_settings_header' => __( 'Global Settings', 'tweet-old-post' ),
'in' => __( 'in', 'tweet-old-post' ),
'start' => __( 'Start', 'tweet-old-post' ),
'stop' => __( 'Stop', 'tweet-old-post' ),
Expand All @@ -367,6 +367,7 @@ public static function get_labels( $key = '' ) {
'tweet-old-post'
),
'rop_support' => __( 'Get Support', 'tweet-old-post' ),
'rop_support_url' => defined( 'ROP_PRO_BASEFILE' ) ? tsdk_support_link( ROP_PRO_BASEFILE ) : '',
'rop_facebook_domain_toast' => __(
'You need to verify your website domain with Facebook so your shares can show as article posts on Facebook. [ <a href="https://docs.revive.social/article/1136-facebook-text-posts-vs-article-posts" target="_blank">Read this doc</a> ] for more information',
'tweet-old-post'
Expand Down
5 changes: 4 additions & 1 deletion includes/class-rop.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class Rop {
public function __construct() {

$this->plugin_name = 'rop';
$this->version = '9.0.21';
$this->version = '9.0.31';

$this->load_dependencies();
$this->set_locale();
Expand Down Expand Up @@ -181,6 +181,9 @@ private function define_admin_hooks() {
* Use PHP_INT_MAX to make sure the schedule is added. Some plugins add their schedule by clearing the previous values.
*/
$this->loader->add_filter( 'cron_schedules', $rop_cron_helper, 'rop_cron_schedules', PHP_INT_MAX );
// Add upgrade to pro plugin action.
$plugin_slug = basename( ROP_LITE_PATH ) . '/' . basename( ROP_LITE_BASE_FILE );
$this->loader->add_filter( "plugin_action_links_$plugin_slug", $plugin_admin, 'rop_upgrade_to_pro_plugin_action', 10, 2 );
}

/**
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tweet-old-post",
"version": "9.0.21",
"version": "9.0.31",
"description": "Tweet Old Posts plugin for WordPress.",
"repository": {
"type": "git",
Expand Down
Loading

0 comments on commit 705595e

Please sign in to comment.