Make WordPress Core

Opened 6 years ago

Closed 5 years ago

Last modified 5 years ago

#42933 closed enhancement (wontfix)

Change from Class::method to static::method in WP_List_Table

Reported by: okvee's profile okvee Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.9.1
Component: Database Keywords:
Focuses: Cc:

Description

From this source code https://core.trac.wordpress.org/browser/tags/4.9.1/src/wp-admin/includes/class-wp-list-table.php
At the line 910.

Currently is:

$default = WP_List_Table::get_default_primary_column_name();

Change to:

$default = self::get_default_primary_column_name();

self:: can forward static calls but WP_List_Table:: cannot.
In case that WordPress needs to upgrade requirement to PHP 5.3+ it can change to static:: call.

References:
http://php.net/manual/en/language.oop5.late-static-bindings.php
https://stackoverflow.com/questions/4718808/php-can-static-replace-self
https://stackoverflow.com/questions/3481085/self-vs-classname-inside-static-classname-metods-in-php

Change History (2)

#1 @okvee
5 years ago

  • Resolution set to wontfix
  • Status changed from new to closed

#2 @desrosj
5 years ago

  • Milestone Awaiting Review deleted

Removing Awaiting Review milestone from closed tickets.

Note: See TracTickets for help on using tickets.