From ba1177bf4c7dc2d9cfdc74a564d7976b7213ad93 Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Wed, 21 Oct 2015 03:56:22 +0000 Subject: [PATCH] Export: add missing labels and improvement accessibility of the Export screen. Props afercia. Fixes #33046. git-svn-id: https://develop.svn.wordpress.org/trunk@35316 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/css/forms.css | 23 ++++++++++- src/wp-admin/export.php | 82 ++++++++++++++++++++++++-------------- 2 files changed, 73 insertions(+), 32 deletions(-) diff --git a/src/wp-admin/css/forms.css b/src/wp-admin/css/forms.css index bc4abb0559..d1ec601b12 100644 --- a/src/wp-admin/css/forms.css +++ b/src/wp-admin/css/forms.css @@ -753,6 +753,18 @@ table.form-table td .updated p { line-height: 24px; } +.label-responsive { + vertical-align: middle; +} + +#export-filters p { + margin: 0 0 1em; +} + +#export-filters p.submit { + margin: 7px 0 5px; +} + /* Card styles */ .card { @@ -1110,12 +1122,21 @@ table.form-table td .updated p { } .form-table th, - .form-table td { + .form-table td, + .label-responsive { display: block; width: auto; vertical-align: middle; } + .label-responsive { + margin: 0.5em 0; + } + + .export-filters li { + margin-bottom: 0; + } + .form-table .color-palette td { display: table-cell; width: 15px; diff --git a/src/wp-admin/export.php b/src/wp-admin/export.php index 50383e6e10..7f416c4656 100644 --- a/src/wp-admin/export.php +++ b/src/wp-admin/export.php @@ -92,12 +92,12 @@ if ( isset( $_GET['download'] ) ) { $args['status'] = $_GET['page_status']; } elseif ( 'attachment' == $_GET['content'] ) { $args['content'] = 'attachment'; - + if ( $_GET['attachment_start_date'] || $_GET['attachment_end_date'] ) { $args['start_date'] = $_GET['attachment_start_date']; $args['end_date'] = $_GET['attachment_end_date']; } - } + } else { $args['content'] = $_GET['content']; } @@ -160,37 +160,45 @@ function export_date_options( $post_type = 'post' ) {

+
+ -

-

+

+

  • - +
  • - - + get_col( "SELECT DISTINCT post_author FROM {$wpdb->posts} WHERE post_type = 'post'" ); wp_dropdown_users( array( 'include' => $authors, 'name' => 'post_author', 'multi' => true, 'show_option_all' => __('All') ) ); -?> + ?> +
  • - - + - + +
  • - - false ), 'objects' ); foreach ( $post_stati as $status ) : ?> @@ -203,26 +211,31 @@ function export_date_options( $post_type = 'post' ) {

    • - - + get_col( "SELECT DISTINCT post_author FROM {$wpdb->posts} WHERE post_type = 'page'" ); wp_dropdown_users( array( 'include' => $authors, 'name' => 'page_author', 'multi' => true, 'show_option_all' => __('All') ) ); -?> + ?> +
    • - - + - + +
    • - - @@ -234,23 +247,30 @@ function export_date_options( $post_type = 'post' ) { false, 'can_export' => true ), 'objects' ) as $post_type ) : ?>

      +

      • - - + - + +
      + +