thebrandonallen / edit-author-slug

WordPress plugin that allows an admin (or capable user) to edit the author slug of a user, and change the author base. New development takes place on the 'develop' branch.
http://wordpress.org/plugins/edit-author-slug/
GNU General Public License v2.0
41 stars 8 forks source link

Remove the call to add_options_page completely via role #21

Closed sidouglas closed 5 years ago

sidouglas commented 5 years ago

on your add_options_page call in admin.php you hard code the edit_users capability to render the plugin. Despite hooking the ba_eas_can_edit_author_slug to prevent the actual update of settings, it would be nice to just hide the page altogether for users that don't have the permission.

function ba_eas_add_settings_menu() {
    add_options_page(
        __( 'Edit Author Slug Settings', 'edit-author-slug' ),
        __( 'Edit Author Slug', 'edit-author-slug' ),
    apply_filters('ba_eas_add_settings_menu', 'edit_users'),
    'edit-author-slug',
        'ba_eas_settings_page_html'
    );
}
sidouglas commented 5 years ago

Thank you! 👍

thebrandonallen commented 5 years ago

No problem. Thanks for catching and reporting that!