diff --git a/wp-admin/custom-background.php b/wp-admin/custom-background.php index a1d111b82f..0655504115 100644 --- a/wp-admin/custom-background.php +++ b/wp-admin/custom-background.php @@ -43,14 +43,14 @@ class Custom_Background { var $page = ''; /** - * PHP4 Constructor - Register administration header callback. + * Constructor - Register administration header callback. * * @since 3.0.0 * @param callback $admin_header_callback * @param callback $admin_image_div_callback Optional custom image div output callback. * @return Custom_Background */ - function Custom_Background($admin_header_callback = '', $admin_image_div_callback = '') { + function __construct($admin_header_callback = '', $admin_image_div_callback = '') { $this->admin_header_callback = $admin_header_callback; $this->admin_image_div_callback = $admin_image_div_callback; } diff --git a/wp-admin/custom-header.php b/wp-admin/custom-header.php index ff71046d74..326ead5870 100644 --- a/wp-admin/custom-header.php +++ b/wp-admin/custom-header.php @@ -62,14 +62,14 @@ class Custom_Image_Header { var $page = ''; /** - * PHP4 Constructor - Register administration header callback. + * Constructor - Register administration header callback. * * @since 2.1.0 * @param callback $admin_header_callback * @param callback $admin_image_div_callback Optional custom image div output callback. * @return Custom_Image_Header */ - function Custom_Image_Header($admin_header_callback, $admin_image_div_callback = '') { + function __construct($admin_header_callback, $admin_image_div_callback = '') { $this->admin_header_callback = $admin_header_callback; $this->admin_image_div_callback = $admin_image_div_callback; } diff --git a/wp-admin/includes/class-wp-comments-list-table.php b/wp-admin/includes/class-wp-comments-list-table.php index 90c158fe6a..b149348518 100644 --- a/wp-admin/includes/class-wp-comments-list-table.php +++ b/wp-admin/includes/class-wp-comments-list-table.php @@ -21,7 +21,7 @@ class WP_Comments_List_Table extends WP_List_Table { var $pending_count = array(); - function WP_Comments_List_Table() { + function __construct() { global $post_id; $post_id = isset( $_REQUEST['p'] ) ? absint( $_REQUEST['p'] ) : 0; @@ -29,7 +29,7 @@ class WP_Comments_List_Table extends WP_List_Table { if ( get_option('show_avatars') ) add_filter( 'comment_author', 'floated_admin_avatar' ); - parent::WP_List_Table( array( + parent::__construct( array( 'plural' => 'comments', 'singular' => 'comment', 'ajax' => true, diff --git a/wp-admin/includes/class-wp-filesystem-direct.php b/wp-admin/includes/class-wp-filesystem-direct.php index e5d87f24a4..0f3c7d5255 100644 --- a/wp-admin/includes/class-wp-filesystem-direct.php +++ b/wp-admin/includes/class-wp-filesystem-direct.php @@ -21,7 +21,7 @@ class WP_Filesystem_Direct extends WP_Filesystem_Base { * * @param mixed $arg ingored argument */ - function WP_Filesystem_Direct($arg) { + function __construct($arg) { $this->method = 'direct'; $this->errors = new WP_Error(); } diff --git a/wp-admin/includes/class-wp-filesystem-ftpext.php b/wp-admin/includes/class-wp-filesystem-ftpext.php index 72325d2157..ff65d4c354 100644 --- a/wp-admin/includes/class-wp-filesystem-ftpext.php +++ b/wp-admin/includes/class-wp-filesystem-ftpext.php @@ -19,7 +19,7 @@ class WP_Filesystem_FTPext extends WP_Filesystem_Base { var $errors = null; var $options = array(); - function WP_Filesystem_FTPext($opt='') { + function __construct($opt='') { $this->method = 'ftpext'; $this->errors = new WP_Error(); diff --git a/wp-admin/includes/class-wp-filesystem-ftpsockets.php b/wp-admin/includes/class-wp-filesystem-ftpsockets.php index 397862609b..1dc170a93c 100644 --- a/wp-admin/includes/class-wp-filesystem-ftpsockets.php +++ b/wp-admin/includes/class-wp-filesystem-ftpsockets.php @@ -19,7 +19,7 @@ class WP_Filesystem_ftpsockets extends WP_Filesystem_Base { var $errors = null; var $options = array(); - function WP_Filesystem_ftpsockets($opt = '') { + function __construct($opt = '') { $this->method = 'ftpsockets'; $this->errors = new WP_Error(); diff --git a/wp-admin/includes/class-wp-filesystem-ssh2.php b/wp-admin/includes/class-wp-filesystem-ssh2.php index 0721a58349..b809f45549 100644 --- a/wp-admin/includes/class-wp-filesystem-ssh2.php +++ b/wp-admin/includes/class-wp-filesystem-ssh2.php @@ -48,7 +48,7 @@ class WP_Filesystem_SSH2 extends WP_Filesystem_Base { var $errors = array(); var $options = array(); - function WP_Filesystem_SSH2($opt='') { + function __construct($opt='') { $this->method = 'ssh2'; $this->errors = new WP_Error(); diff --git a/wp-admin/includes/class-wp-importer.php b/wp-admin/includes/class-wp-importer.php index 8115ff2ece..2b4774bcf3 100644 --- a/wp-admin/includes/class-wp-importer.php +++ b/wp-admin/includes/class-wp-importer.php @@ -10,10 +10,6 @@ class WP_Importer { */ function __construct() {} - function WP_Importer() { - $this->__construct(); - } - /** * Returns array with imported permalinks from WordPress database * diff --git a/wp-admin/includes/class-wp-links-list-table.php b/wp-admin/includes/class-wp-links-list-table.php index bf1c0bc63b..569eae5176 100644 --- a/wp-admin/includes/class-wp-links-list-table.php +++ b/wp-admin/includes/class-wp-links-list-table.php @@ -9,8 +9,8 @@ */ class WP_Links_List_Table extends WP_List_Table { - function WP_Links_List_Table() { - parent::WP_List_Table( array( + function __construct() { + parent::__construct( array( 'plural' => 'bookmarks', ) ); } diff --git a/wp-admin/includes/class-wp-list-table.php b/wp-admin/includes/class-wp-list-table.php index 1d80a7ba43..cc6076b40f 100644 --- a/wp-admin/includes/class-wp-list-table.php +++ b/wp-admin/includes/class-wp-list-table.php @@ -77,7 +77,7 @@ class WP_List_Table { * @param array $args An associative array with information about the current table * @access protected */ - function WP_List_Table( $args = array() ) { + function __construct( $args = array() ) { $args = wp_parse_args( $args, array( 'plural' => '', 'singular' => '', diff --git a/wp-admin/includes/class-wp-media-list-table.php b/wp-admin/includes/class-wp-media-list-table.php index 5e05f01e7c..baa7afac46 100644 --- a/wp-admin/includes/class-wp-media-list-table.php +++ b/wp-admin/includes/class-wp-media-list-table.php @@ -9,10 +9,10 @@ */ class WP_Media_List_Table extends WP_List_Table { - function WP_Media_List_Table() { + function __construct() { $this->detached = isset( $_REQUEST['detached'] ) || isset( $_REQUEST['find_detached'] ); - parent::WP_List_Table( array( + parent::__construct( array( 'plural' => 'media' ) ); } diff --git a/wp-admin/includes/class-wp-ms-sites-list-table.php b/wp-admin/includes/class-wp-ms-sites-list-table.php index 5414d2c08e..baefc8276f 100644 --- a/wp-admin/includes/class-wp-ms-sites-list-table.php +++ b/wp-admin/includes/class-wp-ms-sites-list-table.php @@ -9,8 +9,8 @@ */ class WP_MS_Sites_List_Table extends WP_List_Table { - function WP_MS_Sites_List_Table() { - parent::WP_List_Table( array( + function __construct() { + parent::__construct( array( 'plural' => 'sites', ) ); } diff --git a/wp-admin/includes/class-wp-ms-themes-list-table.php b/wp-admin/includes/class-wp-ms-themes-list-table.php index 6e34a163d3..cd9841da08 100644 --- a/wp-admin/includes/class-wp-ms-themes-list-table.php +++ b/wp-admin/includes/class-wp-ms-themes-list-table.php @@ -12,7 +12,7 @@ class WP_MS_Themes_List_Table extends WP_List_Table { var $site_id; var $is_site_themes; - function WP_MS_Themes_List_Table() { + function __construct() { global $status, $page; $default_status = get_user_option( 'themes_last_view' ); @@ -32,7 +32,7 @@ class WP_MS_Themes_List_Table extends WP_List_Table { if ( $this->is_site_themes ) $this->site_id = isset( $_REQUEST['id'] ) ? intval( $_REQUEST['id'] ) : 0; - parent::WP_List_Table( array( + parent::__construct( array( 'plural' => 'themes' ) ); } diff --git a/wp-admin/includes/class-wp-plugins-list-table.php b/wp-admin/includes/class-wp-plugins-list-table.php index eefffb1033..a5d95a2011 100644 --- a/wp-admin/includes/class-wp-plugins-list-table.php +++ b/wp-admin/includes/class-wp-plugins-list-table.php @@ -9,7 +9,7 @@ */ class WP_Plugins_List_Table extends WP_List_Table { - function WP_Plugins_List_Table() { + function __construct() { global $status, $page; $default_status = get_user_option( 'plugins_last_view' ); @@ -23,7 +23,7 @@ class WP_Plugins_List_Table extends WP_List_Table { $page = $this->get_pagenum(); - parent::WP_List_Table( array( + parent::__construct( array( 'plural' => 'plugins', ) ); } diff --git a/wp-admin/includes/class-wp-posts-list-table.php b/wp-admin/includes/class-wp-posts-list-table.php index c1b4c34415..a4f10f1a7d 100644 --- a/wp-admin/includes/class-wp-posts-list-table.php +++ b/wp-admin/includes/class-wp-posts-list-table.php @@ -45,7 +45,7 @@ class WP_Posts_List_Table extends WP_List_Table { */ var $sticky_posts_count = 0; - function WP_Posts_List_Table() { + function __construct() { global $post_type_object, $post_type, $wpdb; if ( !isset( $_REQUEST['post_type'] ) ) @@ -74,7 +74,7 @@ class WP_Posts_List_Table extends WP_List_Table { $this->sticky_posts_count = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT( 1 ) FROM $wpdb->posts WHERE post_type = %s AND post_status != 'trash' AND ID IN ($sticky_posts)", $post_type ) ); } - parent::WP_List_Table( array( + parent::__construct( array( 'plural' => 'posts', ) ); } diff --git a/wp-admin/includes/class-wp-terms-list-table.php b/wp-admin/includes/class-wp-terms-list-table.php index ac4d963c56..ffca923a72 100644 --- a/wp-admin/includes/class-wp-terms-list-table.php +++ b/wp-admin/includes/class-wp-terms-list-table.php @@ -11,7 +11,7 @@ class WP_Terms_List_Table extends WP_List_Table { var $callback_args; - function WP_Terms_List_Table() { + function __construct() { global $post_type, $taxonomy, $tax; wp_reset_vars( array( 'action', 'taxonomy', 'post_type' ) ); @@ -27,7 +27,7 @@ class WP_Terms_List_Table extends WP_List_Table { if ( empty( $post_type ) || !in_array( $post_type, get_post_types( array( 'public' => true ) ) ) ) $post_type = 'post'; - parent::WP_List_Table( array( + parent::__construct( array( 'plural' => 'tags', 'singular' => 'tag', ) ); diff --git a/wp-admin/includes/class-wp-upgrader.php b/wp-admin/includes/class-wp-upgrader.php index d42ed497de..767a6737df 100644 --- a/wp-admin/includes/class-wp-upgrader.php +++ b/wp-admin/includes/class-wp-upgrader.php @@ -25,9 +25,6 @@ class WP_Upgrader { var $skin = null; var $result = array(); - function WP_Upgrader($skin = null) { - return $this->__construct($skin); - } function __construct($skin = null) { if ( null == $skin ) $this->skin = new WP_Upgrader_Skin(); @@ -925,9 +922,6 @@ class WP_Upgrader_Skin { var $done_header = false; var $result = false; - function WP_Upgrader_Skin($args = array()) { - return $this->__construct($args); - } function __construct($args = array()) { $defaults = array( 'url' => '', 'nonce' => '', 'title' => '', 'context' => false ); $this->options = wp_parse_args($args, $defaults); @@ -1014,10 +1008,6 @@ class Plugin_Upgrader_Skin extends WP_Upgrader_Skin { var $plugin_active = false; var $plugin_network_active = false; - function Plugin_Upgrader_Skin($args = array()) { - return $this->__construct($args); - } - function __construct($args = array()) { $defaults = array( 'url' => '', 'plugin' => '', 'nonce' => '', 'title' => __('Update Plugin') ); $args = wp_parse_args($args, $defaults); @@ -1070,10 +1060,6 @@ class Bulk_Upgrader_Skin extends WP_Upgrader_Skin { var $in_loop = false; var $error = false; - function Bulk_Upgrader_Skin($args = array()) { - return $this->__construct($args); - } - function __construct($args = array()) { $defaults = array( 'url' => '', 'nonce' => '' ); $args = wp_parse_args($args, $defaults); @@ -1178,7 +1164,8 @@ class Bulk_Upgrader_Skin extends WP_Upgrader_Skin { class Bulk_Plugin_Upgrader_Skin extends Bulk_Upgrader_Skin { var $plugin_info = array(); // Plugin_Upgrader::bulk() will fill this in. - function Plugin_Upgrader_Skin($args = array()) { + + function __construct($args = array()) { parent::__construct($args); } @@ -1209,7 +1196,8 @@ class Bulk_Plugin_Upgrader_Skin extends Bulk_Upgrader_Skin { class Bulk_Theme_Upgrader_Skin extends Bulk_Upgrader_Skin { var $theme_info = array(); // Theme_Upgrader::bulk() will fill this in. - function Theme_Upgrader_Skin($args = array()) { + + function __construct($args = array()) { parent::__construct($args); } @@ -1251,10 +1239,6 @@ class Plugin_Installer_Skin extends WP_Upgrader_Skin { var $api; var $type; - function Plugin_Installer_Skin($args = array()) { - return $this->__construct($args); - } - function __construct($args = array()) { $defaults = array( 'type' => 'web', 'url' => '', 'plugin' => '', 'nonce' => '', 'title' => '' ); $args = wp_parse_args($args, $defaults); @@ -1319,10 +1303,6 @@ class Theme_Installer_Skin extends WP_Upgrader_Skin { var $api; var $type; - function Theme_Installer_Skin($args = array()) { - return $this->__construct($args); - } - function __construct($args = array()) { $defaults = array( 'type' => 'web', 'url' => '', 'theme' => '', 'nonce' => '', 'title' => '' ); $args = wp_parse_args($args, $defaults); @@ -1385,10 +1365,6 @@ class Theme_Installer_Skin extends WP_Upgrader_Skin { class Theme_Upgrader_Skin extends WP_Upgrader_Skin { var $theme = ''; - function Theme_Upgrader_Skin($args = array()) { - return $this->__construct($args); - } - function __construct($args = array()) { $defaults = array( 'url' => '', 'theme' => '', 'nonce' => '', 'title' => __('Update Theme') ); $args = wp_parse_args($args, $defaults); @@ -1440,9 +1416,6 @@ class File_Upload_Upgrader { var $package; var $filename; - function File_Upload_Upgrader($form, $urlholder) { - return $this->__construct($form, $urlholder); - } function __construct($form, $urlholder) { if ( ! ( ( $uploads = wp_upload_dir() ) && false === $uploads['error'] ) ) wp_die($uploads['error']); diff --git a/wp-admin/includes/class-wp-users-list-table.php b/wp-admin/includes/class-wp-users-list-table.php index d52d75f092..41a6338ee6 100644 --- a/wp-admin/includes/class-wp-users-list-table.php +++ b/wp-admin/includes/class-wp-users-list-table.php @@ -12,14 +12,14 @@ class WP_Users_List_Table extends WP_List_Table { var $site_id; var $is_site_users; - function WP_Users_List_Table() { + function __construct() { $screen = get_current_screen(); $this->is_site_users = 'site-users-network' == $screen->id; if ( $this->is_site_users ) $this->site_id = isset( $_REQUEST['id'] ) ? intval( $_REQUEST['id'] ) : 0; - parent::WP_List_Table( array( + parent::__construct( array( 'singular' => 'user', 'plural' => 'users' ) ); diff --git a/wp-app.php b/wp-app.php index 6de5288206..a05b01d9b4 100644 --- a/wp-app.php +++ b/wp-app.php @@ -216,12 +216,12 @@ class AtomServer { var $do_output = true; /** - * PHP4 constructor - Sets up object properties. + * Constructor - Sets up object properties. * * @since 2.2.0 * @return AtomServer */ - function AtomServer() { + function __construct() { $this->script_name = array_pop( $var_by_ref = explode( '/', $_SERVER['SCRIPT_NAME'] ) ); $this->app_base = site_url( $this->script_name . '/' ); diff --git a/wp-includes/capabilities.php b/wp-includes/capabilities.php index bd87028eaa..902b233154 100644 --- a/wp-includes/capabilities.php +++ b/wp-includes/capabilities.php @@ -456,7 +456,7 @@ class WP_User { var $filter = null; /** - * PHP4 Constructor - Sets up the object properties. + * Constructor - Sets up the object properties. * * Retrieves the userdata and then assigns all of the data keys to direct * properties of the object. Calls {@link WP_User::_init_caps()} after @@ -470,7 +470,7 @@ class WP_User { * @param int $blog_id Optional Blog ID, defaults to current blog. * @return WP_User */ - function WP_User( $id, $name = '', $blog_id = '' ) { + function __construct( $id, $name = '', $blog_id = '' ) { if ( empty( $id ) && empty( $name ) ) return; diff --git a/wp-includes/class-feed.php b/wp-includes/class-feed.php index cff43a17e3..7ae7cc833d 100644 --- a/wp-includes/class-feed.php +++ b/wp-includes/class-feed.php @@ -4,15 +4,6 @@ if ( !class_exists('SimplePie') ) require_once (ABSPATH . WPINC . '/class-simplepie.php'); class WP_Feed_Cache extends SimplePie_Cache { - /** - * Don't call the constructor. Please. - * - * @access private - */ - function WP_Feed_Cache() { - trigger_error('Please call SimplePie_Cache::create() instead of the constructor', E_USER_ERROR); - } - /** * Create a new SimplePie_Cache object * @@ -29,7 +20,7 @@ class WP_Feed_Cache_Transient { var $mod_name; var $lifetime = 43200; //Default lifetime in cache of 12 hours - function WP_Feed_Cache_Transient($location, $filename, $extension) { + function __construct($location, $filename, $extension) { $this->name = 'feed_' . $filename; $this->mod_name = 'feed_mod_' . $filename; $this->lifetime = apply_filters('wp_feed_cache_transient_lifetime', $this->lifetime, $filename); @@ -65,7 +56,7 @@ class WP_Feed_Cache_Transient { class WP_SimplePie_File extends SimplePie_File { - function WP_SimplePie_File($url, $timeout = 10, $redirects = 5, $headers = null, $useragent = null, $force_fsockopen = false) { + function __construct($url, $timeout = 10, $redirects = 5, $headers = null, $useragent = null, $force_fsockopen = false) { $this->url = $url; $this->timeout = $timeout; $this->redirects = $redirects; diff --git a/wp-includes/class-http.php b/wp-includes/class-http.php index 127b84c4ff..07d2f6248e 100644 --- a/wp-includes/class-http.php +++ b/wp-includes/class-http.php @@ -1408,17 +1408,6 @@ class WP_Http_Cookie { */ var $domain; - /** - * PHP4 style Constructor - Calls PHP5 Style Constructor. - * - * @access public - * @since 2.8.0 - * @param string|array $data Raw cookie data. - */ - function WP_Http_Cookie( $data ) { - $this->__construct( $data ); - } - /** * Sets up this cookie object. * diff --git a/wp-includes/class-wp-ajax-response.php b/wp-includes/class-wp-ajax-response.php index cf64bfbc35..9c225c116a 100644 --- a/wp-includes/class-wp-ajax-response.php +++ b/wp-includes/class-wp-ajax-response.php @@ -16,7 +16,7 @@ class WP_Ajax_Response { var $responses = array(); /** - * PHP4 Constructor - Passes args to {@link WP_Ajax_Response::add()}. + * Constructor - Passes args to {@link WP_Ajax_Response::add()}. * * @since 2.1.0 * @see WP_Ajax_Response::add() @@ -24,7 +24,7 @@ class WP_Ajax_Response { * @param string|array $args Optional. Will be passed to add() method. * @return WP_Ajax_Response */ - function WP_Ajax_Response( $args = '' ) { + function __construct( $args = '' ) { if ( !empty($args) ) $this->add($args); } diff --git a/wp-includes/class-wp-error.php b/wp-includes/class-wp-error.php index 1624195833..ba4de05d77 100644 --- a/wp-includes/class-wp-error.php +++ b/wp-includes/class-wp-error.php @@ -38,7 +38,7 @@ class WP_Error { var $error_data = array(); /** - * PHP4 Constructor - Sets up error message. + * Constructor - Sets up error message. * * If code parameter is empty then nothing will be done. It is possible to * add multiple messages to the same code, but with other methods in the @@ -54,7 +54,7 @@ class WP_Error { * @param mixed $data Optional. Error data. * @return WP_Error */ - function WP_Error($code = '', $message = '', $data = '') { + function __construct($code = '', $message = '', $data = '') { if ( empty($code) ) return; diff --git a/wp-includes/class-wp-http-ixr-client.php b/wp-includes/class-wp-http-ixr-client.php index 4c36334eee..b4c2184e14 100644 --- a/wp-includes/class-wp-http-ixr-client.php +++ b/wp-includes/class-wp-http-ixr-client.php @@ -7,7 +7,8 @@ * */ class WP_HTTP_IXR_Client extends IXR_Client { - function WP_HTTP_IXR_Client($server, $path = false, $port = 80, $timeout = 15) { + + function __construct($server, $path = false, $port = 80, $timeout = 15) { if ( ! $path ) { // Assume we have been given a URL instead $bits = parse_url($server); diff --git a/wp-includes/class-wp-xmlrpc-server.php b/wp-includes/class-wp-xmlrpc-server.php index 15ccc8ca8b..05feb20477 100644 --- a/wp-includes/class-wp-xmlrpc-server.php +++ b/wp-includes/class-wp-xmlrpc-server.php @@ -24,7 +24,7 @@ class wp_xmlrpc_server extends IXR_Server { /** * Register all of the XMLRPC methods that XMLRPC server understands. * - * PHP4 constructor and sets up server and method property. Passes XMLRPC + * Sets up server and method property. Passes XMLRPC * methods through the 'xmlrpc_methods' filter to allow plugins to extend * or replace XMLRPC methods. * @@ -32,7 +32,7 @@ class wp_xmlrpc_server extends IXR_Server { * * @return wp_xmlrpc_server */ - function wp_xmlrpc_server() { + function __construct() { $this->methods = array( // WordPress API 'wp.getUsersBlogs' => 'this:wp_getUsersBlogs', diff --git a/wp-includes/class-wp.php b/wp-includes/class-wp.php index 7ca64697a5..b048c83c59 100644 --- a/wp-includes/class-wp.php +++ b/wp-includes/class-wp.php @@ -504,18 +504,6 @@ class WP { do_action_ref_array('wp', array(&$this)); } - /** - * PHP4 Constructor - Does nothing. - * - * Call main() method when ready to run setup. - * - * @since 2.0.0 - * - * @return WP - */ - function WP() { - // Empty. - } } /** diff --git a/wp-includes/class.wp-dependencies.php b/wp-includes/class.wp-dependencies.php index 658952c611..0e3f51ede3 100644 --- a/wp-includes/class.wp-dependencies.php +++ b/wp-includes/class.wp-dependencies.php @@ -221,7 +221,7 @@ class _WP_Dependency { var $extra = array(); - function _WP_Dependency() { + function __construct() { @list($this->handle, $this->src, $this->deps, $this->ver, $this->args) = func_get_args(); if ( !is_array($this->deps) ) $this->deps = array(); diff --git a/wp-includes/locale.php b/wp-includes/locale.php index e69cbf5d29..dc3ede6f25 100644 --- a/wp-includes/locale.php +++ b/wp-includes/locale.php @@ -314,7 +314,7 @@ class WP_Locale { } /** - * PHP4 style constructor which calls helper methods to set up object variables + * Constructor which calls helper methods to set up object variables * * @uses WP_Locale::init() * @uses WP_Locale::register_globals() @@ -322,7 +322,7 @@ class WP_Locale { * * @return WP_Locale */ - function WP_Locale() { + function __construct() { $this->init(); $this->register_globals(); } diff --git a/wp-includes/query.php b/wp-includes/query.php index 1d08e5cc44..07259c6110 100644 --- a/wp-includes/query.php +++ b/wp-includes/query.php @@ -2970,7 +2970,7 @@ class WP_Query { } /** - * PHP4 type constructor. + * Constructor. * * Sets up the WordPress query, if parameter is not empty. * @@ -2980,7 +2980,7 @@ class WP_Query { * @param string $query URL query string. * @return WP_Query */ - function WP_Query($query = '') { + function __construct($query = '') { if ( ! empty($query) ) { $this->query($query); } diff --git a/wp-includes/rewrite.php b/wp-includes/rewrite.php index 92d372e383..7995707f95 100644 --- a/wp-includes/rewrite.php +++ b/wp-includes/rewrite.php @@ -1976,14 +1976,14 @@ class WP_Rewrite { } /** - * PHP4 Constructor - Calls init(), which runs setup. + * Constructor - Calls init(), which runs setup. * * @since 1.5.0 * @access public * * @return WP_Rewrite */ - function WP_Rewrite() { + function __construct() { $this->init(); } } diff --git a/wp-includes/user.php b/wp-includes/user.php index e94eb7a2c0..d9148e7b5f 100644 --- a/wp-includes/user.php +++ b/wp-includes/user.php @@ -361,12 +361,6 @@ class WP_User_Query { var $query_orderby; var $query_limit; - /** - * PHP4 constructor - */ - function WP_User_Query( $query = null ) { - $this->__construct( $query ); - } /** * PHP5 constructor diff --git a/wp-includes/wp-diff.php b/wp-includes/wp-diff.php index e2ceb9f785..2d6a4da9b2 100644 --- a/wp-includes/wp-diff.php +++ b/wp-includes/wp-diff.php @@ -60,7 +60,7 @@ class WP_Text_Diff_Renderer_Table extends Text_Diff_Renderer { var $inline_diff_renderer = 'WP_Text_Diff_Renderer_inline'; /** - * PHP4 Constructor - Call parent constructor with params array. + * Constructor - Call parent constructor with params array. * * This will set class properties based on the key value pairs in the array. * @@ -68,7 +68,7 @@ class WP_Text_Diff_Renderer_Table extends Text_Diff_Renderer { * * @param array $params */ - function Text_Diff_Renderer_Table( $params = array() ) { + function __construct( $params = array() ) { $parent = get_parent_class($this); $this->$parent( $params ); }