Coding Standards: Use strict comparison in `wp-admin/includes/screen.php`.
See #52627. Built from https://develop.svn.wordpress.org/trunk@50832 git-svn-id: http://core.svn.wordpress.org/trunk@50441 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
f30138fd8a
commit
0a8cfcd0d7
|
@ -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 @@ function meta_box_prefs( $screen ) {
|
|||
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 @@ function get_hidden_meta_boxes( $screen ) {
|
|||
// 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' );
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '5.8-alpha-50831';
|
||||
$wp_version = '5.8-alpha-50832';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue