Skip to:
Content
Pages
Categories
Search
Top
Bottom

[resolved] Remove/Disable Hidden Group Creation?

  • @blinkybill01

    Participant

    Just wondering how I would do this. Would I have to go into the php files and just remove the option by /* */ blocking that part of the code?

Viewing 6 replies - 1 through 6 (of 6 total)
  • @mercime

    Participant

    If you have created a child theme of bp-default theme:

    1. copy over create.php file https://buddypress.trac.wordpress.org/browser/tags/1.5.4/bp-themes/bp-default/groups/create.php

    2. open up create.php, and above line #99 add: ` `
    and then after line #106 add: “
    so that you, the Site/Super Admin can create hidden groups if you want to

    In effect, the hidden group option would look like this now:
    `


    `

    3. upload the file to your child-theme-folder/groups/create.php

    @djpaul

    Keymaster

    That won’t stop someone very determined crafting a custom POST request, but will probably stop most people.

    @anonymized-96400

    Inactive

    What @mercime said together with filtering `groups_valid_status` to only return public and private should do the trick.

    @anonymized-96400

    Inactive

    Something like this in bp-custom.php:

    `function my_filter_group_stati( $stati ) {
    if( $key = array_search( ‘hidden’, $stati ) ) {
    unset( $stati[$key] );
    }

    return $stati;
    }
    add_filter( ‘groups_valid_status’, ‘my_filter_group_stati’ );`

    @blinkybill01

    Participant

    Worked! Thank ya kindly! :)

    @mercime

    Participant

    Missed the status thingy :-). Thank you @travel-junkie
    Cheers.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘[resolved] Remove/Disable Hidden Group Creation?’ is closed to new replies.
Skip to toolbar