WordPress.org

Forums

WP-Paginate
[resolved] Deprecated argument for capabilities (4 posts)

  1. MHagemeister
    Member
    Posted 4 years ago #

    WP-Paginate uses old user levels. Should use roles and capabilities instead.

    Steps to reproduce:

    Set WP_DEBUG to true in wp-config.php

    Error Message:

    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.

  2. MHagemeister
    Member
    Posted 4 years ago #

    Found the line producing the error. WP-Paginate uses the deprecated user-level mechanism.

    Change

    Line 259:
    add_options_page('WP-Paginate', 'WP-Paginate', 10, basename(__FILE__), array(&$this, 'admin_options_page'));

    to

    Line 259:
    add_options_page('WP-Paginate', 'WP-Paginate', 'activate_plugin', basename(__FILE__), array(&$this, 'admin_options_page'));

  3. Eric Martin
    Member
    Plugin Author

    Posted 4 years ago #

    Thanks for reporting it. I made the change a while ago, but never checked it in...thanks for the reminder!

  4. MHagemeister
    Member
    Posted 4 years ago #

    Your welcome Thanks for a great plugin :)

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WP-Paginate
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic