Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // WP_Widget is deprecated since version 4.3.0! Use __construct()
- --------------------------------------------------------------------------------
- solution 1
- Until you figure out which plugin is causing the issue, turn your site debug off. Place/edit this in wp-config.php:
- define('WP_DEBUG', false);
- see more here https://codex.wordpress.org/Debugging_in_WordPress
- --------------------------------------------------------------------------------
- ----------------------------------------------------------------------------------
- solution 2
- class GoogleAdsensePlugAndPlayWidget extends WP_Widget
- {
- function __construct()
- {
- $widget_ops = array('classname' => 'GoogleAdsensePlugAndPlayWidget', 'description' => 'Adsense Plug & Play - Sidebar add' );
- parent::__construct('GoogleAdsensePlugAndPlayWidget', 'Adsense Plug & Play - Sidebar add', $widget_ops);
- }
- // ...........
- }
- ----------------------------------------------------------------------------------
- -----------------------------------------------------------------------------------
- solution 3
- add_filter('deprecated_constructor_trigger_error', '__return_false');
- -----------------------------------------------------------------------------------
- ----------------------------------------------------------------------------------
- solution 4
- if your code show like below
- function VMenuWidget() {
- $widget_ops = array('classname' => 'vmenu', 'description' => __('Use this widget to add one of your custom menus as a widget.', THEME_NS) );
- //parent::WP_Widget( false , __('Vertical Menu', THEME_NS), $widget_ops );
- parent::__construct( false , __('Vertical Menu', THEME_NS), $widget_ops );
- }
- we have to update
- function LoginWidget(){
- $widget_ops = array('classname' => 'login', 'description' => __( 'Login form', THEME_NS) );
- //$this->WP_Widget(false, __('Login', THEME_NS), $widget_ops);
- parent::__construct(false, __('Login', THEME_NS), $widget_ops);
- }
- that means use parent::__construct OR parent::WP_Widget instead of $this->WP_Widget
- ------------------------------------------------------------------------------------
- ------------------------------------------------------------------------------------
- solution 5
- Here is the solution
- First find $this->WP_Widget( from your directory. For this you can use Find in Files in windows. Find $this->WP_Widget( , select your directory and then click on Find All. Here is the image
- After that select that file/files where $this->WP_Widget( found and replace with parent::__construct(. I think your error will be solved.
- Enjoy It.
- Thank you.
- ------------------------------------------------------------------------------------
- ---------------------------------------------------------------------------------------
- solution 6
- https://gist.github.com/chriscct7/d7d077afb01011b1839d
- -----------------------------------------------------------------------------------------
- ---------------------------------------------------------------------------------------
- solution 7
- https://circlecube.com/says/2015/09/how-to-fix-the-called-constructor-method-for-wp_widget-is-deprecated-since-version-4-3-0/
- -----------------------------------------------------------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement