Codeinwp / tweet-old-post

Plugin to tweet about your old posts to get more hits for them and keep them alive.
GNU General Public License v2.0
13 stars 16 forks source link

Instant sharing not working properly on existing posts #861

Closed purplecodes closed 1 year ago

purplecodes commented 1 year ago

Description

Under the General Settings of Revive Old Posts Dashboard, there is an option Enable Instant Sharing Feature (Post on Publish) where the post should automatically be shared to active social media accounts that have been added to the Dashboard after clicking the Publish or Update button.

Screenshot 2023-03-28 at 4 03 34 AM

Given the settings (as seen on the screenshot), when a new post has created the socials under the Revive Old Posts setting is automatically selected.

Screenshot 2023-03-28 at 4 07 51 AM

But the same behavior is not reflected

Screenshot 2023-03-28 at 4 10 23 AM

in existing posts.

Step-by-step reproduction instructions

  1. Enable the settings as seen on the screenshot.
  2. Create a new post and open an existing post and compare the difference.

Screenshots, screen recording, code snippet or Help Scout ticket

Ticket: https://secure.helpscout.net/conversation/2182729948/361627?folderId=212385

WP: v6.1.1 ROP(free): v9.0.12

Environment info

No response

Is the issue you are reporting a regression

Yes, this is a regression.

girishpanchal30 commented 1 year ago

Hey @purplecodes,

After reviewing the source code, I found the filter that enables the instant sharing option for the edit post screen as well.

Add below code snippet in theme functions.php

function top_load_post_callback() {
    add_filter( 'rop_is_edit_post_screen', '__return_false' );
}
add_action( 'load-post.php', 'top_load_post_callback' );

Thanks

irinelenache commented 1 year ago

@girishpanchal30 I checked and this issue was not happening in the ROP 9.0.2 version and indeed is a regression. Can we fix it in the plugin directly instead of providing custom code?

girishpanchal30 commented 1 year ago

@irinelenache I Fixed this issue directly in the plugin, please check with the attached PR https://github.com/Codeinwp/tweet-old-post/pull/863

irinelenache commented 1 year ago

@girishpanchal30 Sorry to bother, but can we have the process to build the zip file in the PR as we have in other plugins? I was making the changes myself in the code before, but now there are more changes and it's harder to follow

girishpanchal30 commented 1 year ago

@irinelenache Can you please download this file and replace it with your plugin?

irinelenache commented 1 year ago

Checked now and it works fine, thank you 👍

pirate-bot commented 1 year ago

:tada: This issue has been resolved in version 9.0.13 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: