From fd1dbfe00394d710240c55c52f459eb058edfa0f Mon Sep 17 00:00:00 2001 From: Weston Ruter Date: Sun, 13 Sep 2015 06:15:42 +0000 Subject: [PATCH] Customize: Remove redundant `aria-label` attributes. Adds an `$options` array argument to `WP_Screen::render_screen_options()` to allow the `div#screen-options-wrap` element to be omitted when `wrap` value is `false`. Props afercia, westonruter. Fixes #33182. git-svn-id: https://develop.svn.wordpress.org/trunk@34093 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/customize.php | 2 +- src/wp-admin/includes/screen.php | 17 +++++++++++++---- src/wp-includes/class-wp-customize-panel.php | 6 ++++-- 3 files changed, 18 insertions(+), 7 deletions(-) diff --git a/src/wp-admin/customize.php b/src/wp-admin/customize.php index c19bdced3a..425af6ff1e 100644 --- a/src/wp-admin/customize.php +++ b/src/wp-admin/customize.php @@ -145,7 +145,7 @@ do_action( 'customize_controls_print_scripts' );
-
+
' . get_bloginfo( 'name' ) . '' ); ?> diff --git a/src/wp-admin/includes/screen.php b/src/wp-admin/includes/screen.php index 7b84bcfd18..304b3f2e8c 100644 --- a/src/wp-admin/includes/screen.php +++ b/src/wp-admin/includes/screen.php @@ -1099,16 +1099,24 @@ final class WP_Screen { * * @since 3.3.0 * + * @param array $options { + * @type bool $wrap Whether the screen-options-wrap div will be included. Defaults to true. + * } * @global array $wp_meta_boxes */ - public function render_screen_options() { + public function render_screen_options( $options = array() ) { global $wp_meta_boxes; + $options = wp_parse_args( $options, array( + 'wrap' => true, + ) ); $columns = get_column_headers( $this ); $hidden = get_hidden_columns( $this ); ?> - + render_screen_options(); + $screen->render_screen_options( array( 'wrap' => false ) ); } /** @@ -475,7 +475,9 @@ class WP_Customize_Nav_Menus_Panel extends WP_Customize_Panel { <# if ( data.description ) { #>
{{{ data.description }}}
<# } #> - render_screen_options(); ?> +
+ render_screen_options(); ?> +