mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-02 05:31:25 +01:00
Remove PHP4 constructors. Props hakre. see #16768
git-svn-id: http://svn.automattic.com/wordpress/trunk@17604 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
91dc365567
commit
b60c345536
@ -456,17 +456,6 @@ class WP_Object_Cache {
|
||||
echo '</ul>';
|
||||
}
|
||||
|
||||
/**
|
||||
* PHP4 constructor; Calls PHP 5 style constructor
|
||||
*
|
||||
* @since 2.0.0
|
||||
*
|
||||
* @return WP_Object_Cache
|
||||
*/
|
||||
function WP_Object_Cache() {
|
||||
return $this->__construct();
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets up object properties; PHP 5 style constructor
|
||||
*
|
||||
|
@ -73,14 +73,11 @@ class WP_Roles {
|
||||
var $use_db = true;
|
||||
|
||||
/**
|
||||
* PHP4 Constructor - Call {@link WP_Roles::_init()} method.
|
||||
* Constructor
|
||||
*
|
||||
* @since 2.0.0
|
||||
* @access public
|
||||
*
|
||||
* @return WP_Roles
|
||||
*/
|
||||
function WP_Roles() {
|
||||
function __construct() {
|
||||
$this->_init();
|
||||
}
|
||||
|
||||
@ -269,7 +266,7 @@ class WP_Role {
|
||||
var $capabilities;
|
||||
|
||||
/**
|
||||
* PHP4 Constructor - Set up object properties.
|
||||
* Constructor - Set up object properties.
|
||||
*
|
||||
* The list of capabilities, must have the key as the name of the capability
|
||||
* and the value a boolean of whether it is granted to the role.
|
||||
@ -279,9 +276,8 @@ class WP_Role {
|
||||
*
|
||||
* @param string $role Role name.
|
||||
* @param array $capabilities List of capabilities.
|
||||
* @return WP_Role
|
||||
*/
|
||||
function WP_Role( $role, $capabilities ) {
|
||||
function __construct( $role, $capabilities ) {
|
||||
$this->name = $role;
|
||||
$this->capabilities = $capabilities;
|
||||
}
|
||||
|
@ -25,13 +25,6 @@ class WP_Dependencies {
|
||||
var $groups = array();
|
||||
var $group = 0;
|
||||
|
||||
function WP_Dependencies() {
|
||||
$args = func_get_args();
|
||||
call_user_func_array( array(&$this, '__construct'), $args );
|
||||
}
|
||||
|
||||
function __construct() {}
|
||||
|
||||
/**
|
||||
* Do the dependencies
|
||||
*
|
||||
|
@ -461,23 +461,6 @@ class wpdb {
|
||||
*/
|
||||
var $func_call;
|
||||
|
||||
/**
|
||||
* Connects to the database server and selects a database
|
||||
*
|
||||
* PHP4 compatibility layer for calling the PHP5 constructor.
|
||||
*
|
||||
* @uses wpdb::__construct() Passes parameters and returns result
|
||||
* @since 0.71
|
||||
*
|
||||
* @param string $dbuser MySQL database user
|
||||
* @param string $dbpassword MySQL database password
|
||||
* @param string $dbname MySQL database name
|
||||
* @param string $dbhost MySQL database host
|
||||
*/
|
||||
function wpdb( $dbuser, $dbpassword, $dbname, $dbhost ) {
|
||||
return $this->__construct( $dbuser, $dbpassword, $dbname, $dbhost );
|
||||
}
|
||||
|
||||
/**
|
||||
* Connects to the database server and selects a database
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user