Make WordPress Core


Ignore:
Timestamp:
10/18/2020 05:16:33 PM (4 years ago)
Author:
SergeyBiryukov
Message:

Coding Standards: Use self when appropriate.

  • WP_List_Table::get_default_primary_column_name() is a protected method, so calling it statically with the class name is bad practice.
  • Similarly, this applies when calling a private constructor in WP_Screen::get().

Props jrf.
See #50767.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-list-table.php

    r49190 r49192  
    10741074        // fall back to the first non-checkbox column.
    10751075        if ( ! isset( $columns[ $default ] ) ) {
    1076             $default = WP_List_Table::get_default_primary_column_name();
     1076            $default = self::get_default_primary_column_name();
    10771077        }
    10781078
Note: See TracChangeset for help on using the changeset viewer.