Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Author Pramod Jodhani

    (@promz)

    Hi,

    Thanks for pointing out. It doesn’t make sense indeed. It will be fixed soon. Thanks

    Plugin Author Pramod Jodhani

    (@promz)

    This issue has been resolved. Please check the latest version 1.3.2.

    Let me know if there is any other bug.

    Thread Starter smumdax

    (@smumdax)

    Wow…. this is great service!
    Thanks for this quick fix. I really appreciate it!

    Thread Starter smumdax

    (@smumdax)

    Been doing some tests, and here are some things I noticed:
    – saving as “pending review” also publishes the post on FB
    – if we save draft, then the “post to fb” box gets unchecked. I admin a site with a dozen authors, and they tend to forget to recheck the box. It would probably be better if it stayed checked until it really is posted. But that might me a bit complicated to code. Just thought I mentionned it.
    – the Magic Quotes have “post_author”, but that seems to use the username of the author. I suggest having other form of name, like full name, first name, nickname, etc (if etc exists lol). I changed code so that it displays display_name.

    Plugin Author Pramod Jodhani

    (@promz)

    Thanks for the important review. All these are practical problems and I think I can fix them all. I appreciate your efforts.

    Thanks

    andrewpaulbowden

    (@andrewpaulbowden)

    I’ve just started using this plugin and am also seeing it post drafts in v1.4.3

    kokojambo

    (@kokojambo)

    Same here

    brunooo

    (@brunooo)

    same with saving in “pending review”. Maybe a check that only if the post is in published?

    Also we have collaborators, could be this plugin only be executed by administrators?

    tx!.

    dantahoua

    (@dantahoua)

    Same problem here, post is published on Facebook when I save Draft…

    The problem is still here, do something! Any workaround?

    The problem I found was within this code :

    if ( wp_is_post_revision( $post_id )   ) {
    	return;
    }
    
    //if post is being saved as a draft, dont proceed
    if(isset($_POST["save"]) && $_POST["save"] == "Save Draft") {
    	return;
    }
    
    //if new post then dont proceed
    if(get_post_status( $post_id ) == "auto-draft") {
    	return;
    }

    The plugin didn’t take into account that my WP was not in english. So instead of having $_POST["save"] == "Save Draft", I had $_POST["save"] == "Enregistrer brouillon".

    I changed the code to this and it seems to work fine. If the post status isn’t set to “publish”, I don’t want to push it to Facebook.

    if ( wp_is_post_revision( $post_id ) || get_post_status( $post_id ) == "auto-draft" ) {
    	return;
    }
    
    //if post is being saved as a draft, dont proceed
    if(isset($_POST["save"]) && $_POST["save"] == "Save Draft") {
    	return;
    }
    
    //if status not "publish" then dont proceed
    if(get_post_status( $post_id ) != "publish") {
    	return;
    }

    missme2,

    Thanks a lot, your solution works perfect!

    But I moved to another plugin.

Viewing 12 replies - 1 through 12 (of 12 total)

The topic ‘Don't post on "Save as draft"’ is closed to new replies.