Hide more than one Group in same code:


Home Forums Front End PM PRO Hide more than one Group in same code:

This topic is: Not Resolved
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #45259
    Jan Sørensen
    Participant

    Dear support
    I use this code to disable / hide the group “admin” from my list of many in the Settings (in frontend)

    add_filter( ‘fep_get_all_groups’, function( $groups ){
    if( ! fep_is_user_admin() ){
    unset( $groups[ 7930 ] );
    }
    return $groups;
    });


    My question is:

    Can I use more than one group into that code . for inst: unset( $groups[ 7930 2343 1209] );

    Hope to get answer.

    The other solution is to copy all the block, but I like to have “oneliner” 😉

    #45267
    Shamim Hasan
    Keymaster

    You can use like unset( $groups[ 7930 ], $groups[ 2343 ], $groups[ 1209 ] );

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

You need to purchase ‘Front End PM PRO’ to create topic in this support forum.

If you already purchased ‘Front End PM PRO’ please LOGIN.