Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Boone Gorges

    (@boonebgorges)

    Looks like it should be possible to hook to ‘bp_docs_post_args_before_save’, in a similar way to what you see in the commit linked above, and then set all posts to bp_docs_pending and then fire off an email to the admin. The email would presumably include a link to the Dashboard panel for that specific Doc, where the admin could change it to Publish. (You’d need to build something custom if you wanted a publish link on the front end, I think.)

    Thread Starter outcold

    (@outcold)

    Thanks for the quick response and also for this awesome plugin. My PHP is more than a little rusty, can you tell me which file I should add “hook to ‘bp_docs_post_args_before_save’?

    Not looking to allow public access. I just want to retain a high measure of control over what’s posted.

    Thanks Again

    Marek

    Hi!! I really need this to, I know the plugin have a moderation process now, i see it here: https://github.com/boonebgorges/buddypress-docs/blob/master/includes/addon-moderation.php

    But, how do I activate it?

    Or maybe I need pass params to bp_docs_post_args_before_save, how do I change the default post_status to bp_docs_pending editing the function.php file?

    Thanks very much!

    Hi, I solved it by adding this function in function.php file

    add_action( 'bp_docs_doc_saved', 'draft_publish');
    
    function draft_publish( $bp_doc ) {
    		wp_update_post( array(
    		'ID' => $bp_doc->doc_id,
    		'post_status' => 'bp_docs_pending',
    		) );
    }

    It worked for me, but I don’t know if it will have any problems in the future.

    • This reply was modified 4 years, 12 months ago by nachocano.
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘New & Edited Docs Post Status to Pending’ is closed to new replies.