• communitya

    (@communitya)


    Is it possible to force re-moderation after edit? I moderate at creation stage, but users can edit already moderated stuff and, for argument’s sake, add offensive language. How can this be prevented?

Viewing 1 replies (of 1 total)
  • Plugin Author Greg Winiarski

    (@gwin)

    Hi,
    out of box we do not have such feature in WPAdverts, but if you add the code below in your theme functions.php file then when a user will edit an Ad from page with [adverts_manage] shortcode the Ad will be saved and its status will change to “pending”.

    
    add_filter( "adverts_sh_manage_list_statuses", function( $s ) {
        $s[] = "pending";
        return $s;
    } );
    add_action( "adverts_post_save", function( $form, $post_id ) {
        if( adverts_request( "_adverts_action" ) == "update" ) {
            wp_update_post( array( 
                "ID" => $post_id,
                "post_status" => "pending"
            ) );
        }
    }, 10, 2 );
    
Viewing 1 replies (of 1 total)

The topic ‘Moderate after edit’ is closed to new replies.