Make WordPress Core

Ticket #31982: 31982.4.diff

File 31982.4.diff, 27.9 KB (added by jorbin, 10 years ago)
  • src/wp-admin/includes/class-ftp-pure.php

     
    2727 */
    2828class ftp extends ftp_base {
    2929
     30        function __construct($verb=FALSE, $le=FALSE) {
     31                parent::__construct(false, $verb, $le);
     32        }
     33
    3034        function ftp($verb=FALSE, $le=FALSE) {
    3135                $this->__construct($verb, $le);
    3236        }
    3337
    34         function __construct($verb=FALSE, $le=FALSE) {
    35                 parent::__construct(false, $verb, $le);
    36         }
    37 
    3838// <!-- --------------------------------------------------------------------------------------- -->
    3939// <!--       Private functions                                                                 -->
    4040// <!-- --------------------------------------------------------------------------------------- -->
  • src/wp-admin/includes/class-ftp-sockets.php

     
    2727 */
    2828class ftp extends ftp_base {
    2929
     30        function __construct($verb=FALSE, $le=FALSE) {
     31                parent::__construct(true, $verb, $le);
     32        }
     33
    3034        function ftp($verb=FALSE, $le=FALSE) {
    3135                $this->__construct($verb, $le);
    3236        }
    3337
    34         function __construct($verb=FALSE, $le=FALSE) {
    35                 parent::__construct(true, $verb, $le);
    36         }
    37 
    3838// <!-- --------------------------------------------------------------------------------------- -->
    3939// <!--       Private functions                                                                 -->
    4040// <!-- --------------------------------------------------------------------------------------- -->
  • src/wp-admin/includes/class-ftp.php

     
    121121        var $AutoAsciiExt;
    122122
    123123        /* Constructor */
    124         function ftp_base($port_mode=FALSE) {
    125                 $this->__construct($port_mode);
    126         }
    127 
    128124        function __construct($port_mode=FALSE, $verb=FALSE, $le=FALSE) {
    129125                $this->LocalEcho=$le;
    130126                $this->Verbose=$verb;
     
    157153                elseif(strtoupper(substr(PHP_OS, 0, 3)) === 'MAC') $this->OS_local=FTP_OS_Mac;
    158154        }
    159155
     156        function ftp_base($port_mode=FALSE) {
     157                $this->__construct($port_mode);
     158        }
     159
    160160// <!-- --------------------------------------------------------------------------------------- -->
    161161// <!--       Public functions                                                                  -->
    162162// <!-- --------------------------------------------------------------------------------------- -->
  • src/wp-admin/includes/class-pclzip.php

     
    212212  //   Note that no real action is taken, if the archive does not exist it is not
    213213  //   created. Use create() for that.
    214214  // --------------------------------------------------------------------------------
    215   function PclZip($p_zipname)
     215  function __construct($p_zipname)
    216216  {
    217217
    218218    // ----- Tests the zlib
     
    229229    // ----- Return
    230230    return;
    231231  }
     232
     233  public function PclZip($p_zipname) {
     234    self::__construct($p_zipname);
     235  }
    232236  // --------------------------------------------------------------------------------
    233237
    234238  // --------------------------------------------------------------------------------
  • src/wp-admin/includes/deprecated.php

     
    470470        var $paging_text;
    471471
    472472        /**
    473          * PHP4 Constructor - Sets up the object properties.
     473         * PHP5 Constructor - Sets up the object properties.
    474474         *
    475475         * @since 2.1.0
    476476         *
     
    479479         * @param string $role Role name.
    480480         * @return WP_User_Search
    481481         */
    482         function WP_User_Search ($search_term = '', $page = '', $role = '') {
     482        function __construct( $search_term = '', $page = '', $role = '' ) {
    483483                _deprecated_function( __FUNCTION__, '3.1', 'WP_User_Query' );
    484484
    485485                $this->search_term = wp_unslash( $search_term );
     
    493493        }
    494494
    495495        /**
     496         * PHP4 Constructor - Sets up the object properties.
     497         *
     498         * @since 2.1.0
     499         *
     500         * @param string $search_term Search terms string.
     501         * @param int $page Optional. Page ID.
     502         * @param string $role Role name.
     503         * @return WP_User_Search
     504         */
     505        public function WP_User_Search( $search_term = '', $page = '', $role = '' ) {
     506                self::__construct( $search_term, $page, $role );
     507        }
     508
     509        /**
    496510         * {@internal Missing Short Description}}
    497511         *
    498512         * {@internal Missing Long Description}}
  • src/wp-includes/Text/Diff/Renderer.php

     
    3333    /**
    3434     * Constructor.
    3535     */
    36     function Text_Diff_Renderer($params = array())
     36    function __construct( $params = array() )
    3737    {
    3838        foreach ($params as $param => $value) {
    3939            $v = '_' . $param;
     
    4343        }
    4444    }
    4545
     46        /**
     47         * PHP4 constructor.
     48         */
     49        public function Text_Diff_Renderer( $params = array() ) {
     50                self::__construct( $params );
     51        }
     52
    4653    /**
    4754     * Get any renderer parameters.
    4855     *
  • src/wp-includes/Text/Diff.php

     
    3333     *                           Normally an array of two arrays, each
    3434     *                           containing the lines from a file.
    3535     */
    36     function Text_Diff($engine, $params)
     36    function __construct( $engine, $params )
    3737    {
    3838        // Backward compatibility workaround.
    3939        if (!is_string($engine)) {
     
    5555        $this->_edits = call_user_func_array(array($diff_engine, 'diff'), $params);
    5656    }
    5757
     58        /**
     59         * PHP4 constructor.
     60         */
     61        public function Text_Diff( $engine, $params ) {
     62                self::__construct( $engine, $params );
     63        }
     64
    5865    /**
    5966     * Returns the array of differences.
    6067     */
     
    304311     * @param array $mapped_to_lines    This array should have the same number
    305312     *                                  of elements as $to_lines.
    306313     */
    307     function Text_MappedDiff($from_lines, $to_lines,
     314    function __construct($from_lines, $to_lines,
    308315                             $mapped_from_lines, $mapped_to_lines)
    309316    {
    310317        assert(count($from_lines) == count($mapped_from_lines));
     
    328335        }
    329336    }
    330337
     338        /**
     339         * PHP4 constructor.
     340         */
     341        public function Text_MappedDiff( $from_lines, $to_lines,
     342                             $mapped_from_lines, $mapped_to_lines ) {
     343                self::__construct( $from_lines, $to_lines,
     344                             $mapped_from_lines, $mapped_to_lines );
     345        }
     346
    331347}
    332348
    333349/**
     
    366382 */
    367383class Text_Diff_Op_copy extends Text_Diff_Op {
    368384
    369     function Text_Diff_Op_copy($orig, $final = false)
     385        /**
     386         * PHP5 constructor.
     387         */
     388    function __construct( $orig, $final = false )
    370389    {
    371390        if (!is_array($final)) {
    372391            $final = $orig;
     
    375394        $this->final = $final;
    376395    }
    377396
     397        /**
     398         * PHP4 constructor.
     399         */
     400        public function Text_Diff_Op_copy( $orig, $final = false ) {
     401                self::__construct( $orig, $final );
     402        }
     403
    378404    function &reverse()
    379405    {
    380406        $reverse = new Text_Diff_Op_copy($this->final, $this->orig);
     
    391417 */
    392418class Text_Diff_Op_delete extends Text_Diff_Op {
    393419
    394     function Text_Diff_Op_delete($lines)
     420        /**
     421         * PHP5 constructor.
     422         */
     423        function __construct( $lines )
    395424    {
    396425        $this->orig = $lines;
    397426        $this->final = false;
    398427    }
    399428
     429        /**
     430         * PHP4 constructor.
     431         */
     432        public function Text_Diff_Op_delete( $lines ) {
     433                self::__construct( $lines );
     434        }
     435
    400436    function &reverse()
    401437    {
    402438        $reverse = new Text_Diff_Op_add($this->orig);
     
    413449 */
    414450class Text_Diff_Op_add extends Text_Diff_Op {
    415451
    416     function Text_Diff_Op_add($lines)
     452        /**
     453         * PHP5 constructor.
     454         */
     455    function __construct( $lines )
    417456    {
    418457        $this->final = $lines;
    419458        $this->orig = false;
    420459    }
    421460
     461        /**
     462         * PHP4 constructor.
     463         */
     464        public function Text_Diff_Op_add( $lines ) {
     465                self::__construct( $lines );
     466        }
     467
    422468    function &reverse()
    423469    {
    424470        $reverse = new Text_Diff_Op_delete($this->final);
     
    435481 */
    436482class Text_Diff_Op_change extends Text_Diff_Op {
    437483
    438     function Text_Diff_Op_change($orig, $final)
     484        /**
     485         * PHP5 constructor.
     486         */
     487    function __construct( $orig, $final )
    439488    {
    440489        $this->orig = $orig;
    441490        $this->final = $final;
    442491    }
    443492
     493        /**
     494         * PHP4 constructor.
     495         */
     496        public function Text_Diff_Op_change( $orig, $final ) {
     497                self::__construct( $orig, $final );
     498        }
     499
    444500    function &reverse()
    445501    {
    446502        $reverse = new Text_Diff_Op_change($this->final, $this->orig);
  • src/wp-includes/atomlib.php

     
    8787    var $feed;
    8888    var $current;
    8989
    90     function AtomParser() {
     90        /**
     91         * PHP5 constructor.
     92         */
     93    function __construct() {
    9194
    9295        $this->feed = new AtomFeed();
    9396        $this->current = null;
     
    9598        $this->map_xmlns_func = create_function('$p,$n', '$xd = "xmlns"; if(strlen($n[0])>0) $xd .= ":{$n[0]}"; return "{$xd}=\"{$n[1]}\"";');
    9699    }
    97100
     101        /**
     102         * PHP4 constructor.
     103         */
     104        public function AtomParser() {
     105                self::__construct();
     106        }
     107
    98108    function _p($msg) {
    99109        if($this->debug) {
    100110            print str_repeat(" ", $this->depth * $this->indent) . $msg ."\n";
  • src/wp-includes/class-IXR.php

     
    4949    var $data;
    5050    var $type;
    5151
    52     function IXR_Value($data, $type = false)
     52        /**
     53         * PHP5 constructor.
     54         */
     55        function __construct( $data, $type = false )
    5356    {
    5457        $this->data = $data;
    5558        if (!$type) {
     
    6972        }
    7073    }
    7174
     75        /**
     76         * PHP4 constructor.
     77         */
     78        public function IXR_Value( $data, $type = false ) {
     79                self::__construct( $data, $type );
     80        }
     81
    7282    function calculateType()
    7383    {
    7484        if ($this->data === true || $this->data === false) {
     
    194204    // The XML parser
    195205    var $_parser;
    196206
    197     function IXR_Message($message)
     207        /**
     208         * PHP5 constructor.
     209         */
     210    function __construct( $message )
    198211    {
    199212        $this->message =& $message;
    200213    }
    201214
     215        /**
     216         * PHP4 constructor.
     217         */
     218        public function IXR_Message( $message ) {
     219                self::__construct( $message );
     220        }
     221
    202222    function parse()
    203223    {
    204224        // first remove the XML declaration
     
    386406    var $message;
    387407    var $capabilities;
    388408
    389     function IXR_Server($callbacks = false, $data = false, $wait = false)
     409        /**
     410         * PHP5 constructor.
     411         */
     412    function __construct( $callbacks = false, $data = false, $wait = false )
    390413    {
    391414        $this->setCapabilities();
    392415        if ($callbacks) {
     
    398421        }
    399422    }
    400423
     424        /**
     425         * PHP4 constructor.
     426         */
     427        public function IXR_Server( $callbacks = false, $data = false, $wait = false ) {
     428                self::__construct( $callbacks, $data, $wait );
     429        }
     430
    401431    function serve($data = false)
    402432    {
    403433        if (!$data) {
     
    600630    var $args;
    601631    var $xml;
    602632
    603     function IXR_Request($method, $args)
     633        /**
     634         * PHP5 constructor.
     635         */
     636    function __construct($method, $args)
    604637    {
    605638        $this->method = $method;
    606639        $this->args = $args;
     
    620653        $this->xml .= '</params></methodCall>';
    621654    }
    622655
     656        /**
     657         * PHP4 constructor.
     658         */
     659        public function IXR_Request( $method, $args ) {
     660                self::__construct( $method, $args );
     661        }
     662
    623663    function getLength()
    624664    {
    625665        return strlen($this->xml);
     
    653693    // Storage place for an error message
    654694    var $error = false;
    655695
    656     function IXR_Client($server, $path = false, $port = 80, $timeout = 15)
     696        /**
     697         * PHP5 constructor.
     698         */
     699    function __construct( $server, $path = false, $port = 80, $timeout = 15 )
    657700    {
    658701        if (!$path) {
    659702            // Assume we have been given a URL instead
     
    679722        $this->timeout = $timeout;
    680723    }
    681724
     725        /**
     726         * PHP4 constructor.
     727         */
     728        public function IXR_Client( $server, $path = false, $port = 80, $timeout = 15 ) {
     729                self::__construct( $server, $path, $port, $timeout );
     730        }
     731
    682732    function query()
    683733    {
    684734        $args = func_get_args();
     
    798848    var $code;
    799849    var $message;
    800850
    801     function IXR_Error($code, $message)
     851        /**
     852         * PHP5 constructor.
     853         */
     854    function __construct( $code, $message )
    802855    {
    803856        $this->code = $code;
    804857        $this->message = htmlspecialchars($message);
    805858    }
    806859
     860        /**
     861         * PHP4 constructor.
     862         */
     863        public function IXR_Error( $code, $message ) {
     864                self::__construct( $code, $message );
     865        }
     866
    807867    function getXml()
    808868    {
    809869        $xml = <<<EOD
     
    844904    var $second;
    845905    var $timezone;
    846906
    847     function IXR_Date($time)
     907        /**
     908         * PHP5 constructor.
     909         */
     910    function __construct( $time )
    848911    {
    849912        // $time can be a PHP timestamp or an ISO one
    850913        if (is_numeric($time)) {
     
    854917        }
    855918    }
    856919
     920        /**
     921         * PHP4 constructor.
     922         */
     923        public function IXR_Date( $time ) {
     924                self::__construct( $time );
     925        }
     926
    857927    function parseTimestamp($timestamp)
    858928    {
    859929        $this->year = date('Y', $timestamp);
     
    902972{
    903973    var $data;
    904974
    905     function IXR_Base64($data)
     975        /**
     976         * PHP5 constructor.
     977         */
     978    function __construct( $data )
    906979    {
    907980        $this->data = $data;
    908981    }
    909982
     983        /**
     984         * PHP4 constructor.
     985         */
     986        public function IXR_Base64( $data ) {
     987                self::__construct( $data );
     988        }
     989
    910990    function getXml()
    911991    {
    912992        return '<base64>'.base64_encode($this->data).'</base64>';
     
    9241004    var $signatures;
    9251005    var $help;
    9261006
    927     function IXR_IntrospectionServer()
     1007        /**
     1008         * PHP5 constructor.
     1009         */
     1010    function __construct()
    9281011    {
    9291012        $this->setCallbacks();
    9301013        $this->setCapabilities();
     
    9581041        );
    9591042    }
    9601043
     1044        /**
     1045         * PHP4 constructor.
     1046         */
     1047        public function IXR_IntrospectionServer() {
     1048                self::__construct();
     1049        }
     1050
    9611051    function addCallback($method, $callback, $args, $help)
    9621052    {
    9631053        $this->callbacks[$method] = $callback;
     
    10861176{
    10871177    var $calls = array();
    10881178
    1089     function IXR_ClientMulticall($server, $path = false, $port = 80)
     1179        /**
     1180         * PHP5 constructor.
     1181         */
     1182    function __construct( $server, $path = false, $port = 80 )
    10901183    {
    10911184        parent::IXR_Client($server, $path, $port);
    10921185        $this->useragent = 'The Incutio XML-RPC PHP Library (multicall client)';
    10931186    }
    10941187
     1188        /**
     1189         * PHP4 constructor.
     1190         */
     1191        public function IXR_ClientMulticall( $server, $path = false, $port = 80 ) {
     1192                self::__construct( $server, $path, $port );
     1193        }
     1194
    10951195    function addCall()
    10961196    {
    10971197        $args = func_get_args();
  • src/wp-includes/class-json.php

     
    140140    *                                   strings or numbers, if you return an object, make sure it does
    141141    *                                   not have a toJSON method, otherwise an error will occur.
    142142    */
    143     function Services_JSON($use = 0)
     143    function __construct( $use = 0 )
    144144    {
    145145        $this->use = $use;
    146146        $this->_mb_strlen            = function_exists('mb_strlen');
     
    147147        $this->_mb_convert_encoding  = function_exists('mb_convert_encoding');
    148148        $this->_mb_substr            = function_exists('mb_substr');
    149149    }
     150
     151        /**
     152         * PHP4 constructor.
     153         */
     154        public function Services_JSON( $use = 0 ) {
     155                self::__construct( $use );
     156        }
    150157    // private - cache the mbstring lookup results..
    151158    var $_mb_strlen = false;
    152159    var $_mb_substr = false;
     
    910917
    911918    class Services_JSON_Error extends PEAR_Error
    912919    {
    913         function Services_JSON_Error($message = 'unknown error', $code = null,
     920        function __construct($message = 'unknown error', $code = null,
    914921                                     $mode = null, $options = null, $userinfo = null)
    915922        {
    916923            parent::PEAR_Error($message, $code, $mode, $options, $userinfo);
    917924        }
     925
     926        public function Services_JSON_Error($message = 'unknown error', $code = null,
     927                                     $mode = null, $options = null, $userinfo = null) {
     928                self::__construct($message = 'unknown error', $code = null,
     929                                     $mode = null, $options = null, $userinfo = null);
     930        }
    918931    }
    919932
    920933} else {
     
    924937     */
    925938    class Services_JSON_Error
    926939    {
    927         function Services_JSON_Error($message = 'unknown error', $code = null,
    928                                      $mode = null, $options = null, $userinfo = null)
     940            /**
     941             * PHP5 constructor.
     942             */
     943        function __construct( $message = 'unknown error', $code = null,
     944                                     $mode = null, $options = null, $userinfo = null )
    929945        {
    930946
    931947        }
     948
     949            /**
     950             * PHP4 constructor.
     951             */
     952                public function Services_JSON_Error( $message = 'unknown error', $code = null,
     953                                             $mode = null, $options = null, $userinfo = null ) {
     954                        self::__construct( $message, $code, $mode, $options, $userinfo );
     955                }
    932956    }
    933957   
    934958}
  • src/wp-includes/class-phpass.php

     
    3939        var $portable_hashes;
    4040        var $random_state;
    4141
    42         function PasswordHash($iteration_count_log2, $portable_hashes)
     42        /**
     43         * PHP5 constructor.
     44         */
     45        function __construct( $iteration_count_log2, $portable_hashes )
    4346        {
    4447                $this->itoa64 = './0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';
    4548
     
    5255                $this->random_state = microtime() . uniqid(rand(), TRUE); // removed getmypid() for compatibility reasons
    5356        }
    5457
     58        /**
     59         * PHP4 constructor.
     60         */
     61        public function PasswordHash( $iteration_count_log2, $portable_hashes ) {
     62                self::__construct( $iteration_count_log2, $portable_hashes );
     63        }
     64
    5565        function get_random_bytes($count)
    5666        {
    5767                $output = '';
  • src/wp-includes/class-pop3.php

     
    4444                                //  This must be set to true
    4545                                //  manually
    4646
    47     function POP3 ( $server = '', $timeout = '' ) {
     47        /**
     48         * PHP5 constructor.
     49         */
     50    function __construct ( $server = '', $timeout = '' ) {
    4851        settype($this->BUFFER,"integer");
    4952        if( !empty($server) ) {
    5053            // Do not allow programs to alter MAILSERVER
     
    6265        return true;
    6366    }
    6467
     68        /**
     69         * PHP4 constructor.
     70         */
     71        public function POP3( $server = '', $timeout = '' ) {
     72                self::__construct( $server, $timeout );
     73        }
     74
    6575    function update_timer () {
    6676        if (!ini_get('safe_mode'))
    6777            set_time_limit($this->TIMEOUT);
  • src/wp-includes/pomo/entry.php

     
    4040         *      - references (array) -- places in the code this strings is used, in relative_to_root_path/file.php:linenum form
    4141         *      - flags (array) -- flags like php-format
    4242         */
    43         function Translation_Entry($args=array()) {
     43        function __construct( $args = array() ) {
    4444                // if no singular -- empty object
    4545                if (!isset($args['singular'])) {
    4646                        return;
     
    5656        }
    5757
    5858        /**
     59         * PHP4 constructor.
     60         */
     61        public function Translation_Entry( $args = array() ) {
     62                self::__construct( $args );
     63        }
     64
     65        /**
    5966         * Generates a unique key for this entry
    6067         *
    6168         * @return string|bool the key or false if the entry is empty
  • src/wp-includes/pomo/streams.php

     
    1414        var $endian = 'little';
    1515        var $_post = '';
    1616
    17         function POMO_Reader() {
     17        /**
     18         * PHP5 constructor.
     19         */
     20        function __construct() {
    1821                $this->is_overloaded = ((ini_get("mbstring.func_overload") & 2) != 0) && function_exists('mb_substr');
    1922                $this->_pos = 0;
    2023        }
    2124
    2225        /**
     26         * PHP4 constructor.
     27         */
     28        public function POMO_Reader() {
     29                self::__construct();
     30        }
     31
     32        /**
    2333         * Sets the endianness of the file.
    2434         *
    2535         * @param $endian string 'big' or 'little'
     
    130140        /**
    131141         * @param string $filename
    132142         */
    133         function POMO_FileReader($filename) {
     143        function __construct( $filename ) {
    134144                parent::POMO_Reader();
    135145                $this->_f = fopen($filename, 'rb');
    136146        }
    137147
    138148        /**
     149         * PHP4 constructor.
     150         */
     151        public function POMO_FileReader( $filename ) {
     152                self::__construct( $filename );
     153        }
     154
     155        /**
    139156         * @param int $bytes
    140157         */
    141158        function read($bytes) {
     
    196213
    197214        var $_str = '';
    198215
    199         function POMO_StringReader($str = '') {
     216        /**
     217         * PHP5 constructor.
     218         */
     219        function __construct( $str = '' ) {
    200220                parent::POMO_Reader();
    201221                $this->_str = $str;
    202222                $this->_pos = 0;
     
    203223        }
    204224
    205225        /**
     226         * PHP4 constructor.
     227         */
     228        public function POMO_StringReader( $str = '' ) {
     229                self::__construct( $str );
     230        }
     231
     232        /**
    206233         * @param string $bytes
    207234         * @return string
    208235         */
     
    245272 * Reads the contents of the file in the beginning.
    246273 */
    247274class POMO_CachedFileReader extends POMO_StringReader {
    248         function POMO_CachedFileReader($filename) {
     275        /**
     276         * PHP5 constructor.
     277         */
     278        function __construct( $filename ) {
    249279                parent::POMO_StringReader();
    250280                $this->_str = file_get_contents($filename);
    251281                if (false === $this->_str)
     
    252282                        return false;
    253283                $this->_pos = 0;
    254284        }
     285
     286        /**
     287         * PHP4 constructor.
     288         */
     289        public function POMO_CachedFileReader( $filename ) {
     290                self::__construct( $filename );
     291        }
    255292}
    256293endif;
    257294
     
    260297 * Reads the contents of the file in the beginning.
    261298 */
    262299class POMO_CachedIntFileReader extends POMO_CachedFileReader {
    263         function POMO_CachedIntFileReader($filename) {
     300        /**
     301         * PHP5 constructor.
     302         */
     303        public function __construct( $filename ) {
    264304                parent::POMO_CachedFileReader($filename);
    265305        }
     306
     307        /**
     308         * PHP4 constructor.
     309         */
     310        function POMO_CachedIntFileReader( $filename ) {
     311                self::__construct( $filename );
     312        }
    266313}
    267 endif;
    268  No newline at end of file
     314endif;
     315
  • src/wp-includes/rss.php

     
    5555
    5656        var $_CONTENT_CONSTRUCTS = array('content', 'summary', 'info', 'title', 'tagline', 'copyright');
    5757
    58         function MagpieRSS ($source) {
     58        /**
     59         * PHP5 constructor.
     60         */
     61        function __construct( $source ) {
    5962
    6063                # if PHP xml isn't compiled in, die
    6164                #
     
    97100                $this->normalize();
    98101        }
    99102
     103        /**
     104         * PHP4 constructor.
     105         */
     106        public function MagpieRSS( $source ) {
     107                self::__construct( $source );
     108        }
     109
    100110        function feed_start_element($p, $element, &$attrs) {
    101111                $el = $element = strtolower($element);
    102112                $attrs = array_change_key_case($attrs, CASE_LOWER);
     
    709719        var $MAX_AGE    = 43200;                // when are files stale, default twelve hours
    710720        var $ERROR              = '';                   // accumulate error messages
    711721
    712         function RSSCache ($base='', $age='') {
     722        /**
     723         * PHP5 constructor.
     724         */
     725        function __construct( $base = '', $age = '' ) {
    713726                $this->BASE_CACHE = WP_CONTENT_DIR . '/cache';
    714727                if ( $base ) {
    715728                        $this->BASE_CACHE = $base;
     
    720733
    721734        }
    722735
     736        /**
     737         * PHP4 constructor.
     738         */
     739        public function RSSCache( $base = '', $age = '' ) {
     740                self::__construct( $base, $age );
     741        }
     742
    723743/*=======================================================================*\
    724744        Function:       set
    725745        Purpose:        add an item to the cache, keyed on url
  • src/wp-includes/widgets.php

     
    173173         * @param array  $control_options
    174174         */
    175175        public function WP_Widget( $id_base, $name, $widget_options = array(), $control_options = array() ) {
     176                _deprecated_constructor( 'WP_Widget', '4.3.0' );
    176177                WP_Widget::__construct( $id_base, $name, $widget_options, $control_options );
    177178        }
    178179
     
    563564class WP_Widget_Factory {
    564565        public $widgets = array();
    565566
    566         public function WP_Widget_Factory() {
     567        /**
     568         * PHP5 constructor.
     569         */
     570        public function __construct() {
    567571                add_action( 'widgets_init', array( $this, '_register_widgets' ), 100 );
    568572        }
    569573
    570574        /**
     575         * PHP4 constructor.
     576         */
     577        public function WP_Widget_Factory() {
     578                _deprecated_constructor( 'WP_Widget_Factory', '4.2.0' );
     579                self::__construct();
     580        }
     581
     582        /**
    571583         * Register a widget subclass.
    572584         *
    573585         * @since 2.8.0
  • tests/phpunit/includes/utils.php

     
    2525        var $events;
    2626        var $debug;
    2727
    28         function MockAction($debug=0) {
     28        /**
     29         * PHP5 constructor.
     30         */
     31        function __construct( $debug = 0 ) {
    2932                $this->reset();
    3033                $this->debug = $debug;
    3134        }
    3235
     36        /**
     37         * PHP4 constructor.
     38         */
     39        public function MockAction( $debug = 0 ) {
     40                self::__construct( $debug );
     41        }
     42
    3343        function reset() {
    3444                $this->events = array();
    3545        }
     
    129139        var $xml;
    130140        var $data = array();
    131141
    132         function testXMLParser($in) {
     142        /**
     143         * PHP5 constructor.
     144         */
     145        function __construct( $in ) {
    133146                $this->xml = xml_parser_create();
    134147                xml_set_object($this->xml, $this);
    135148                xml_parser_set_option($this->xml,XML_OPTION_CASE_FOLDING, 0);
     
    138151                $this->parse($in);
    139152        }
    140153
     154        /**
     155         * PHP4 constructor.
     156         */
     157        public function testXMLParser( $in ) {
     158                self::__construct( $in );
     159        }
     160
    141161        function parse($in) {
    142162                $parse = xml_parse($this->xml, $in, sizeof($in));
    143163                if (!$parse) {
  • tests/phpunit/includes/wp-profiler.php

     
    2121        var $stack;
    2222        var $profile;
    2323
    24         // constructor
    25         function WPProfiler() {
     24        /**
     25         * PHP5 constructor.
     26         */
     27        function __construct() {
    2628                $this->stack = array();
    2729                $this->profile = array();
    2830        }
    2931
     32        /**
     33         * PHP4 constructor.
     34         */
     35        public function WPProfiler() {
     36                self::__construct();
     37        }
     38
    3039        function start($name) {
    3140                $time = $this->microtime();
    3241
  • tools/i18n/add-textdomain.php

     
    1414        var $modified_contents = '';
    1515        var $funcs;
    1616
    17         function AddTextdomain() {
     17        /**
     18         * PHP5 constructor.
     19         */
     20        function __construct() {
    1821                $makepot = new MakePOT;
    1922                $this->funcs = array_keys( $makepot->rules );
    2023        }
    2124
     25        /**
     26         * PHP4 constructor.
     27         */
     28        public function AddTextdomain() {
     29                _deprecated_function( __FUNCTION__ , '4.3',
     30                self::__construct();
     31        }
     32
    2233        function usage() {
    2334                $usage = "Usage: php add-textdomain.php [-i] <domain> <file>\n\nAdds the string <domain> as a last argument to all i18n function calls in <file>\nand prints the modified php file on standard output.\n\nOptions:\n    -i    Modifies the PHP file in place, instead of printing it to standard output.\n";
    2435                fwrite(STDERR, $usage);