[wp-trac] [WordPress Trac] #42933: Change from Class::method to static::method in WP_List_Table

WordPress Trac noreply at wordpress.org
Tue Dec 19 06:39:24 UTC 2017


#42933: Change from Class::method to static::method in WP_List_Table
-------------------------+-----------------------------
 Reporter:  okvee        |      Owner:
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  Database     |    Version:  4.9.1
 Severity:  normal       |   Keywords:
  Focuses:               |
-------------------------+-----------------------------
 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]

--
Ticket URL: <https://core.trac.wordpress.org/ticket/42933>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list