Skip to:
Content
Pages
Categories
Search
Top
Bottom

[resolved] Remove/Disable Hidden Group Creation?

  • Avatar of BlinkyBill01
    BlinkyBill01
    Participant

    @blinkybill01

    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)
  • Avatar of @mercime
    @mercime
    Keymaster

    @mercime

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

    1. copy over create.php file http://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

    Avatar of Paul Gibbs
    Paul Gibbs
    Keymaster

    @djpaul

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

    Avatar of Travel-Junkie
    Boris
    Participant

    @travel-junkie

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

    Avatar of Travel-Junkie
    Boris
    Participant

    @travel-junkie

    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’ );`

    Avatar of BlinkyBill01
    BlinkyBill01
    Participant

    @blinkybill01

    Worked! Thank ya kindly! :)

    Avatar of @mercime
    @mercime
    Keymaster

    @mercime

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

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

You must be logged in to reply to this topic.