WordPress.org

Ready to get started?Download WordPress

Forums

SimpleModal Login
[resolved] Bug Fix (when WP_DEBUG is enabled) (5 posts)

  1. Dan Harrison
    Member
    Posted 3 years ago #

    Hello

    I'm a fellow WP plugin developer. I love the plugin, it's perfect for my needs. My test environment has WP_DEBUG set to true, which throws up an error with your plugin.

    <strong>Notice:</strong> 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 /Applications/MAMP/htdocs/mobilebeauty/wp-includes/functions.php on line 3321

    However, I have fixed it and thought you might appreciate the fix to include in your next release.

    On line 121, in function admin_menu_link():

    Change 10 to 'manage_options'. This removes the reliance on the old has_cap() function.

    Before:
    add_options_page('SimpleModal Login', 'SimpleModal Login', 10, basename(__FILE__), array(&$this, 'admin_options_page'));

    After:
    add_options_page('SimpleModal Login', 'SimpleModal Login', 'manage_options', basename(__FILE__), array(&$this, 'admin_options_page'));

    I've had to do this with all my plugins too :)

    Thanks again!
    Dan

  2. Eric Martin
    Member
    Plugin Author

    Posted 3 years ago #

    Dan, thanks for the tip and fix!

    If you use GitHub, you're welcome to fork and issue a pull request. If not, I'll take care of it ;)

    Thanks again,
    Eric

  3. Dan Harrison
    Member
    Posted 3 years ago #

    Hi Eric

    You're welcome. I've never used GitHub, nor in a rush to :)

    Thanks
    Dan

  4. Eric Martin
    Member
    Plugin Author

    Posted 3 years ago #

    I just started myself. The learning curve is pretty steep; I like the simplicity of SVN, but can appreciate git as well.

    Thanks again for the fix, I'll make sure to get it in the next release.

    -Eric

  5. Eric Martin
    Member
    Plugin Author

    Posted 3 years ago #

    I just checked in the fix. It should be available shortly...

    Thanks again!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic