Deprecated WP SEO constructor call notice.
-
# Description
With warnings enabled, WP Social SEO Booster generates the following:Notice: The called constructor method for WP_Widget is deprecated since version 4.3.0! Use
__construct()
instead. in wp-includes/functions.php on line 3457
# Cause
The warning is generated by line 41 of wp-social-seo-booster/includes/widgets/vcard-widget-business.php:/* Creating the widget. */ $this->WP_Widget( 'widget_wps_seo_booster_business_vcard', __( 'SEO Booster: Business vCard', 'wpsseo' ), $widget_ops );
It’s also generated by line 61 of wp-social-seo-booster/includes/widgets/wps-seo-booster-ratings-widget.php, which is comparable.
# Fix
Instead of$this->WP_Widget(...)
, the parent constructor should be invoked asparent::__construct(...)
:/* Creating the widget. */ parent::__construct( 'widget_wps_seo_booster_business_vcard', __( 'SEO Booster: Business vCard', 'wpsseo' ), $widget_ops );
- The topic ‘Deprecated WP SEO constructor call notice.’ is closed to new replies.