[wp-trac] [WordPress Trac] #32480: Add _doing_it_wrong method call to WP_Widget PHP4 style constructor

WordPress Trac noreply at wordpress.org
Mon May 25 03:04:38 UTC 2015


#32480: Add _doing_it_wrong method call to WP_Widget PHP4 style constructor
-------------------------+-----------------------------
 Reporter:  welcher      |      Owner:
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  Widgets      |    Version:  trunk
 Severity:  normal       |   Keywords:
  Focuses:               |
-------------------------+-----------------------------
 WP_Widget contains a PHP4 style constructor for backwards compatibility.
 As was noted in #20801 PHP7 is removing them  -
 https://wiki.php.net/rfc/remove_php4_constructors.

 WordPress still supports PHP 5.2 so removing them is not an option but I
 would like to introduce a `_doing_it_wrong` call if the the PHP4 style
 constructor is used to hopefully prompt the widget author to use
 `__construct` instead.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/32480>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list