Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I turned on my Debugger and got this error...

Notice: register_sidebar_widget is deprecated since version 2.8! Use wp_register_sidebar_widget() instead. in /home/content/19/9468119/html/wp-includes/functions.php on line 2705

Notice: register_widget_control is deprecated since version 2.8! Use wp_register_widget_control() instead. in /home/content/19/9468119/html/wp-includes/functions.php on line 2705

I went to the line of code in question...

function _deprecated_function( $function, $version, $replacement = null ) {

    do_action( 'deprecated_function_run', $function, $replacement, $version );

    // Allow plugin to filter the output error trigger
    if ( WP_DEBUG && apply_filters( 'deprecated_function_trigger_error', true ) ) {
        if ( ! is_null($replacement) )
            trigger_error( sprintf( __('%1$s is <strong>deprecated</strong> since version %2$s! Use %3$s instead.'), $function, $version, $replacement ) );
        else
            trigger_error( sprintf( __('%1$s is <strong>deprecated</strong> since version %2$s with no alternative available.'), $function, $version ) );
    }
}

what exactly do I change here?

Thanks, J

share|improve this question
    
you need to identify which template is calling the deprecated function; could be functions.php of your theme or a plugin (?) –  Michael Aug 24 '12 at 14:43
    
This mistake is probably done by old wordpress plugin Sideblog Wordpress Plugin –  user45003 Apr 3 at 19:52

1 Answer 1

up vote 3 down vote accepted

From your title:

register_sidebar_widget() is deprecated since version 2.8! Use wp_register_sidebar_widget() instead.

Somewhere in your Theme - in functions.php, or in a function included within functions.php - you're adding custom Widgets. Look for that code, and replace usage of register_sidebar_widget() with wp_register_sidebar_widget().

PROTIP: Use the Log Deprecated Notices Plugin to track down where the deprecated function call is being executed.

share|improve this answer
    
The Log Deprecated Notices really helped...but when I went to change this register_sidebar_widget(array('WP-Ecommerce Search', 'widgets'), 'widget_wpecommerce_search'); register_widget_control(array('WP-Ecommerce Search', 'widgets'), 'widget_wpecommerce_search_control', 250); to this –  user979331 Aug 24 '12 at 15:44
    
wp_register_sidebar_widget(array('WP-Ecommerce Search', 'widgets'), 'widget_wpecommerce_search'); wp_register_widget_control(array('WP-Ecommerce Search', 'widgets'), 'widget_wpecommerce_search_control', 250); it gave me these errors at the top of the page.....Warning: Missing argument 3 for wp_register_sidebar_widget(), called in /home/content/19/9468119/html/wp-content/plugins/wp-e-commerce-search-widget/wp-‌​ecommerce-search-widget.php on line 219 and defined in /home/content/19/9468119/html/wp-includes/widgets.php on line 604 –  user979331 Aug 24 '12 at 15:46
    
Warning: strtolower() expects parameter 1 to be string, array given in /home/content/19/9468119/html/wp-includes/widgets.php on line 607 Warning: strtolower() expects parameter 1 to be string, array given in /home/content/19/9468119/html/wp-includes/widgets.php on line 719 Warning: Cannot modify header information - headers already sent by (output started at /home/content/19/9468119/html/wp-includes/widgets.php:604) in /home/content/19/9468119/html/wp-content/plugins/gold_cart_plugin/gold_shopping_‌​cart.php on line 86 –  user979331 Aug 24 '12 at 15:46
    
That's a separate question (how to use wp_register_sidebar_widget()). Also: did you read the linked Codex entries? They explain function usage. –  Chip Bennett Aug 24 '12 at 15:51
    
Thanks Chip!!!!! –  user979331 Aug 24 '12 at 17:03

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.