[Plugin: Email Users] Hide "Notify" command when user has no "notify" capability
-
Just a little suggestion.
Authors by default don’t have the capability to notify others about posts and pages. For this reason, it seems better if they couldn’t even access the Notify command from the dashboard (Posts > Notify, and Pages > Notify).
Perhaps this isn’t the best way to do it, but this code change hides this command in email-users.php:
// replaced MAILUSERS_EMAIL_SINGLE_USER_CAP by MAILUSERS_NOTIFY_USERS_CAP add_posts_page( __('Notify Users', MAILUSERS_I18N_DOMAIN), __('Notify Users', MAILUSERS_I18N_DOMAIN), MAILUSERS_NOTIFY_USERS_CAP, 'mailusers-send-notify-mail-post', 'mailusers_send_notify_mail') ; // replaced MAILUSERS_EMAIL_SINGLE_USER_CAP by MAILUSERS_NOTIFY_USERS_CAP add_pages_page( __('Notify Users', MAILUSERS_I18N_DOMAIN), __('Notify Users', MAILUSERS_I18N_DOMAIN), MAILUSERS_NOTIFY_USERS_CAP, 'mailusers-send-notify-mail-page', 'mailusers_send_notify_mail') ;
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘[Plugin: Email Users] Hide "Notify" command when user has no "notify" capability’ is closed to new replies.