WordPress.org

Forums

WP SyntaxHighlighter
[resolved] deprecated usage of has_cap (4 posts)

  1. nbseminary
    Member
    Posted 4 years ago #

    I get the following php notice when I install this plugin
    "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"

    http://wordpress.org/extend/plugins/wp-syntaxhighlighter/

  2. redcocker
    Member
    Plugin Author

    Posted 4 years ago #

    Hi, nbseminary san

    Thank you for your report.

    I will fix this notice for the next version.

    If in a hurry, try to edit "/wp-content/plugins/wp-syntaxhighlighter/wp-syntaxhighlighter.php",

    and replace strings in 231 line,

    add_options_page('WP SyntaxHighlighter Options', 'WP SyntaxHighlighter', 10, 'wp-syntaxhighlighter-options', 'wp_sh_options_panel');

    with

    add_options_page('WP SyntaxHighlighter Options', 'WP SyntaxHighlighter', 'administrator', 'wp-syntaxhighlighter-options', 'wp_sh_options_panel');

  3. redcocker
    Member
    Plugin Author

    Posted 4 years ago #

    In next version, I will replace it with

    add_options_page('WP SyntaxHighlighter Options', 'WP SyntaxHighlighter', 'manage_options', 'wp-syntaxhighlighter-options', 'wp_sh_options_panel');

    I think 'manage_options' is better than 'administrator'.

  4. redcocker
    Member
    Plugin Author

    Posted 4 years ago #

    I released ver. 1.3.6.
    This version has a fix about this problem.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WP SyntaxHighlighter
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic