Hide possibility to uncheck to receive e-mail fron announcement


Home Forums Front End PM PRO Hide possibility to uncheck to receive e-mail fron announcement

This topic is: Resolved

Tagged: 

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #45305
    Jan Sørensen
    Participant

    I use messenger and announcement at lot and am really happy with that. All members can, by themselves, add themselves into any of the grpups I have made. On the top of that list in the “Settings” there are also those 3 options which the last is the possibility to avoid to get any e-mails when an announcement is sendt out.

    I want to hide this option for members (only the one for announcement). The admins need to be sure that all announcement is also send by e-mail to members, not only inside Front End PM.

    I found the code that disable Settings for all, but I want the code to be visible for admin. Please help.

    (the code I found was: )
    add_filter( ‘fep_menu_buttons’, function( $menu ){
    unset( $menu[‘settings’], $menu[‘announcements’] );
    return $menu;
    }, 99);

    #45317
    Shamim Hasan
    Keymaster

    You can use following code

    add_filter( 'fep_menu_buttons', function( $menu  ){
        if ( ! fep_is_user_admin() ){
            unset( $menu['settings'], $menu['announcements']  );
        }
        return $menu;
    }, 99);
    
    #45321
    Jan Sørensen
    Participant

    Hi Shamin.
    Maybe I explained myselves not correct. What this code do is to disable the button “Settings” totally. I want members to check / uncheck any of the groups they want to follow. The three options on the top I actually want to have disabled if that is possible.
    I want that options to be fixed on for ever (and not visable).
    Attached is a picture from the admin view. As you see there is a lot of groups members can add to follow (the pic do not show all 🙂 )
    My task is just to disable to show options to cross on / off of the announcement. BUT if that is not possible, I want to hide all those three on the top.

    Attachments:
    You must be logged in to view attached files.
    #45340
    Shamim Hasan
    Keymaster

    You can use following code

    add_filter( 'fep_form_fields', function( $fields ){
        if ( ! fep_is_user_admin() ){
            unset( $fields['allow_ann'] );
        }
        return $fields;
    });
    

    This will remove announcement option from there.

    #45348
    Jan Sørensen
    Participant

    FANTASTIC

    You are my hero.

    THANK YOU

Viewing 5 posts - 1 through 5 (of 5 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.