• Resolved Dan Harrison

    (@danharrison)


    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

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Eric

    (@emartin24)

    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

    Thread Starter Dan Harrison

    (@danharrison)

    Hi Eric

    You’re welcome. I’ve never used GitHub, nor in a rush to ??

    Thanks
    Dan

    Plugin Author Eric

    (@emartin24)

    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

    Plugin Author Eric

    (@emartin24)

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

    Thanks again!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Plugin: SimpleModal Login] Bug Fix (when WP_DEBUG is enabled)’ is closed to new replies.