Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Mathieu Viet

    (@imath)

    Sure, you simply need to add a filter to edit the capability mapping. Here’s an example of filter for any groups:

    function my_custom_cap_mapping( $caps, $cap, $user_id, $args, $group = null ) {
     if ( empty( $group->id ) ) {
      return $caps;
     }
    
     if ( 'publish_ideas' === $cap && ! groups_is_user_admin( $user_id, $group->id ) &&  ! groups_is_user_mod( $user_id, $group->id ) ) {
      $caps = array( 'do_not_allow' );
     }
    
     return $caps;
    }
    add_filter( 'wp_idea_stream_buddypress_group_map_meta_caps', 'my_custom_cap_mapping', 10, 5 );
    Thread Starter Georgio

    (@georgio-1)

    Merci beaucoup !

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Groups: allow only group admins, mods to create’ is closed to new replies.