• Resolved ssssteve

    (@ssssteve)


    Upgrading to 4.3.0 gives an error:

    ( ! ) Notice: The called constructor method for WP_Widget is <strong>deprecated</strong> since version 4.3.0! Use <pre>__construct()</pre> instead. in [...]\wp-includes\functions.php on line 3457

    Changing tw-recent-posts-widget.php line 48 from:

    $this->WP_Widget('tw-recent-posts', __('TW Recent Posts ', $this->localization_domain), $widget_ops);

    to

    parent::__construct('tw-recent-posts', __('TW Recent Posts ', $this->localization_domain), $widget_ops);

    appears to fix it.

    https://www.ads-software.com/plugins/tw-recent-posts-widget/

Viewing 5 replies - 31 through 35 (of 35 total)
  • mhtcka

    (@mhtcka)

    Hello all,

    I’m having the same issue with deprecated WP_Widget that does not permit me to access my wp-admin page…

    I enabled WP_DEBUG = true in wp-config.php to find out what was going on and i got this PHP warning.
    PHP Warning: Cannot modify header information – headers already sent by…
    The file mentioned widget-flickr.php was checked but no deprecated code was found…

    Following your guidelines, i did a research in my plugins and corrected one deprecated $this->WP_Widget() to parent::__construct() on only one plugin.

    I also researched my theme files for Wp_Widget
    and found many php files with the syntax:

    class wplook_staff_widget extends WP_Widget {

    ? do i have to change this also to:
    class wplook_staff_widget extends __construct {
    ?
    please help…
    Dimitris

    Oh no finally this issue is fixed with the following members suggestion.

    I am facing this issue “The called constructor method for WP_Widget is deprecated since version 4.3.0” this message is continuously showing in my wordpress website. So i searched for answers. Now i got this answer.

    You can hide this kind of error by adding in your functions.php the following line:

    add_filter(‘deprecated_constructor_trigger_error’, ‘__return_false’);

    I hope it helps ??

    THanks a lot @lordgiotto

    Your tip works awesome, great job. Helped your suggestion.

    For all other who are facing this issue, please go to your theme folder.
    Open Function.php file.
    Go to last line and simply copy paste the below code and save it.
    add_filter(‘deprecated_constructor_trigger_error’, ‘__return_false’);

    It is working great.

    i have tried all tutorial above but my website still can’t open , only can login in wp-admin .
    .
    so i looking for other solution.
    then i try to downgrade wordpress version to 4.3.1 and RESOLVED .
    .
    how to downgrade wordpress you can see here : https://www.youtube.com/watch?v=_lX3E-qIpJM .
    .
    hope this help your problem . im sorry if before if my tutorial not worked.
    .
    thank you

    Hi there,

    I am not a developer. How can I solve this.

    Regards

    instead. in /home/content/q/u/i/quillor/html/home/wp-includes/functions.php on line 3718

    Notice: The called constructor method for WP_Widget in AdsenseWidget is deprecated since version 4.3.0! Use
    __construct()
    instead. in /home/content/q/u/i/quillor/html/home/wp-includes/functions.php on line 3718

    Notice: The called constructor method for WP_Widget in AdvWidget is deprecated since version 4.3.0! Use
    __construct()
    instead. in /home/content/q/u/i/quillor/html/home/wp-includes/functions.php on line 3718

    Warning: session_start() [function.session-start]: Cannot send session cache limiter – headers already sent (output started at /home/content/q/u/i/quillor/html/home/wp-includes/functions.php:3718) in /home/content/q/u/i/quillor/html/home/wp-content/themes/Divi/header.php on line 1

    Please help..

Viewing 5 replies - 31 through 35 (of 35 total)
  • The topic ‘Notice: WP_Widget is deprecated since version 4.3.0’ is closed to new replies.