X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/4feeb71a9d812a9ae371c28a3d8b442a4394ded7..607b7e02d77e7326161e8ec15639052d2040f745:/wp-admin/includes/screen.php?ds=sidebyside
diff --git a/wp-admin/includes/screen.php b/wp-admin/includes/screen.php
index a72a8078..c3c4594d 100644
--- a/wp-admin/includes/screen.php
+++ b/wp-admin/includes/screen.php
@@ -25,7 +25,7 @@ function get_column_headers( $screen ) {
if ( ! isset( $column_headers[ $screen->id ] ) ) {
/**
- * Filter the column headers for a list table on a specific screen.
+ * Filters the column headers for a list table on a specific screen.
*
* The dynamic portion of the hook name, `$screen->id`, refers to the
* ID of a specific screen. For example, the screen ID for the Posts
@@ -63,7 +63,7 @@ function get_hidden_columns( $screen ) {
$hidden = array();
/**
- * Filter the default list of hidden columns.
+ * Filters the default list of hidden columns.
*
* @since 4.4.0
*
@@ -74,7 +74,7 @@ function get_hidden_columns( $screen ) {
}
/**
- * Filter the list of hidden columns.
+ * Filters the list of hidden columns.
*
* @since 4.4.0
* @since 4.4.1 Added the `use_defaults` parameter.
@@ -117,10 +117,19 @@ function meta_box_prefs( $screen ) {
// Submit box cannot be hidden
if ( 'submitdiv' == $box['id'] || 'linksubmitdiv' == $box['id'] )
continue;
- $box_id = $box['id'];
- echo '\n";
+
+ $widget_title = $box['title'];
+
+ if ( is_array( $box['args'] ) && isset( $box['args']['__widget_basename'] ) ) {
+ $widget_title = $box['args']['__widget_basename'];
+ }
+
+ printf(
+ '',
+ esc_attr( $box['id'] ),
+ checked( in_array( $box['id'], $hidden ), false, false ),
+ $widget_title
+ );
}
}
}
@@ -153,7 +162,7 @@ function get_hidden_meta_boxes( $screen ) {
}
/**
- * Filter the default list of hidden meta boxes.
+ * Filters the default list of hidden meta boxes.
*
* @since 3.1.0
*
@@ -164,7 +173,7 @@ function get_hidden_meta_boxes( $screen ) {
}
/**
- * Filter the list of hidden meta boxes.
+ * Filters the list of hidden meta boxes.
*
* @since 3.3.0
*
@@ -200,7 +209,7 @@ function add_screen_option( $option, $args = array() ) {
*
* @global WP_Screen $current_screen
*
- * @return WP_Screen Current screen object
+ * @return WP_Screen|null Current screen object or null when screen not defined.
*/
function get_current_screen() {
global $current_screen;