WordPress.org

Ready to get started?Download WordPress

Forums

Tango Smileys Extended
[resolved] has_cap was called with an argument that is deprecated since version 2.0 (2 posts)

  1. travelvice
    Member
    Posted 3 years ago #

    This plugin is throwing the following error in the admin menu:

    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.

    The offending function is:

    function tse_add_options_submenu() {
    	$tse_options_page = add_submenu_page( 'options-general.php', 'Tango Smileys Extended: Options', 'Tango Smileys Extended', 10, 'tango-smileys-extended', 'tse_options' );
    	add_action( "admin_print_scripts-$tse_options_page", 'tse_options_script' );
    	add_action( "admin_print_styles-$tse_options_page", 'tse_options_style' );
    }

    Passing 10 as a permissions level is no more. This value should be a string. Since I'm the only user I've replaced 10 with 'read' and the error clears up nicely.

    $tse_options_page = add_submenu_page( 'options-general.php', 'Tango Smileys Extended: Options', 'Tango Smileys Extended', 'read', 'tango-smileys-extended', 'tse_options' );

    http://wordpress.org/extend/plugins/tango-smileys-extended/

  2. whesleymccabe
    Member
    Plugin Author

    Posted 3 years ago #

    This has been fixed. I haven't noticed any error, but you are correct about the depreciation.

    Thanks!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic