thorsten.tobi

Forum Replies Created

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • in reply to: Problems with sending to users of a role #43657
    thorsten.tobi
    Participant

    OK,… sorry,…
    The following code had disappeared from functions.php after an update.

    add_filter( ‘fep_current_user_can’, function( $can, $cap, $id ){
    if ( ‘add_announcement’ !== $cap ) {
    return $can;
    }
    if ( array_intersect( wp_get_current_user()->roles, [ ‘administrator’, ‘vorstand’, ‘moderator’ ] ) ) {
    return true;
    }
    return false;
    }, 10, 3);

    in reply to: Problems with sending to users of a role #43652
    thorsten.tobi
    Participant

    i there,

    I’ll watch this again tonight.

    It seems that usage per role has “been lost”. Here in this forum I got a tip on how members of other roles (not admin) can write announcements.

    Regards
    Thorsten

Viewing 2 posts - 1 through 2 (of 2 total)