wp/wp-admin/includes/screen.php
changeset 18 be944660c56a
parent 16 a86126ab1dd4
child 21 48c4eec2b7e6
--- a/wp/wp-admin/includes/screen.php	Tue Dec 15 15:52:01 2020 +0100
+++ b/wp/wp-admin/includes/screen.php	Wed Sep 21 18:19:35 2022 +0200
@@ -15,12 +15,12 @@
  * @return string[] The column header labels keyed by column ID.
  */
 function get_column_headers( $screen ) {
+	static $column_headers = array();
+
 	if ( is_string( $screen ) ) {
 		$screen = convert_to_screen( $screen );
 	}
 
-	static $column_headers = array();
-
 	if ( ! isset( $column_headers[ $screen->id ] ) ) {
 		/**
 		 * Filters the column headers for a list table on a specific screen.
@@ -111,10 +111,12 @@
 			if ( ! isset( $wp_meta_boxes[ $screen->id ][ $context ][ $priority ] ) ) {
 				continue;
 			}
+
 			foreach ( $wp_meta_boxes[ $screen->id ][ $context ][ $priority ] as $box ) {
-				if ( false == $box || ! $box['title'] ) {
+				if ( false === $box || ! $box['title'] ) {
 					continue;
 				}
+
 				// Submit box cannot be hidden.
 				if ( 'submitdiv' === $box['id'] || 'linksubmitdiv' === $box['id'] ) {
 					continue;
@@ -159,6 +161,7 @@
 	// Hide slug boxes by default.
 	if ( $use_defaults ) {
 		$hidden = array();
+
 		if ( 'post' === $screen->base ) {
 			if ( in_array( $screen->post_type, array( 'post', 'page', 'attachment' ), true ) ) {
 				$hidden = array( 'slugdiv', 'trackbacksdiv', 'postcustom', 'postexcerpt', 'commentstatusdiv', 'commentsdiv', 'authordiv', 'revisionsdiv' );