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

[Publish Now] Use account active state as default value for toggle check #908

Closed Soare-Robert-Daniel closed 6 months ago

Soare-Robert-Daniel commented 6 months ago

Problem Description

  1. On the page, you have meta-box where you can select which Social Media service you want to share the post.
  2. Once the post is saved, the options are stored inside a post meta named rop_publish_now_accounts and the data looks like this: a:1:{s:60:"twitter_aToxMzEwNTQ2NjkzMDU4OTczNjk2Ow==_1310546693058973700";s:0:"";}

The issue is that the post meta is empty by default, thus the conditions added in this PR https://github.com/Codeinwp/tweet-old-post/pull/893 do not account for that and made the status of the check false by default.

But the users want them to be true by default.

Solution

Added true as the default value when the options are absent.

Also changed some variables named to match their purpose.

Testing

github-actions[bot] commented 6 months ago

Plugin build for 13c31c042f8e1cb6f7dda85626f9d80706c17f33 is ready :bellhop_bell:!

irinelenache commented 6 months ago

@Soare-Robert-Daniel Tested and the issue is fixed, but if I enable the Choose accounts manually option, the social medias will still be selected when creating a new post, as you can see in this video https://vertis.d.pr/v/VWc6VK

Soare-Robert-Daniel commented 6 months ago

Thanks, @irinelenache, for the feedback. If the Choose accounts manually is checked, the social account will not be checked. Now, it should be closer to the original behavior.

irinelenache commented 6 months ago

@Soare-Robert-Daniel I checked with the latest build and now i'm not able to share any post using the Instant share feature (also nothing is added in the Sharing logs). I checked the cron sharing and that is working fine.

You can check on this instance:

 Admin area URL: https://hestia-date.s3-tastewp.com/wp-admin 
 Username: irinel 
 Password: X3jcpkpJ6zE 
irinelenache commented 6 months ago

@Soare-Robert-Daniel Tested and everything's fine now, thank you ✔️

pirate-bot commented 6 months ago

:tada: This PR is included in version 9.0.24 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: