How do I deal with this deprecated code?

I hope I can get some assistance working this problem out, it’s a bit beyond my abilities.

I have a WordPress site using a jQuery drop down plugin called ‘jQuery Vertical Accordion Menu’. The site has just been through a massive overhaul and the plugin is now giving these errors. Can anybody advise me on what changes I need to make to fix things? (I have contacted the developer of the plugin but am yet to hear from them). The following is one of the error messages followed by the function I think it’s referring to:

Notice: The called constructor method for WP_Widget in dc_jqaccordion_widget is deprecated since version 4.3.0! Use


instead. in /container/application/public/wp-includes/functions.php on line 3893

function dc_jqaccordion_widget() {

    $name =         'jQuery Accordion Menu';
    $desc =         'Vertical Accordion From Custom Menus';
    $id_base =      'dc_jqaccordion_widget';
    $widget_base =  'dc_jqaccordion_widget_item';
    $css_class =    '';
    $alt_option =   'widget_dcjq_accordion_navigation'; 

    $widget_ops = array(
        'classname' => $css_class,
        'description' => __( $desc, 'dcjq-accordion' ),
    parent::WP_Widget( 'nav_menu', __('Custom Menu'), $widget_ops );

    $this->WP_Widget($id_base, __($name, 'dcjqaccordion'), $widget_ops); 

    $this->alt_option_name = $alt_option;

    add_action( 'wp_head', array(&$this, 'styles'), 10, 1 );    
    add_action( 'wp_footer', array(&$this, 'footer'), 10, 1 );  

    $this->defaults = array(
        'title' => '',
        'event' => 'click',
        'hoverDelay' => '300',
        'menuClose' => 'on',
        'autoClose' => 'on',
        'saveState' => 'on',
        'autoExpand' => 'off',
        'showCount' => 'off',
        'speed' => 'slow',
        'disableLink' => 'on',
        'classDisable' => 'on',
        'classMenu' => '',
        'skin' => 'demo.css'

Read more here: How do I deal with this deprecated code?

Leave a Reply

Your email address will not be published. Required fields are marked *