Skip to:
Content
Pages
Categories
Search
Top
Bottom

[resolved] Remove/Disable Hidden Group Creation?


  • 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)

  • @mercime
    Participant

    @mercime

    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

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


    Anonymous User 96400
    Inactive

    @anonymized-96400

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


    Anonymous User 96400
    Inactive

    @anonymized-96400

    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

    @blinkybill01

    Worked! Thank ya kindly! :)


    @mercime
    Participant

    @mercime

    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