Skip to content

Commit 9730cb8

Browse files
committed
Constructor cleanup. Props ocean90. fixes #16768
git-svn-id: https://develop.svn.wordpress.org/trunk@17771 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 5482270 commit 9730cb8

33 files changed

Lines changed: 54 additions & 122 deletions

wp-admin/custom-background.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,14 @@ class Custom_Background {
4343
var $page = '';
4444

4545
/**
46-
* PHP4 Constructor - Register administration header callback.
46+
* Constructor - Register administration header callback.
4747
*
4848
* @since 3.0.0
4949
* @param callback $admin_header_callback
5050
* @param callback $admin_image_div_callback Optional custom image div output callback.
5151
* @return Custom_Background
5252
*/
53-
function Custom_Background($admin_header_callback = '', $admin_image_div_callback = '') {
53+
function __construct($admin_header_callback = '', $admin_image_div_callback = '') {
5454
$this->admin_header_callback = $admin_header_callback;
5555
$this->admin_image_div_callback = $admin_image_div_callback;
5656
}

wp-admin/custom-header.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,14 +62,14 @@ class Custom_Image_Header {
6262
var $page = '';
6363

6464
/**
65-
* PHP4 Constructor - Register administration header callback.
65+
* Constructor - Register administration header callback.
6666
*
6767
* @since 2.1.0
6868
* @param callback $admin_header_callback
6969
* @param callback $admin_image_div_callback Optional custom image div output callback.
7070
* @return Custom_Image_Header
7171
*/
72-
function Custom_Image_Header($admin_header_callback, $admin_image_div_callback = '') {
72+
function __construct($admin_header_callback, $admin_image_div_callback = '') {
7373
$this->admin_header_callback = $admin_header_callback;
7474
$this->admin_image_div_callback = $admin_image_div_callback;
7575
}

wp-admin/includes/class-wp-comments-list-table.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,15 @@ class WP_Comments_List_Table extends WP_List_Table {
2121

2222
var $pending_count = array();
2323

24-
function WP_Comments_List_Table() {
24+
function __construct() {
2525
global $post_id;
2626

2727
$post_id = isset( $_REQUEST['p'] ) ? absint( $_REQUEST['p'] ) : 0;
2828

2929
if ( get_option('show_avatars') )
3030
add_filter( 'comment_author', 'floated_admin_avatar' );
3131

32-
parent::WP_List_Table( array(
32+
parent::__construct( array(
3333
'plural' => 'comments',
3434
'singular' => 'comment',
3535
'ajax' => true,

wp-admin/includes/class-wp-filesystem-direct.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class WP_Filesystem_Direct extends WP_Filesystem_Base {
2121
*
2222
* @param mixed $arg ingored argument
2323
*/
24-
function WP_Filesystem_Direct($arg) {
24+
function __construct($arg) {
2525
$this->method = 'direct';
2626
$this->errors = new WP_Error();
2727
}

wp-admin/includes/class-wp-filesystem-ftpext.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class WP_Filesystem_FTPext extends WP_Filesystem_Base {
1919
var $errors = null;
2020
var $options = array();
2121

22-
function WP_Filesystem_FTPext($opt='') {
22+
function __construct($opt='') {
2323
$this->method = 'ftpext';
2424
$this->errors = new WP_Error();
2525

wp-admin/includes/class-wp-filesystem-ftpsockets.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class WP_Filesystem_ftpsockets extends WP_Filesystem_Base {
1919
var $errors = null;
2020
var $options = array();
2121

22-
function WP_Filesystem_ftpsockets($opt = '') {
22+
function __construct($opt = '') {
2323
$this->method = 'ftpsockets';
2424
$this->errors = new WP_Error();
2525

wp-admin/includes/class-wp-filesystem-ssh2.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ class WP_Filesystem_SSH2 extends WP_Filesystem_Base {
4848
var $errors = array();
4949
var $options = array();
5050

51-
function WP_Filesystem_SSH2($opt='') {
51+
function __construct($opt='') {
5252
$this->method = 'ssh2';
5353
$this->errors = new WP_Error();
5454

wp-admin/includes/class-wp-importer.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,6 @@ class WP_Importer {
1010
*/
1111
function __construct() {}
1212

13-
function WP_Importer() {
14-
$this->__construct();
15-
}
16-
1713
/**
1814
* Returns array with imported permalinks from WordPress database
1915
*

wp-admin/includes/class-wp-links-list-table.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
*/
1010
class WP_Links_List_Table extends WP_List_Table {
1111

12-
function WP_Links_List_Table() {
13-
parent::WP_List_Table( array(
12+
function __construct() {
13+
parent::__construct( array(
1414
'plural' => 'bookmarks',
1515
) );
1616
}

wp-admin/includes/class-wp-list-table.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ class WP_List_Table {
7777
* @param array $args An associative array with information about the current table
7878
* @access protected
7979
*/
80-
function WP_List_Table( $args = array() ) {
80+
function __construct( $args = array() ) {
8181
$args = wp_parse_args( $args, array(
8282
'plural' => '',
8383
'singular' => '',

0 commit comments

Comments
 (0)