WordPress.org

Forums

Simple Links
[resolved] hide simple links for non-admin roles (3 posts)

  1. Francesco
    Member
    Posted 2 years ago #

    hi,

    I need to completely hide simple link for all those users who doesn't have the role of Administrator. I've seen this page: http://lipeimagination.info/simple-links-docs/ but I need to restrict access also to All links and Add link pages

    http://wordpress.org/extend/plugins/simple-links/

  2. Mat Lipe
    Member
    Plugin Author

    Posted 2 years ago #

    Hello Francesco,

    Although, it is on the list for a future release, their are currently no capabilities to adjust for the Simple Links themselves.

    Currently the only way to prevent non-admin users from using the links it to remove it from the menu. This does not prevent other users from getting to the links directly if they have the url, but it should get you closer.

    Add this to your theme's functions.php file to remove the menu for non-admins.

    add_action('admin_menu', 'remove_s_links');
    function remove_s_links(){
        if( !current_user_can('administrator') ){
            remove_menu_page('edit.php?post_type=simple_link');
        }
    }

    Cheers

  3. Francesco
    Member
    Posted 2 years ago #

    ok, it works, thank for the reply

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Simple Links
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic