Skip to content

Commit ab7ca36

Browse files
committed
In WP_List_Table, make a new public method, ->get_primary_column(), and revert [34101] due to BC issues.
Fixes #33854. git-svn-id: https://develop.svn.wordpress.org/trunk@34128 602fd350-edb4-49c9-b593-d223f7449a82
1 parent ea610e6 commit ab7ca36

3 files changed

Lines changed: 7 additions & 3 deletions

File tree

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -888,6 +888,10 @@ protected function get_default_primary_column_name() {
888888
return $column;
889889
}
890890

891+
public function get_primary_column() {
892+
return $this->get_primary_column_name();
893+
}
894+
891895
/**
892896
* Gets the name of the primary column.
893897
*
@@ -896,7 +900,7 @@ protected function get_default_primary_column_name() {
896900
*
897901
* @return string The name of the primary column.
898902
*/
899-
public function get_primary_column_name() {
903+
protected function get_primary_column_name() {
900904
$columns = $this->get_columns();
901905
$default = $this->get_default_primary_column_name();
902906

src/wp-admin/includes/class-wp-ms-themes-list-table.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ protected function get_sortable_columns() {
252252
*
253253
* @return string Unalterable name of the primary column name, in this case, 'name'.
254254
*/
255-
public function get_primary_column_name() {
255+
protected function get_primary_column_name() {
256256
return 'name';
257257
}
258258

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -724,7 +724,7 @@ public function single_row( $item ) {
724724
*
725725
* @return string Unalterable name for the primary column, in this case, 'name'.
726726
*/
727-
public function get_primary_column_name() {
727+
protected function get_primary_column_name() {
728728
return 'name';
729729
}
730730
}

0 commit comments

Comments
 (0)