Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • OK so if I had looked a few lines down, I would have seen that there’s a filter right below that, you can set your defaults like this:

    function custom_bp_docs_permissions($doc_settings, $doc_id, $default_settings) {
    
      $custom_default_settings = array(
        'read'          => 'group-members',
        'edit'          => 'group-members',
        'read_comments' => 'group-members',
        'post_comments' => 'group-members',
        'view_history'  => 'group-members',
        'manage'        => 'group-members',
      );
    
      if($doc_id == 0 || $doc_settings == $default_settings) {
        return $custom_default_settings;
      } else {
        return $doc_settings;
      }
    
    }
    add_filter('bp_docs_get_doc_settings',custom_bp_docs_permissions,10,3);

    Hope this helps someone else out there…

    Take a look at functions.php line 445

    $default_settings = array(
    		'read'          => 'anyone',
    		'edit'          => 'loggedin',
    		'read_comments' => 'anyone',
    		'post_comments' => 'anyone',
    		'view_history'  => 'anyone',
    		'manage'        => 'creator',
    	);

    Wish there was a way to set this without hacking the bp docs core… still looking into that.

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