Home › Forums › Front End PM PRO › Using admin only – how can admin send emails to anyone?
- This topic has 5 replies, 2 voices, and was last updated 7 years, 4 months ago by Shamim Hasan.
- AuthorPosts
- August 3, 2018 at 7:54 pm #16162HansenParticipant
I’m using the admin only functionality with max recipients set to 0. This works fine for normal users, but it seems to apply for admins as well – I do want them to freely send to all users.
Additionally I want to change the order of “Message box” so its on the all left side, and “New message” after announcement. I tried searching the forum and following the codes sent by another user, but that didn’t work (it only created a couple of additional empty menu items)
August 3, 2018 at 8:50 pm #16167Shamim HasanKeymasterYou can use Role to Role block feature. Please go to Front End PM PRO > Settings > Security > Role to Role Block
Set “From Role” as any role (except Administrator as you want admin to send message ), “To Role” as “All Roles” and “Block For” as “New Message”. This block other role users from sending new message (They can send message to admin, if you set that).For changing order add following code in your theme’s (child theme’s if any) functions.php
add_filter( 'fep_menu_buttons', function( $menu ) { $menu['message_box']['priority'] = 1; $menu['newmessage']['priority'] = 2; $menu['announcements']['priority'] = 3; $menu['directory']['priority'] = 4; $menu['settings']['priority'] = 5; return $menu; }, 50 );August 3, 2018 at 10:57 pm #16171HansenParticipantRule to Rule block:
Got it working, thanks.Changing order:
The code you pasted generates the following (note that I have restyled it and have custom localization):
http://ss.argo.no/303P0b183c3Z
Code:
http://ss.argo.no/2a262w3Q2y1DAnother question:
I want to create a “toggle” button for the “fep-action-table” (I want as clean UI as possible). I can manage to add the JS which toggle the stuff myself, but how do I add a custom button to the menu (i.e. “Edit”) with an unique class?August 4, 2018 at 12:09 am #16181Shamim HasanKeymasterI am sorry, had a typo in code. I have corrected it is last reply. please use that code.
To add a menu button with unique class add following code in your theme’s (child theme’s if any) functions.php
add_filter( 'fep_menu_buttons', function( $menu ) { $menu['cus_button'] = array( 'title' => __( 'Edit', 'front-end-pm' ), 'action' => 'edit', 'class' => 'fep-button your_unique_class', 'priority' => 15, ); return $menu; });August 4, 2018 at 12:32 am #16190HansenParticipantCheers, got it working!
Regarding the extra button: How can I display it only on the “Message Box” page? And have it unlinked/# (its just a JS toggle-button)
August 4, 2018 at 12:50 am #16198Shamim HasanKeymasterYou can use conditional
eg.add_filter( 'fep_menu_buttons', function( $menu ) { if ( isset( $_GET['fepaction'] ) && $_GET['fepaction'] == 'message_box' ){ $menu['cus_button'] = array( 'title' => __( 'Edit', 'front-end-pm' ), 'action' => 'edit', 'class' => 'fep-button your_unique_class', 'priority' => 15, ); } return $menu; }); - 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.