Support » Plugin: Admin renamer extended » Has_cap error?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author ramon fincken


    I never call some has_cap()

    find -name '*.php' -exec grep 'has_cap' {} +
    returns an empty list.

    I only use the WP default call:
    if (is_admin()) {

    The issue is not in the word ‘has_cap’, but in the way you are checking for user role permissions. This is the culprit (line 41 in admin.php):

    add_submenu_page("plugins.php", "Admin renamer extended", "Admin renamer extended", 10, __FILE__, 'plugin_admin_renamer_initpage');

    Notice that 10 in there? You are looking for a user to have a user level of 10. This is not the way to do it. Change the 10 to say “activate_plugins”, which is something set for admins and super admin (in a MU setup) and that will fix the issue right up.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Has_cap error?’ is closed to new replies.