• Resolved szilka

    (@booknewsinc)


    Activating DevDmBootstrap3 on WP 4.3.1 gives me this error:
    Notice: The called constructor method for WP_Widget is deprecated since version 4.3.0! Use __construct()

    I fixed it by changing these lines in bootstrap-custom-menu-widget.php:
    function bootstrap_custom_menu() {

    $widget_ops = array( ‘classname’ => ‘bootstrapwidgetmenu’, ‘description’ => __(‘A custom menu widget that uses the wp_bootstrap_navwalker’, ‘devdmbootstrap3’));

    $control_ops = array( ‘width’ => 300, ‘height’ => 350, ‘id_base’ => ‘bootstrap-widget-menu’);

    $this->WP_Widget( ‘bootstrap-widget-menu’, __(‘Boot Strap Menu’, ‘devdmbootstrap3’), $widget_ops, $control_ops);
    }

    to this:

    function __construct() {
    parent::__construct(
    ‘bootstrap-widget-menu’, // Base ID
    __(‘Boot Strap Menu’, ‘devdmbootstrap3’), // Name
    array(‘description’ => __(‘A custom menu widget that uses the wp_bootstrap_navwalker’, ‘devdmbootstrap3’), )
    );
    }

    // $widget_ops = array( ‘classname’ => ‘bootstrapwidgetmenu’, ‘description’ => __(‘A custom menu widget that uses the wp_bootstrap_navwalker’, ‘devdmbootstrap3’));

    // $control_ops = array( ‘width’ => 300, ‘height’ => 350, ‘id_base’ => ‘bootstrap-widget-menu’);

    // $this->WP_Widget( ‘bootstrap-widget-menu’, __(‘Boot Strap Menu’, ‘devdmbootstrap3’), $widget_ops, $control_ops);
    // }

    Thanks for a great theme!

Viewing 1 replies (of 1 total)
  • Theme Author DevDm

    (@devdm)

    Thanks for this. I would try to push out an update to correct it but I fear they are going to reject it with the “must use customizer” policy that is going into effect. But I’ll try. ??

Viewing 1 replies (of 1 total)
  • The topic ‘constructor method error’ is closed to new replies.