Change default value for afap_auto_post
-
I suggest to change default value of afap_auto_post variable to true only if post is not already published. Before installing plugin admin can already publish posts on social networks manually or by another plugin. So, when editing old posts check box “Enable Auto Post” is set to true and updating post leads to double-publishing it on social networks.
I mean change line 327 in accesspress-facebook-auto-post.php from
$auto_post = get_post_meta($post->ID, 'afap_auto_post', true);
to
$auto_post = get_post_meta($post->ID, 'afap_auto_post', in_array($post->post_status, array("future", "draft", "auto-draft", "pending")));
Such behavior is default for OneSignal Push Notifications plugin, for example. And I think it should be correct behavior for all auto-posting plugins.
https://www.ads-software.com/plugins/accesspress-facebook-auto-post/
- The topic ‘Change default value for afap_auto_post’ is closed to new replies.