Deprecated problem, can't figure it out
-
Hello,
I am doing a plugin tutorial but it was made for wordpress 2. something.
The problem is – when I go to admin menu, under Settings – I get a notice error =>
” 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 C:\wamp\www\jw\wp-includes\functions.php on line 3017″
This is the relevant code:
<?php if ( ! class_exists('SBC_Admin') ) { class SBC_Admin { function add_config_page() { if ( function_exists('add_submenu_page') ) { add_options_page( 'Seach by Category Options', 'Search by Category', 10, basename(__FILE__), array('SBC_Admin', 'config_page') ); } } function config_page() { if ( isset($_POST['submit']) ) { // we're updating options }?> <div class="wrap"> <h2>Search by category options</h2> <form action="" method="post" id="sbc-config"> </form> </div> <?php } } } // insert into admin panel add_action('admin_menu', array('SBC_Admin', 'add_config_page')); ?>
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Deprecated problem, can't figure it out’ is closed to new replies.