WordPress.org

Ready to get started?Download WordPress

Forums

BP Admin Actions
Admins are required to be super admin (4 posts)

  1. Mike Manger
    Member
    Posted 2 years ago #

    The plugin currently uses the deprecated is_site_admin() for its functions. This is now replaced by is_super_admin().

    The functionality as it stands is not ideal as we have admins on our site that are not given super admin powers. To resolve this we changed the calls on lines 52 & 99 with current_user_can('administrator').

    http://wordpress.org/extend/plugins/bp-admin-actions/

  2. Eric Langley
    Member
    Posted 1 year ago #

    I have the same issue. What would the syntax be to add multiple roles?

  3. Eric Langley
    Member
    Posted 1 year ago #

    Also, the existing code for these lines is:
    if(is_site_admin())

    Where would 'current_user_can('administrator')' go in relation to the existing code, would all of it be removed and replaced, including the 'if'?

    [ Signature moderated. ]

  4. Mike Manger
    Member
    Posted 1 year ago #

    Hi Eric, the whole line looks like if(current_user_can('administrator'))

    As for adding multiple roles you can try and change administrator to one of the other roles or capabilities. E.g. if you want to give editors access try current_user_can('editor'). Administrators should still have access.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic