Docs: Switch more docs over to typed array notation, plus some fixes.

See #48303, #41756


git-svn-id: https://develop.svn.wordpress.org/trunk@46596 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
John Blackbourn
2019-10-26 21:07:10 +00:00
parent e07cf22fd0
commit 4f281f1650
35 changed files with 217 additions and 211 deletions

View File

@@ -14,7 +14,7 @@
* @staticvar array $column_headers
*
* @param string|WP_Screen $screen The screen you want the headers for
* @return array Containing the headers in the format id => UI String
* @return string[] The column header labels keyed by column ID.
*/
function get_column_headers( $screen ) {
if ( is_string( $screen ) ) {
@@ -24,7 +24,6 @@ function get_column_headers( $screen ) {
static $column_headers = array();
if ( ! isset( $column_headers[ $screen->id ] ) ) {
/**
* Filters the column headers for a list table on a specific screen.
*
@@ -35,7 +34,7 @@ function get_column_headers( $screen ) {
*
* @since 3.0.0
*
* @param array $columns An array of column headers. Default empty.
* @param string[] $columns The column header labels keyed by column ID.
*/
$column_headers[ $screen->id ] = apply_filters( "manage_{$screen->id}_columns", array() );
}