WPIntell

Source evidence

constructor method for WP_Widget is deprecated

CoolClock – a Javascript Analog Clock · support · 2015-08-18T21:37:00+00:00

mixedsentiment
mediumseverity
0.84relevance
5replies
Evidence onlycommercial context

Proof Health

Open evidence

Commercial opportunities need traceable source links before they are treated as build-worthy.

1 / 1 rows with source links

100.0% of this page's analysis has direct source links.

0 build-decision rows missing links

0 rows here require auditable proof before promotion.

0 rows with no attached evidence

0 rows have source counts but still need direct links.

Conversation

support
leejosepho resolved
Following WordPress 4.3 update: Notice: The called constructor method for WP_Widget is deprecated since version 4.3.0! Use __construct() instead. “If you are sub classing a WordPress class and calling the PHP4 constructor, you should update your code to use parent::__construct instead. You should also audit your own code to make sure it is using PHP5 style constructors.” https://make.wordpress.org/core/2015/07/02/deprecating-php4-style-constructors-in-wordpress-4-3/ “Here is a list of plugins (or rather the WordPress.org slugs for them) recently detected… https://gist.github.com/chriscct7/d7d077afb01011b1839d “Friends don’t let friends use PHP 4 style constructors.” https://www.google.com/search?q=called+constructor+method+for+WP_Widget+is+deprecated https://wordpress.org/plugins/coolclock/ Hi leejosepho thanks for pointing this out. it’s fixed in the new release 🙂 I had checked each plugin I use against the list, and I would have been surprised if you had not been the first to respond! Many thanks for your commitment and WordPress contributions. Hello again, RavanH. I am getting this at the Dashboard and also at the front of the site in my local installation: Strict Standards: Redefining already defined constructor for class CoolClock_Widget in ~~~\wp-content\plugins\coolclock\coolclock.php on line 458 I have not yet checked a live site. Hmmm… That should only show if you have E_STRICT error logging defined. I suppose I’ll need to drop all PHP4 backward compatibility to get rid of this Strict Standards notice. Since WordPress doesn’t support PHP4 (since version 3.2) any more either it won’t be a big problem, so why not 😉 Sounds right to me! Many thanks.

Comments

5 shown
Rolf Allard van Hagen 2015-08-19T00:50:00+00:00

Hi leejosepho thanks for pointing this out. it’s fixed in the new release 🙂

leejosepho 2015-08-19T01:07:00+00:00

I had checked each plugin I use against the list, and I would have been surprised if you had not been the first to respond! Many thanks for your commitment and WordPress contributions.

leejosepho 2015-08-22T17:11:00+00:00

Hello again, RavanH. I am getting this at the Dashboard and also at the front of the site in my local installation: Strict Standards: Redefining already defined constructor for class CoolClock_Widget in ~~~\wp-content\plugins\coolclock\coolclock.php on line 458 I have not yet checked a live site.

Rolf Allard van Hagen 2015-08-22T19:11:00+00:00

Hmmm… That should only show if you have E_STRICT error logging defined. I suppose I’ll need to drop all PHP4 backward compatibility to get rid of this Strict Standards notice. Since WordPress doesn’t support PHP4 (since version 3.2) any more either it won’t be a big problem, so why not 😉

leejosepho 2015-08-22T19:31:00+00:00

Sounds right to me! Many thanks.