<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" /><style type="text/css"><!--
#msg dl { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fc0 solid; padding: 6px; }
#msg ul, pre { overflow: auto; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<title>[17655] trunk/wp-includes: Remove PHP4 constructors.</title>
</head>
<body>

<div id="msg">
<dl>
<dt>Revision</dt> <dd><a href="http://trac.wordpress.org/changeset/17655">17655</a></dd>
<dt>Author</dt> <dd>ryan</dd>
<dt>Date</dt> <dd>2011-04-18 21:46:57 +0000 (Mon, 18 Apr 2011)</dd>
</dl>

<h3>Log Message</h3>
<pre>Remove PHP4 constructors. Props scribu. fixes <a href="http://trac.wordpress.org/ticket/16768">#16768</a></pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpincludesdefaultwidgetsphp">trunk/wp-includes/default-widgets.php</a></li>
<li><a href="#trunkwpincludeswidgetsphp">trunk/wp-includes/widgets.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpincludesdefaultwidgetsphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/default-widgets.php (17654 => 17655)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/default-widgets.php        2011-04-18 21:45:20 UTC (rev 17654)
+++ trunk/wp-includes/default-widgets.php        2011-04-18 21:46:57 UTC (rev 17655)
</span><span class="lines">@@ -13,9 +13,9 @@
</span><span class="cx">  */
</span><span class="cx"> class WP_Widget_Pages extends WP_Widget {
</span><span class="cx"> 
</span><del>-        function WP_Widget_Pages() {
</del><ins>+        function __construct() {
</ins><span class="cx">                 $widget_ops = array('classname' =&gt; 'widget_pages', 'description' =&gt; __( 'Your site&amp;#8217;s WordPress Pages') );
</span><del>-                $this-&gt;WP_Widget('pages', __('Pages'), $widget_ops);
</del><ins>+                parent::__construct('pages', __('Pages'), $widget_ops);
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         function widget( $args, $instance ) {
</span><span class="lines">@@ -89,9 +89,9 @@
</span><span class="cx">  */
</span><span class="cx"> class WP_Widget_Links extends WP_Widget {
</span><span class="cx"> 
</span><del>-        function WP_Widget_Links() {
</del><ins>+        function __construct() {
</ins><span class="cx">                 $widget_ops = array('description' =&gt; __( &quot;Your blogroll&quot; ) );
</span><del>-                $this-&gt;WP_Widget('links', __('Links'), $widget_ops);
</del><ins>+                parent::__construct('links', __('Links'), $widget_ops);
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         function widget( $args, $instance ) {
</span><span class="lines">@@ -170,9 +170,9 @@
</span><span class="cx">  */
</span><span class="cx"> class WP_Widget_Search extends WP_Widget {
</span><span class="cx"> 
</span><del>-        function WP_Widget_Search() {
</del><ins>+        function __construct() {
</ins><span class="cx">                 $widget_ops = array('classname' =&gt; 'widget_search', 'description' =&gt; __( &quot;A search form for your site&quot;) );
</span><del>-                $this-&gt;WP_Widget('search', __('Search'), $widget_ops);
</del><ins>+                parent::__construct('search', __('Search'), $widget_ops);
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         function widget( $args, $instance ) {
</span><span class="lines">@@ -213,9 +213,9 @@
</span><span class="cx">  */
</span><span class="cx"> class WP_Widget_Archives extends WP_Widget {
</span><span class="cx"> 
</span><del>-        function WP_Widget_Archives() {
</del><ins>+        function __construct() {
</ins><span class="cx">                 $widget_ops = array('classname' =&gt; 'widget_archive', 'description' =&gt; __( 'A monthly archive of your site&amp;#8217;s posts') );
</span><del>-                $this-&gt;WP_Widget('archives', __('Archives'), $widget_ops);
</del><ins>+                parent::__construct('archives', __('Archives'), $widget_ops);
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         function widget( $args, $instance ) {
</span><span class="lines">@@ -278,9 +278,9 @@
</span><span class="cx">  */
</span><span class="cx"> class WP_Widget_Meta extends WP_Widget {
</span><span class="cx"> 
</span><del>-        function WP_Widget_Meta() {
</del><ins>+        function __construct() {
</ins><span class="cx">                 $widget_ops = array('classname' =&gt; 'widget_meta', 'description' =&gt; __( &quot;Log in/out, admin, feed and WordPress links&quot;) );
</span><del>-                $this-&gt;WP_Widget('meta', __('Meta'), $widget_ops);
</del><ins>+                parent::__construct('meta', __('Meta'), $widget_ops);
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         function widget( $args, $instance ) {
</span><span class="lines">@@ -326,9 +326,9 @@
</span><span class="cx">  */
</span><span class="cx"> class WP_Widget_Calendar extends WP_Widget {
</span><span class="cx"> 
</span><del>-        function WP_Widget_Calendar() {
</del><ins>+        function __construct() {
</ins><span class="cx">                 $widget_ops = array('classname' =&gt; 'widget_calendar', 'description' =&gt; __( 'A calendar of your site&amp;#8217;s posts') );
</span><del>-                $this-&gt;WP_Widget('calendar', __('Calendar'), $widget_ops);
</del><ins>+                parent::__construct('calendar', __('Calendar'), $widget_ops);
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         function widget( $args, $instance ) {
</span><span class="lines">@@ -367,10 +367,10 @@
</span><span class="cx">  */
</span><span class="cx"> class WP_Widget_Text extends WP_Widget {
</span><span class="cx"> 
</span><del>-        function WP_Widget_Text() {
</del><ins>+        function __construct() {
</ins><span class="cx">                 $widget_ops = array('classname' =&gt; 'widget_text', 'description' =&gt; __('Arbitrary text or HTML'));
</span><span class="cx">                 $control_ops = array('width' =&gt; 400, 'height' =&gt; 350);
</span><del>-                $this-&gt;WP_Widget('text', __('Text'), $widget_ops, $control_ops);
</del><ins>+                parent::__construct('text', __('Text'), $widget_ops, $control_ops);
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         function widget( $args, $instance ) {
</span><span class="lines">@@ -417,9 +417,9 @@
</span><span class="cx">  */
</span><span class="cx"> class WP_Widget_Categories extends WP_Widget {
</span><span class="cx"> 
</span><del>-        function WP_Widget_Categories() {
</del><ins>+        function __construct() {
</ins><span class="cx">                 $widget_ops = array( 'classname' =&gt; 'widget_categories', 'description' =&gt; __( &quot;A list or dropdown of categories&quot; ) );
</span><del>-                $this-&gt;WP_Widget('categories', __('Categories'), $widget_ops);
</del><ins>+                parent::__construct('categories', __('Categories'), $widget_ops);
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         function widget( $args, $instance ) {
</span><span class="lines">@@ -509,9 +509,9 @@
</span><span class="cx">  */
</span><span class="cx"> class WP_Widget_Recent_Posts extends WP_Widget {
</span><span class="cx"> 
</span><del>-        function WP_Widget_Recent_Posts() {
</del><ins>+        function __construct() {
</ins><span class="cx">                 $widget_ops = array('classname' =&gt; 'widget_recent_entries', 'description' =&gt; __( &quot;The most recent posts on your site&quot;) );
</span><del>-                $this-&gt;WP_Widget('recent-posts', __('Recent Posts'), $widget_ops);
</del><ins>+                parent::__construct('recent-posts', __('Recent Posts'), $widget_ops);
</ins><span class="cx">                 $this-&gt;alt_option_name = 'widget_recent_entries';
</span><span class="cx"> 
</span><span class="cx">                 add_action( 'save_post', array(&amp;$this, 'flush_widget_cache') );
</span><span class="lines">@@ -595,9 +595,9 @@
</span><span class="cx">  */
</span><span class="cx"> class WP_Widget_Recent_Comments extends WP_Widget {
</span><span class="cx"> 
</span><del>-        function WP_Widget_Recent_Comments() {
</del><ins>+        function __construct() {
</ins><span class="cx">                 $widget_ops = array('classname' =&gt; 'widget_recent_comments', 'description' =&gt; __( 'The most recent comments' ) );
</span><del>-                $this-&gt;WP_Widget('recent-comments', __('Recent Comments'), $widget_ops);
</del><ins>+                parent::__construct('recent-comments', __('Recent Comments'), $widget_ops);
</ins><span class="cx">                 $this-&gt;alt_option_name = 'widget_recent_comments';
</span><span class="cx"> 
</span><span class="cx">                 if ( is_active_widget(false, false, $this-&gt;id_base) )
</span><span class="lines">@@ -692,10 +692,10 @@
</span><span class="cx">  */
</span><span class="cx"> class WP_Widget_RSS extends WP_Widget {
</span><span class="cx"> 
</span><del>-        function WP_Widget_RSS() {
</del><ins>+        function __construct() {
</ins><span class="cx">                 $widget_ops = array( 'description' =&gt; __('Entries from any RSS or Atom feed') );
</span><span class="cx">                 $control_ops = array( 'width' =&gt; 400, 'height' =&gt; 200 );
</span><del>-                $this-&gt;WP_Widget( 'rss', __('RSS'), $widget_ops, $control_ops );
</del><ins>+                parent::__construct( 'rss', __('RSS'), $widget_ops, $control_ops );
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         function widget($args, $instance) {
</span><span class="lines">@@ -985,9 +985,9 @@
</span><span class="cx">  */
</span><span class="cx"> class WP_Widget_Tag_Cloud extends WP_Widget {
</span><span class="cx"> 
</span><del>-        function WP_Widget_Tag_Cloud() {
</del><ins>+        function __construct() {
</ins><span class="cx">                 $widget_ops = array( 'description' =&gt; __( &quot;Your most used tags in cloud format&quot;) );
</span><del>-                $this-&gt;WP_Widget('tag_cloud', __('Tag Cloud'), $widget_ops);
</del><ins>+                parent::__construct('tag_cloud', __('Tag Cloud'), $widget_ops);
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         function widget( $args, $instance ) {
</span><span class="lines">@@ -1052,9 +1052,9 @@
</span><span class="cx">  */
</span><span class="cx">  class WP_Nav_Menu_Widget extends WP_Widget {
</span><span class="cx"> 
</span><del>-        function WP_Nav_Menu_Widget() {
</del><ins>+        function __construct() {
</ins><span class="cx">                 $widget_ops = array( 'description' =&gt; __('Use this widget to add one of your custom menus as a widget.') );
</span><del>-                parent::WP_Widget( 'nav_menu', __('Custom Menu'), $widget_ops );
</del><ins>+                parent::__construct( 'nav_menu', __('Custom Menu'), $widget_ops );
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         function widget($args, $instance) {
</span></span></pre></div>
<a id="trunkwpincludeswidgetsphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/widgets.php (17654 => 17655)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/widgets.php        2011-04-18 21:45:20 UTC (rev 17654)
+++ trunk/wp-includes/widgets.php        2011-04-18 21:46:57 UTC (rev 17655)
</span><span class="lines">@@ -74,7 +74,7 @@
</span><span class="cx">          * PHP4 constructor
</span><span class="cx">          */
</span><span class="cx">         function WP_Widget( $id_base = false, $name, $widget_options = array(), $control_options = array() ) {
</span><del>-                $this-&gt;__construct( $id_base, $name, $widget_options, $control_options );
</del><ins>+                WP_Widget::__construct( $id_base, $name, $widget_options, $control_options );
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         /**
</span></span></pre>
</div>
</div>

</body>
</html>