• Hello,

    I noticed that when a user creates an advert, it automatically posts it once it’s submitted.

    I already add: [adverts_add moderate=”1″] and goes to moderation.

    Is there any way to hold adverts only for new users, but if the user have Author or Editor roles, the adverts will automatically posted ?

    Thanks.

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

    (@gwin)

    Hi,
    you can add the code below in your theme functions.php file

    
    add_filter( "shortcode_atts_adverts_add", function( $out ) {
      if( current_user_can( "edit_pages" ) ) {
        $out["moderate"] = 0;
      }
      return $out;
    } );
    

    This filter is run on the [adverts_add] params, if the current user has edit_pages capability (that is if he is an Administrator or Editor) then the snippet will force disable moderation otherwise the value set in the shortcode for moderation will be used (or the default value if moderate param is not set in the shortcode).

    Thread Starter Markotop

    (@markotopweb)

    Thank you for your help ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Advert Moderation For New Member Only?’ is closed to new replies.