Make WordPress Core

Ticket #37649: 37649.patch

File 37649.patch, 3.5 KB (added by mercime, 7 years ago)
  • src/wp-admin/export.php

     
    163163<fieldset>
    164164<legend class="screen-reader-text"><?php _e( 'Content to export' ); ?></legend>
    165165<input type="hidden" name="download" value="true" />
    166 <p><label><input type="radio" name="content" value="all" checked="checked" aria-describedby="all-content-desc" /> <?php _e( 'All content' ); ?></label></p>
     166<p><label for="all-content"><input type="radio" id="all-content" name="content" value="all" checked="checked" aria-describedby="all-content-desc" /> <?php _e( 'All content' ); ?></label></p>
    167167<p class="description" id="all-content-desc"><?php _e( 'This will contain all of your posts, pages, comments, custom fields, terms, navigation menus, and custom posts.' ); ?></p>
    168168
    169 <p><label><input type="radio" name="content" value="posts" /> <?php _e( 'Posts' ); ?></label></p>
     169<p><label for="posts"><input type="radio" id="posts" name="content" value="posts" /> <?php _e( 'Posts' ); ?></label></p>
    170170<ul id="post-filters" class="export-filters">
    171171        <li>
    172                 <label><span class="label-responsive"><?php _e( 'Categories:' ); ?></span>
    173                 <?php wp_dropdown_categories( array( 'show_option_all' => __('All') ) ); ?>
     172                <label for="categories"><span class="label-responsive"><?php _e( 'Categories:' ); ?></span>
     173                <?php wp_dropdown_categories( array(
     174                        'id' => 'categories',
     175                        'show_option_all' => __('All')
     176                ) ); ?>
    174177                </label>
    175178        </li>
    176179        <li>
    177                 <label><span class="label-responsive"><?php _e( 'Authors:' ); ?></span>
     180                <label for="post-author"><span class="label-responsive"><?php _e( 'Authors:' ); ?></span>
    178181                <?php
    179182                $authors = $wpdb->get_col( "SELECT DISTINCT post_author FROM {$wpdb->posts} WHERE post_type = 'post'" );
    180183                wp_dropdown_users( array(
     184                        'id' => 'post-author',
    181185                        'include' => $authors,
    182186                        'name' => 'post_author',
    183187                        'multi' => true,
     
    213217        </li>
    214218</ul>
    215219
    216 <p><label><input type="radio" name="content" value="pages" /> <?php _e( 'Pages' ); ?></label></p>
     220<p><label for="pages"><input type="radio" id="pages" name="content" value="pages" /> <?php _e( 'Pages' ); ?></label></p>
    217221<ul id="page-filters" class="export-filters">
    218222        <li>
    219                 <label><span class="label-responsive"><?php _e( 'Authors:' ); ?></span>
     223                <label for="page-author"><span class="label-responsive"><?php _e( 'Authors:' ); ?></span>
    220224                <?php
    221225                $authors = $wpdb->get_col( "SELECT DISTINCT post_author FROM {$wpdb->posts} WHERE post_type = 'page'" );
    222226                wp_dropdown_users( array(
     227                        'id' => 'page-author',
    223228                        'include' => $authors,
    224229                        'name' => 'page_author',
    225230                        'multi' => true,
     
    255260</ul>
    256261
    257262<?php foreach ( get_post_types( array( '_builtin' => false, 'can_export' => true ), 'objects' ) as $post_type ) : ?>
    258 <p><label><input type="radio" name="content" value="<?php echo esc_attr( $post_type->name ); ?>" /> <?php echo esc_html( $post_type->label ); ?></label></p>
     263<p><label for="post-type-name"><input type="radio" id="post-type-name" name="content" value="<?php echo esc_attr( $post_type->name ); ?>" /> <?php echo esc_html( $post_type->label ); ?></label></p>
    259264<?php endforeach; ?>
    260265
    261 <p><label><input type="radio" name="content" value="attachment" /> <?php _e( 'Media' ); ?></label></p>
     266<p><label for="media"><input type="radio" id="media" name="content" value="attachment" /> <?php _e( 'Media' ); ?></label></p>
    262267<ul id="attachment-filters" class="export-filters">
    263268        <li>
    264269                <fieldset>