Home › Forums › Front End PM PRO › Hide possibility to uncheck to receive e-mail fron announcement
Tagged: announcement
- This topic has 4 replies, 2 voices, and was last updated 2 years, 9 months ago by Jan Sørensen.
- AuthorPosts
- February 20, 2023 at 4:04 pm #45305Jan SørensenParticipant
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);February 25, 2023 at 9:51 am #45317Shamim HasanKeymasterYou can use following code
add_filter( 'fep_menu_buttons', function( $menu ){ if ( ! fep_is_user_admin() ){ unset( $menu['settings'], $menu['announcements'] ); } return $menu; }, 99);February 27, 2023 at 2:39 pm #45321Jan SørensenParticipantHi 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.March 2, 2023 at 9:13 am #45340Shamim HasanKeymasterYou 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.
March 2, 2023 at 3:34 pm #45348Jan SørensenParticipantFANTASTIC
You are my hero.
THANK YOU
- AuthorPosts
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.