Reply To: Create Announcements


Home Forums Front End PM PRO Create Announcements Reply To: Create Announcements

#26559
shamim
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);