Docs: Add missing descriptions for _WP_List_Table_Compat methods.

Props johannadevos, SaeedFard, swissspidy, desrosj, SergeyBiryukov.
Fixes #46842.

git-svn-id: https://develop.svn.wordpress.org/trunk@49599 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov
2020-11-14 16:52:25 +00:00
parent fca21076e0
commit c375590c0e
4 changed files with 25 additions and 6 deletions

View File

@@ -8,7 +8,7 @@
*/
/**
* Helper class to be used only by back compat functions
* Helper class to be used only by back compat functions.
*
* @since 3.1.0
*/
@@ -16,6 +16,15 @@ class _WP_List_Table_Compat extends WP_List_Table {
public $_screen;
public $_columns;
/**
* Constructor.
*
* @since 3.1.0
*
* @param string|WP_Screen $screen The screen hook name or screen object.
* @param string[] $columns An array of columns with column IDs as the keys
* and translated column names as the values.
*/
public function __construct( $screen, $columns = array() ) {
if ( is_string( $screen ) ) {
$screen = convert_to_screen( $screen );
@@ -30,6 +39,10 @@ class _WP_List_Table_Compat extends WP_List_Table {
}
/**
* Gets a list of all, hidden, and sortable columns.
*
* @since 3.1.0
*
* @return array
*/
protected function get_column_info() {
@@ -42,6 +55,10 @@ class _WP_List_Table_Compat extends WP_List_Table {
}
/**
* Gets a list of columns.
*
* @since 3.1.0
*
* @return array
*/
public function get_columns() {

View File

@@ -1094,7 +1094,7 @@ class WP_List_Table {
}
/**
* Gets a list of all, hidden and sortable columns, with filter applied.
* Gets a list of all, hidden, and sortable columns, with filter applied.
*
* @since 3.1.0
*

View File

@@ -981,7 +981,8 @@ function type_url_form_file() {
* @deprecated 3.3.0 Use WP_Screen::add_help_tab()
* @see WP_Screen::add_help_tab()
*
* @param string $screen The handle for the screen to add help to. This is usually the hook name returned by the add_*_page() functions.
* @param string $screen The handle for the screen to add help to. This is usually
* the hook name returned by the `add_*_page()` functions.
* @param string $help The content of an 'Overview' help tab.
*/
function add_contextual_help( $screen, $help ) {

View File

@@ -71,9 +71,10 @@ function _get_list_table( $class, $args = array() ) {
*
* @since 2.7.0
*
* @param string $screen The handle for the screen to add help to. This is usually the hook name returned by the
* add_*_page() functions.
* @param string[] $columns An array of columns with column IDs as the keys and translated column names as the values.
* @param string $screen The handle for the screen to register column headers for. This is
* usually the hook name returned by the `add_*_page()` functions.
* @param string[] $columns An array of columns with column IDs as the keys and translated
* column names as the values.
*/
function register_column_headers( $screen, $columns ) {
new _WP_List_Table_Compat( $screen, $columns );