Make WordPress Core

Ticket #31354: 31354.6.2.patch

File 31354.6.2.patch, 9.0 KB (added by jwgoedert, 6 months ago)

Patch for structural changes only, no toggles

  • src/wp-admin/css/edit.css

    diff --git a/src/wp-admin/css/edit.css b/src/wp-admin/css/edit.css
    index 757d676b72..fa94499735 100644
    a b div.tabs-panel-active:focus { 
    12971297        /* Only visible in Windows High Contrast mode */
    12981298        outline: 2px solid transparent;
    12991299}
    1300 
     1300.options-discussion-php .indent-children ul,
    13011301#front-page-warning,
    13021302#front-static-pages ul,
    13031303ul.export-filters,
  • src/wp-admin/options-discussion.php

    diff --git a/src/wp-admin/options-discussion.php b/src/wp-admin/options-discussion.php
    index 19e3c45dc8..7264cc3cb5 100644
    a b require_once ABSPATH . 'wp-admin/admin-header.php'; 
    3939<div class="wrap">
    4040<h1><?php echo esc_html( $title ); ?></h1>
    4141
     42<!-- ARIA live region for screen readers -->
     43<div id="aria-live-region" aria-live="polite" class="screen-reader-text"></div>
     44
     45
    4246<form method="post" action="options.php">
    4347<?php settings_fields( 'discussion' ); ?>
    4448
    45 <table class="form-table" role="presentation">
     49<table class="form-table indent-children" role="presentation">
    4650<tr>
    4751<th scope="row"><?php _e( 'Default post settings' ); ?></th>
    4852<td><fieldset><legend class="screen-reader-text"><span>
    if ( ! get_option( 'users_can_register' ) && is_multisite() ) { 
    8690?>
    8791</label>
    8892<br />
    89 
    90 <label for="close_comments_for_old_posts">
    91 <input name="close_comments_for_old_posts" type="checkbox" id="close_comments_for_old_posts" value="1" <?php checked( '1', get_option( 'close_comments_for_old_posts' ) ); ?> />
    92 <?php
    93 printf(
    94         /* translators: %s: Number of days. */
    95         __( 'Automatically close comments on posts older than %s days' ),
    96         '</label> <label for="close_comments_days_old"><input name="close_comments_days_old" type="number" min="0" step="1" id="close_comments_days_old" value="' . esc_attr( get_option( 'close_comments_days_old' ) ) . '" class="small-text" />'
    97 );
    98 ?>
    99 </label>
     93<input name="close_comments_for_old_posts" type="checkbox" id="close_comments_for_old_posts" value="1" <?php checked( '1', get_option( 'close_comments_for_old_posts' ) ); ?> /> <label for="close_comments_for_old_posts"><?php _e( 'Automatically close comments for old posts' ); ?></label>
    10094<br />
     95<ul>
     96        <li>
     97                <label for="close_comments_days_old"><?php _e( 'Number of days to keep old comments' ); ?></label>
     98                <input name="close_comments_days_old" type="number" step="1" min="0" id="close_comments_days_old" value="<?php echo esc_attr( get_option( 'close_comments_days_old' ) ); ?>" class="small-text"/>
     99        </li>
     100</ul>
    101101
    102 <label for="show_comments_cookies_opt_in">
    103102<input name="show_comments_cookies_opt_in" type="checkbox" id="show_comments_cookies_opt_in" value="1" <?php checked( '1', get_option( 'show_comments_cookies_opt_in' ) ); ?> />
    104 <?php _e( 'Show comments cookies opt-in checkbox, allowing comment author cookies to be set' ); ?>
    105 </label>
     103<label for="show_comments_cookies_opt_in"><?php _e( 'Show comments cookies opt-in checkbox, allowing comment author cookies to be set' ); ?></label>
    106104<br />
    107 
    108 <label for="thread_comments">
    109105<input name="thread_comments" type="checkbox" id="thread_comments" value="1" <?php checked( '1', get_option( 'thread_comments' ) ); ?> />
     106<label for="thread_comments"><?php _e( 'Enable threaded (nested) comments' ); ?></label>
     107
    110108<?php
    111109/**
    112110 * Filters the maximum depth of threaded/nested comments.
    printf( 
    117115 */
    118116$maxdeep = (int) apply_filters( 'thread_comments_depth_max', 10 );
    119117
    120 $thread_comments_depth = '</label> <label for="thread_comments_depth"><select name="thread_comments_depth" id="thread_comments_depth">';
     118$thread_comments_depth = '<select name="thread_comments_depth" id="thread_comments_depth">';
    121119for ( $i = 2; $i <= $maxdeep; $i++ ) {
    122120        $thread_comments_depth .= "<option value='" . esc_attr( $i ) . "'";
    123121        if ( (int) get_option( 'thread_comments_depth' ) === $i ) {
    for ( $i = 2; $i <= $maxdeep; $i++ ) { 
    126124        $thread_comments_depth .= ">$i</option>";
    127125}
    128126$thread_comments_depth .= '</select>';
    129 
    130 /* translators: %s: Number of levels. */
    131 printf( __( 'Enable threaded (nested) comments %s levels deep' ), $thread_comments_depth );
    132 
    133 ?>
    134 </label>
    135 <br />
    136 <label for="page_comments">
    137 <input name="page_comments" type="checkbox" id="page_comments" value="1" <?php checked( '1', get_option( 'page_comments' ) ); ?> />
    138 <?php
    139 $default_comments_page = '</label> <label for="default_comments_page"><select name="default_comments_page" id="default_comments_page"><option value="newest"';
    140 if ( 'newest' === get_option( 'default_comments_page' ) ) {
    141         $default_comments_page .= ' selected="selected"';
    142 }
    143 $default_comments_page .= '>' . __( 'last' ) . '</option><option value="oldest"';
    144 if ( 'oldest' === get_option( 'default_comments_page' ) ) {
    145         $default_comments_page .= ' selected="selected"';
    146 }
    147 $default_comments_page .= '>' . __( 'first' ) . '</option></select>';
    148 printf(
    149         /* translators: 1: Form field control for number of top level comments per page, 2: Form field control for the 'first' or 'last' page. */
    150         __( 'Break comments into pages with %1$s top level comments per page and the %2$s page displayed by default' ),
    151         '</label> <label for="comments_per_page"><input name="comments_per_page" type="number" step="1" min="0" id="comments_per_page" value="' . esc_attr( get_option( 'comments_per_page' ) ) . '" class="small-text" />',
    152         $default_comments_page
    153 );
    154127?>
    155 </label>
    156 <br />
    157 <label for="comment_order">
    158 <?php
    159 
    160 $comment_order = '<select name="comment_order" id="comment_order"><option value="asc"';
    161 if ( 'asc' === get_option( 'comment_order' ) ) {
    162         $comment_order .= ' selected="selected"';
    163 }
    164 $comment_order .= '>' . __( 'older' ) . '</option><option value="desc"';
    165 if ( 'desc' === get_option( 'comment_order' ) ) {
    166         $comment_order .= ' selected="selected"';
    167 }
    168 $comment_order .= '>' . __( 'newer' ) . '</option></select>';
    169 
    170 /* translators: %s: Form field control for 'older' or 'newer' comments. */
    171 printf( __( 'Comments should be displayed with the %s comments at the top of each page' ), $comment_order );
     128<ul>
     129        <li>
     130                <label for="thread_comments_depth"><?php _e( 'Number of levels for threaded (nested) comments' ); ?></label>
     131                <?php echo $thread_comments_depth; ?>
     132        </li>
     133</ul>
     134</fieldset></td>
     135</tr>
    172136
    173 ?>
    174 </label>
     137<tr>
     138<th scope="row"><?php _e( 'Comment Pagination' ); ?></th>
     139<td><fieldset><legend class="screen-reader-text"><span>
     140        <?php
     141        /* translators: Hidden accessibility text. */
     142        _e( 'Comment Pagination' );
     143        ?>
     144</span></legend>
     145<input name="page_comments" type="checkbox" id="page_comments" value="1" <?php checked( '1', get_option( 'page_comments' ) ); ?> />
     146<label for="page_comments"><?php _e( 'Break comments into pages' ); ?></label>
     147<ul>
     148        <li>
     149                <label for="comments_per_page"><?php _e( 'Top level comments per page' ); ?></label>
     150                <input name="comments_per_page" type="number" step="1" min="0" id="comments_per_page" value="<?php echo esc_attr( get_option( 'comments_per_page' ) ); ?>" class="small-text" />
     151        </li>
     152        <li>
     153                <label for="default_comments_page"><?php _e( 'Comments page to display by default' ); ?></label>
     154                <select name="default_comments_page" id="default_comments_page">
     155                        <option value="newest" <?php selected( 'newest', get_option( 'default_comments_page' ) ); ?>><?php _e( 'last page' ); ?></option>
     156                        <option value="oldest" <?php selected( 'oldest', get_option( 'default_comments_page' ) ); ?>><?php _e( 'first page' ); ?></option>
     157                </select>
     158        </li>
     159        <li>
     160                <label for="comment_order"><?php _e( 'Comments to display at the top of each page' ); ?></label>
     161                <select name="comment_order" id="comment_order">
     162                        <option value="asc" <?php selected( 'asc', get_option( 'comment_order' ) ); ?>><?php _e( 'older' ); ?></option>
     163                        <option value="desc" <?php selected( 'desc', get_option( 'comment_order' ) ); ?>><?php _e( 'newer' ); ?></option>
     164                </select>
     165        </li>
     166</ul>
    175167</fieldset></td>
    176168</tr>
     169
    177170<tr>
    178171<th scope="row"><?php _e( 'Email me whenever' ); ?></th>
    179172<td><fieldset><legend class="screen-reader-text"><span>
    printf( __( 'Comments should be displayed with the %s comments at the top of eac 
    186179<input name="comments_notify" type="checkbox" id="comments_notify" value="1" <?php checked( '1', get_option( 'comments_notify' ) ); ?> />
    187180<?php _e( 'Anyone posts a comment' ); ?> </label>
    188181<br />
     182
    189183<label for="moderation_notify">
    190184<input name="moderation_notify" type="checkbox" id="moderation_notify" value="1" <?php checked( '1', get_option( 'moderation_notify' ) ); ?> />
    191185<?php _e( 'A comment is held for moderation' ); ?> </label>
    printf( __( 'Comments should be displayed with the %s comments at the top of eac 
    203197<input name="comment_moderation" type="checkbox" id="comment_moderation" value="1" <?php checked( '1', get_option( 'comment_moderation' ) ); ?> />
    204198<?php _e( 'Comment must be manually approved' ); ?> </label>
    205199<br />
     200
    206201<label for="comment_previously_approved"><input type="checkbox" name="comment_previously_approved" id="comment_previously_approved" value="1" <?php checked( '1', get_option( 'comment_previously_approved' ) ); ?> /> <?php _e( 'Comment author must have a previously approved comment' ); ?></label>
    207202</fieldset></td>
    208203</tr>