User Photo
Deprecated 'has_cap' function warning (1 post)

  1. Rutwick Gangurde
    Posted 3 years ago #

    This is quite a neat plugin for uploading a user pic. But there are a couple of warnings that may disturb something in your site! One of these warnings is:

    Notice: has_cap was called with an argument that is deprecated since version 2.0! Usage of user levels by plugins and themes is deprecated. Use roles and capabilities instead. in /xyz/wp-includes/functions.php on line 2712

    The solution is to use current_user_can() instead. For example:
    The line:
    $current_user->has_cap('edit_users') is deprecated
    Instead use:

    You can directly change the plugin file, but it is not recommended as a plugin update might overwrite your changes (if the authors don't implement this!)

    AUTHORS, please change this! ;)

    Hope this helps!

    - Rutwick


Topic Closed

This topic has been closed to new replies.

About this Plugin

  • User Photo
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic