Create Announcements


Home Forums Front End PM PRO Create Announcements

This topic is: Not Resolved
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #26556
    John Lenehan
    Participant

    Hi

    I cannot see any settings in the back end whereby I can set what user roles can send announcements.

    I can only see the ‘New Announcement’ button if I log in as an administrator.

    Is it possible to allow users with the Editor and Author roles to send announcements?

    Thanks

    John

    #26559
    Shamim Hasan
    Keymaster

    Add following code in your theme’s (child theme’s if you are using) functions.php

    add_filter( 'fep_current_user_can', function( $can, $cap, $id ){
    	if ( 'add_announcement' != $cap || ! is_user_logged_in() || fep_is_user_blocked() ) {
    		return $can;
    	}
    	if ( array_intersect( [ 'administrator', 'editor', 'author' ], wp_get_current_user()->roles ) ) {
    		return true;
    	}
    	return false;
    }, 10, 3);
    
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.