From fb1857def81a16c9aa48e1c62e35625b1ec3dfc1 Mon Sep 17 00:00:00 2001 From: Peter Wilson Date: Tue, 9 Mar 2021 22:35:06 +0000 Subject: [PATCH] Docs: Improve compatibility comment in `WP_List_Table`. Improve comment explaining backward compatibility check for the primary column in `WP_List_Table::get_column_info()`. Unprops helen, markjaquith. See #52628, #34564. Built from https://develop.svn.wordpress.org/trunk@50516 git-svn-id: http://core.svn.wordpress.org/trunk@50129 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/class-wp-list-table.php | 9 +++++++-- wp-includes/version.php | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/wp-admin/includes/class-wp-list-table.php b/wp-admin/includes/class-wp-list-table.php index 3faf5d46e0..9f8a971422 100644 --- a/wp-admin/includes/class-wp-list-table.php +++ b/wp-admin/includes/class-wp-list-table.php @@ -1111,8 +1111,13 @@ class WP_List_Table { protected function get_column_info() { // $_column_headers is already set / cached. if ( isset( $this->_column_headers ) && is_array( $this->_column_headers ) ) { - // Back-compat for list tables that have been manually setting $_column_headers for horse reasons. - // In 4.3, we added a fourth argument for primary column. + /* + * Backward compatibility for `$_column_headers` format prior to WordPress 4.3. + * + * In WordPress 4.3 the primary column name was added as a forth item in the + * column headers property. This ensures the primary column name is included + * in plugins setting the property directly in the three item format. + */ $column_headers = array( array(), array(), array(), $this->get_primary_column_name() ); foreach ( $this->_column_headers as $key => $value ) { $column_headers[ $key ] = $value; diff --git a/wp-includes/version.php b/wp-includes/version.php index 51645f2a35..c7efa8175f 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.8-alpha-50512'; +$wp_version = '5.8-alpha-50516'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.