Make WordPress Core

Changeset 56449


Ignore:
Timestamp:
08/24/2023 03:56:34 PM (16 months ago)
Author:
joedolson
Message:

Menus: Fix proximity of controls to Save and Delete menus.

Move the position of the Save and Delete buttons in menu editing so they are immediate neighbors, improving the proximity of related controls.

Props 90lines, sabernhardt, costdev.
See #56594.

Location:
trunk
Files:
17 edited

Legend:

Unmodified
Added
Removed
  • trunk/.env

    r56042 r56449  
    1313
    1414# Where to run WordPress from. Valid options are 'src' and 'build'.
    15 LOCAL_DIR=src
     15LOCAL_DIR=build
    1616
    1717# The PHP version to use. Valid options are 'latest', and '{version}-fpm'.
  • trunk/src/wp-admin/css/list-tables.css

    r56135 r56449  
    571571}
    572572
    573 .check-column .label-covers-full-cell {
     573.check-column label {
    574574    width: 100%;
    575575    height: 100%;
     
    580580}
    581581
    582 .check-column .label-covers-full-cell + input {
     582.check-column input {
    583583    position: relative;
    584584    z-index: 1;
    585585}
    586586
    587 .check-column .label-covers-full-cell:hover + input {
     587.check-column:hover input {
    588588    box-shadow: 0 0 0 1px #2271b1;
    589589}
  • trunk/src/wp-admin/css/nav-menus.css

    r55109 r56449  
    838838/* Major/minor publishing actions (classes) */
    839839.nav-menus-php .major-publishing-actions {
    840     clear: both;
    841840    padding: 10px 0;
    842     line-height: 2.15384615;
    843 }
    844 
    845 .nav-menus-php .major-publishing-actions .publishing-action {
    846     text-align: right;
    847     float: right;
    848 }
    849 
    850 /* Same as the Publish Meta Box #delete-action */
    851 .nav-menus-php .delete-action {
    852     float: left;
    853     line-height: 2.1;
     841    display: flex;
     842    align-items: center;
     843}
     844
     845.nav-menus-php .major-publishing-actions > * {
     846    margin-right: 10px;
    854847}
    855848
  • trunk/src/wp-admin/includes/class-wp-comments-list-table.php

    r56004 r56449  
    896896        if ( $this->user_can ) {
    897897            ?>
    898         <label class="label-covers-full-cell" for="cb-select-<?php echo $comment->comment_ID; ?>">
     898        <input id="cb-select-<?php echo $comment->comment_ID; ?>" type="checkbox" name="delete_comments[]" value="<?php echo $comment->comment_ID; ?>" />
     899        <label for="cb-select-<?php echo $comment->comment_ID; ?>">
    899900            <span class="screen-reader-text">
    900901            <?php
     
    904905            </span>
    905906        </label>
    906         <input id="cb-select-<?php echo $comment->comment_ID; ?>" type="checkbox" name="delete_comments[]" value="<?php echo $comment->comment_ID; ?>" />
    907907            <?php
    908908        }
  • trunk/src/wp-admin/includes/class-wp-links-list-table.php

    r55971 r56449  
    175175
    176176        ?>
    177         <label class="label-covers-full-cell" for="cb-select-<?php echo $link->link_id; ?>">
     177        <input type="checkbox" name="linkcheck[]" id="cb-select-<?php echo $link->link_id; ?>" value="<?php echo esc_attr( $link->link_id ); ?>" />
     178        <label for="cb-select-<?php echo $link->link_id; ?>">
    178179            <span class="screen-reader-text">
    179180            <?php
     
    183184            </span>
    184185        </label>
    185         <input type="checkbox" name="linkcheck[]" id="cb-select-<?php echo $link->link_id; ?>" value="<?php echo esc_attr( $link->link_id ); ?>" />
    186186        <?php
    187187    }
  • trunk/src/wp-admin/includes/class-wp-list-table.php

    r56356 r56449  
    14001400        if ( ! empty( $columns['cb'] ) ) {
    14011401            static $cb_counter = 1;
    1402             $columns['cb']     = '<label class="label-covers-full-cell" for="cb-select-all-' . $cb_counter . '">' .
     1402            $columns['cb']     = '<input id="cb-select-all-' . $cb_counter . '" type="checkbox" />
     1403            <label for="cb-select-all-' . $cb_counter . '">' .
    14031404                '<span class="screen-reader-text">' .
    14041405                    /* translators: Hidden accessibility text. */
    14051406                    __( 'Select All' ) .
    14061407                '</span>' .
    1407                 '</label>' .
    1408                 '<input id="cb-select-all-' . $cb_counter . '" type="checkbox" />';
     1408                '</label>';
    14091409            $cb_counter++;
    14101410        }
  • trunk/src/wp-admin/includes/class-wp-media-list-table.php

    r56397 r56449  
    420420        if ( current_user_can( 'edit_post', $post->ID ) ) {
    421421            ?>
    422             <label class="label-covers-full-cell" for="cb-select-<?php echo $post->ID; ?>">
     422            <input type="checkbox" name="media[]" id="cb-select-<?php echo $post->ID; ?>" value="<?php echo $post->ID; ?>" />
     423            <label for="cb-select-<?php echo $post->ID; ?>">
    423424                <span class="screen-reader-text">
    424425                <?php
     
    428429                </span>
    429430            </label>
    430             <input type="checkbox" name="media[]" id="cb-select-<?php echo $post->ID; ?>" value="<?php echo $post->ID; ?>" />
    431431            <?php
    432432        }
  • trunk/src/wp-admin/includes/class-wp-ms-sites-list-table.php

    r56273 r56449  
    421421            $blogname = untrailingslashit( $blog['domain'] . $blog['path'] );
    422422            ?>
    423             <label class="label-covers-full-cell" for="blog_<?php echo $blog['blog_id']; ?>">
     423            <input type="checkbox" id="blog_<?php echo $blog['blog_id']; ?>" name="allblogs[]"
     424                value="<?php echo esc_attr( $blog['blog_id'] ); ?>" />
     425            <label for="blog_<?php echo $blog['blog_id']; ?>">
    424426                <span class="screen-reader-text">
    425427                <?php
     
    429431                </span>
    430432            </label>
    431             <input type="checkbox" id="blog_<?php echo $blog['blog_id']; ?>" name="allblogs[]"
    432                 value="<?php echo esc_attr( $blog['blog_id'] ); ?>" />
    433433            <?php
    434434        endif;
  • trunk/src/wp-admin/includes/class-wp-ms-themes-list-table.php

    r56409 r56449  
    513513        $checkbox_id = 'checkbox_' . md5( $theme->get( 'Name' ) );
    514514        ?>
    515         <label class="label-covers-full-cell" for="<?php echo $checkbox_id; ?>" >
     515        <input type="checkbox" name="checked[]" value="<?php echo esc_attr( $theme->get_stylesheet() ); ?>" id="<?php echo $checkbox_id; ?>" />
     516        <label for="<?php echo $checkbox_id; ?>" >
    516517            <span class="screen-reader-text">
    517518            <?php
     
    524525            </span>
    525526        </label>
    526         <input type="checkbox" name="checked[]" value="<?php echo esc_attr( $theme->get_stylesheet() ); ?>" id="<?php echo $checkbox_id; ?>" />
    527527        <?php
    528528    }
  • trunk/src/wp-admin/includes/class-wp-ms-users-list-table.php

    r55971 r56449  
    236236        }
    237237        ?>
    238         <label class="label-covers-full-cell" for="blog_<?php echo $user->ID; ?>">
     238        <input type="checkbox" id="blog_<?php echo $user->ID; ?>" name="allusers[]" value="<?php echo esc_attr( $user->ID ); ?>" />
     239        <label for="blog_<?php echo $user->ID; ?>">
    239240            <span class="screen-reader-text">
    240241            <?php
     
    244245            </span>
    245246        </label>
    246         <input type="checkbox" id="blog_<?php echo $user->ID; ?>" name="allusers[]" value="<?php echo esc_attr( $user->ID ); ?>" />
    247247        <?php
    248248    }
  • trunk/src/wp-admin/includes/class-wp-plugins-list-table.php

    r56174 r56449  
    994994        } else {
    995995            $checkbox = sprintf(
    996                 '<label class="label-covers-full-cell" for="%1$s"><span class="screen-reader-text">%2$s</span></label>' .
    997                 '<input type="checkbox" name="checked[]" value="%3$s" id="%1$s" />',
     996                '<input type="checkbox" name="checked[]" value="%3$s" id="%1$s" />' .
     997                '<label for="%1$s"><span class="screen-reader-text">%2$s</span></label>',
    998998                $checkbox_id,
    999999                /* translators: Hidden accessibility text. %s: Plugin name. */
  • trunk/src/wp-admin/includes/class-wp-posts-list-table.php

    r56436 r56449  
    10341034        if ( apply_filters( 'wp_list_table_show_post_checkbox', $show, $post ) ) :
    10351035            ?>
    1036             <label class="label-covers-full-cell" for="cb-select-<?php the_ID(); ?>">
     1036            <input id="cb-select-<?php the_ID(); ?>" type="checkbox" name="post[]" value="<?php the_ID(); ?>" />
     1037            <label for="cb-select-<?php the_ID(); ?>">
    10371038                <span class="screen-reader-text">
    10381039                <?php
     
    10421043                </span>
    10431044            </label>
    1044             <input id="cb-select-<?php the_ID(); ?>" type="checkbox" name="post[]" value="<?php the_ID(); ?>" />
    10451045            <div class="locked-indicator">
    10461046                <span class="locked-indicator-icon" aria-hidden="true"></span>
  • trunk/src/wp-admin/includes/class-wp-privacy-requests-table.php

    r55954 r56449  
    417417    public function column_cb( $item ) {
    418418        return sprintf(
    419             '<label class="label-covers-full-cell" for="requester_%1$s"><span class="screen-reader-text">%2$s</span></label>' .
    420             '<input type="checkbox" name="request_id[]" id="requester_%1$s" value="%1$s" /><span class="spinner"></span>',
     419            '<input type="checkbox" name="request_id[]" id="requester_%1$s" value="%1$s" /><span class="spinner"></span>' .
     420            '<label for="requester_%1$s"><span class="screen-reader-text">%2$s</span></label>',
    421421            esc_attr( $item->ID ),
    422422            /* translators: Hidden accessibility text. %s: Email address. */
  • trunk/src/wp-admin/includes/class-wp-terms-list-table.php

    r55971 r56449  
    366366        if ( current_user_can( 'delete_term', $tag->term_id ) ) {
    367367            return sprintf(
    368                 '<label class="label-covers-full-cell" for="cb-select-%1$s"><span class="screen-reader-text">%2$s</span></label>' .
    369                 '<input type="checkbox" name="delete_tags[]" value="%1$s" id="cb-select-%1$s" />',
     368                '<input type="checkbox" name="delete_tags[]" value="%1$s" id="cb-select-%1$s" />' .
     369                '<label for="cb-select-%1$s"><span class="screen-reader-text">%2$s</span></label>',
    370370                $tag->term_id,
    371371                /* translators: Hidden accessibility text. %s: Taxonomy term name. */
  • trunk/src/wp-admin/includes/class-wp-users-list-table.php

    r56150 r56449  
    525525            // Set up the checkbox (because the user is editable, otherwise it's empty).
    526526            $checkbox = sprintf(
    527                 '<label class="label-covers-full-cell" for="user_%1$s"><span class="screen-reader-text">%2$s</span></label>' .
    528                 '<input type="checkbox" name="users[]" id="user_%1$s" class="%3$s" value="%1$s" />',
     527                '<input type="checkbox" name="users[]" id="user_%1$s" class="%3$s" value="%1$s" />' .
     528                '<label for="user_%1$s"><span class="screen-reader-text">%2$s</span></label>',
    529529                $user_object->ID,
    530530                /* translators: Hidden accessibility text. %s: User login. */
  • trunk/src/wp-admin/nav-menus.php

    r55552 r56449  
    11501150                    </div><!-- /#post-body -->
    11511151                    <div id="nav-menu-footer">
    1152                         <div class="major-publishing-actions wp-clearfix">
     1152                        <div class="major-publishing-actions">
     1153                            <div class="publishing-action">
     1154                                <?php submit_button( empty( $nav_menu_selected_id ) ? __( 'Create Menu' ) : __( 'Save Menu' ), 'primary large menu-save', 'save_menu', false, array( 'id' => 'save_menu_footer' ) ); ?>
     1155                            </div><!-- END .publishing-action -->
    11531156                            <?php if ( $menu_count > 0 ) : ?>
    11541157
     
    11791182
    11801183                            <?php endif; ?>
    1181                             <div class="publishing-action">
    1182                                 <?php submit_button( empty( $nav_menu_selected_id ) ? __( 'Create Menu' ) : __( 'Save Menu' ), 'primary large menu-save', 'save_menu', false, array( 'id' => 'save_menu_footer' ) ); ?>
    1183                             </div><!-- END .publishing-action -->
    11841184                        </div><!-- END .major-publishing-actions -->
    11851185                    </div><!-- /#nav-menu-footer -->
  • trunk/src/wp-admin/update-core.php

    r56237 r56449  
    572572        <td class="check-column">
    573573            <?php if ( $compatible_php ) : ?>
    574                 <label for="<?php echo $checkbox_id; ?>" class="label-covers-full-cell">
     574                <label for="<?php echo $checkbox_id; ?>">
    575575                    <span class="screen-reader-text">
    576576                    <?php
     
    750750        <td class="check-column">
    751751            <?php if ( $compatible_wp && $compatible_php ) : ?>
    752                 <label for="<?php echo $checkbox_id; ?>" class="label-covers-full-cell">
     752                <label for="<?php echo $checkbox_id; ?>">
    753753                    <span class="screen-reader-text">
    754754                    <?php
Note: See TracChangeset for help on using the changeset viewer.