WordPress.org

Make WordPress Core

Changeset 17604


Ignore:
Timestamp:
04/05/11 17:25:08 (4 years ago)
Author:
ryan
Message:

Remove PHP4 constructors. Props hakre. see #16768

Location:
trunk/wp-includes
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/cache.php

    r16469 r17604  
    458458 
    459459    /** 
    460      * PHP4 constructor; Calls PHP 5 style constructor 
    461      * 
    462      * @since 2.0.0 
    463      * 
    464      * @return WP_Object_Cache 
    465      */ 
    466     function WP_Object_Cache() { 
    467         return $this->__construct(); 
    468     } 
    469  
    470     /** 
    471460     * Sets up object properties; PHP 5 style constructor 
    472461     * 
  • trunk/wp-includes/capabilities.php

    r16910 r17604  
    7474 
    7575    /** 
    76      * PHP4 Constructor - Call {@link WP_Roles::_init()} method. 
    77      * 
    78      * @since 2.0.0 
    79      * @access public 
    80      * 
    81      * @return WP_Roles 
    82      */ 
    83     function WP_Roles() { 
     76     * Constructor 
     77     * 
     78     * @since 2.0.0 
     79     */ 
     80    function __construct() { 
    8481        $this->_init(); 
    8582    } 
     
    270267 
    271268    /** 
    272      * PHP4 Constructor - Set up object properties. 
     269     * Constructor - Set up object properties. 
    273270     * 
    274271     * The list of capabilities, must have the key as the name of the capability 
     
    280277     * @param string $role Role name. 
    281278     * @param array $capabilities List of capabilities. 
    282      * @return WP_Role 
    283      */ 
    284     function WP_Role( $role, $capabilities ) { 
     279     */ 
     280    function __construct( $role, $capabilities ) { 
    285281        $this->name = $role; 
    286282        $this->capabilities = $capabilities; 
  • trunk/wp-includes/class.wp-dependencies.php

    r16469 r17604  
    2525    var $groups = array(); 
    2626    var $group = 0; 
    27  
    28     function WP_Dependencies() { 
    29         $args = func_get_args(); 
    30         call_user_func_array( array(&$this, '__construct'), $args ); 
    31     } 
    32  
    33     function __construct() {} 
    3427 
    3528    /** 
  • trunk/wp-includes/wp-db.php

    r17546 r17604  
    461461     */ 
    462462    var $func_call; 
    463  
    464     /** 
    465      * Connects to the database server and selects a database 
    466      * 
    467      * PHP4 compatibility layer for calling the PHP5 constructor. 
    468      * 
    469      * @uses wpdb::__construct() Passes parameters and returns result 
    470      * @since 0.71 
    471      * 
    472      * @param string $dbuser MySQL database user 
    473      * @param string $dbpassword MySQL database password 
    474      * @param string $dbname MySQL database name 
    475      * @param string $dbhost MySQL database host 
    476      */ 
    477     function wpdb( $dbuser, $dbpassword, $dbname, $dbhost ) { 
    478         return $this->__construct( $dbuser, $dbpassword, $dbname, $dbhost ); 
    479     } 
    480463 
    481464    /** 
Note: See TracChangeset for help on using the changeset viewer.