Ticket #31354: 31354.6.patch
File 31354.6.patch, 8.9 KB (added by , 6 months ago) |
---|
-
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 { 1297 1297 /* Only visible in Windows High Contrast mode */ 1298 1298 outline: 2px solid transparent; 1299 1299 } 1300 1300 .options-discussion-php .indent-children ul, 1301 1301 #front-page-warning, 1302 1302 #front-static-pages ul, 1303 1303 ul.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..f2e50b68dc 100644
a b require_once ABSPATH . 'wp-admin/admin-header.php'; 39 39 <div class="wrap"> 40 40 <h1><?php echo esc_html( $title ); ?></h1> 41 41 42 <!-- ARIA live region for screen readers --> 43 <div id="aria-live-region" aria-live="polite" class="screen-reader-text"></div> 44 45 42 46 <form method="post" action="options.php"> 43 47 <?php settings_fields( 'discussion' ); ?> 44 48 45 <table class="form-table " role="presentation">49 <table class="form-table indent-children" role="presentation"> 46 50 <tr> 47 51 <th scope="row"><?php _e( 'Default post settings' ); ?></th> 48 52 <td><fieldset><legend class="screen-reader-text"><span> … … if ( ! get_option( 'users_can_register' ) && is_multisite() ) { 86 90 ?> 87 91 </label> 88 92 <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' ) ); ?> /> 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> 94 <br /> 92 95 <?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 96 ?> 99 </label> 100 <br /> 97 <ul> 98 <li> 99 <label for="close_comments_days_old"><?php _e( 'Number of days to keep old comments' ); ?></label> 100 <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"/> 101 </li> 102 </ul> 101 103 102 <label for="show_comments_cookies_opt_in">103 104 <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> 105 <label for="show_comments_cookies_opt_in"><?php _e( 'Show comments cookies opt-in checkbox, allowing comment author cookies to be set' ); ?></label> 106 106 <br /> 107 108 <label for="thread_comments">109 107 <input name="thread_comments" type="checkbox" id="thread_comments" value="1" <?php checked( '1', get_option( 'thread_comments' ) ); ?> /> 108 <label for="thread_comments"><?php _e( 'Enable threaded (nested) comments' ); ?></label> 109 110 110 <?php 111 111 /** 112 112 * Filters the maximum depth of threaded/nested comments. … … printf( 117 117 */ 118 118 $maxdeep = (int) apply_filters( 'thread_comments_depth_max', 10 ); 119 119 120 $thread_comments_depth = '< /label> <label for="thread_comments_depth"><select name="thread_comments_depth" id="thread_comments_depth">';120 $thread_comments_depth = '<select name="thread_comments_depth" id="thread_comments_depth">'; 121 121 for ( $i = 2; $i <= $maxdeep; $i++ ) { 122 122 $thread_comments_depth .= "<option value='" . esc_attr( $i ) . "'"; 123 123 if ( (int) get_option( 'thread_comments_depth' ) === $i ) { … … for ( $i = 2; $i <= $maxdeep; $i++ ) { 126 126 $thread_comments_depth .= ">$i</option>"; 127 127 } 128 128 $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 129 ?> 134 </label> 135 <br /> 136 <label for="page_comments"> 130 <ul> 131 <li> 132 <label for="thread_comments_depth"><?php _e( 'Number of levels for threaded (nested) comments' ); ?></label> 133 <?php echo $thread_comments_depth; ?> 134 </li> 135 </ul> 136 </fieldset></td> 137 </tr> 138 139 <tr> 140 <th scope="row"><?php _e( 'Comment Pagination' ); ?></th> 141 <td><fieldset><legend class="screen-reader-text"><span> 142 <?php 143 /* translators: Hidden accessibility text. */ 144 _e( 'Comment Pagination' ); 145 ?> 146 </span></legend> 137 147 <input name="page_comments" type="checkbox" id="page_comments" value="1" <?php checked( '1', get_option( 'page_comments' ) ); ?> /> 148 <label for="page_comments"><?php _e( 'Break comments into pages' ); ?></label> 138 149 <?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_page153 );154 150 ?> 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 ); 172 173 ?>174 </ label>151 <ul> 152 <li> 153 <label for="comments_per_page"><?php _e( 'Top level comments per page' ); ?></label> 154 <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" /> 155 </li> 156 <li> 157 <label for="default_comments_page"><?php _e( 'Comments page to display by default' ); ?></label> 158 <select name="default_comments_page" id="default_comments_page"> 159 <option value="newest" <?php selected( 'newest', get_option( 'default_comments_page' ) ); ?>><?php _e( 'last page' ); ?></option> 160 <option value="oldest" <?php selected( 'oldest', get_option( 'default_comments_page' ) ); ?>><?php _e( 'first page' ); ?></option> 161 </select> 162 </li> 163 <li> 164 <label for="comment_order"><?php _e( 'Comments to display at the top of each page' ); ?></label> 165 <select name="comment_order" id="comment_order"> 166 <option value="asc" <?php selected( 'asc', get_option( 'comment_order' ) ); ?>><?php _e( 'older' ); ?></option> 167 <option value="desc" <?php selected( 'desc', get_option( 'comment_order' ) ); ?>><?php _e( 'newer' ); ?></option> 168 </select> 169 </li> 170 </ul> 175 171 </fieldset></td> 176 172 </tr> 173 177 174 <tr> 178 175 <th scope="row"><?php _e( 'Email me whenever' ); ?></th> 179 176 <td><fieldset><legend class="screen-reader-text"><span> … … printf( __( 'Comments should be displayed with the %s comments at the top of eac 186 183 <input name="comments_notify" type="checkbox" id="comments_notify" value="1" <?php checked( '1', get_option( 'comments_notify' ) ); ?> /> 187 184 <?php _e( 'Anyone posts a comment' ); ?> </label> 188 185 <br /> 186 189 187 <label for="moderation_notify"> 190 188 <input name="moderation_notify" type="checkbox" id="moderation_notify" value="1" <?php checked( '1', get_option( 'moderation_notify' ) ); ?> /> 191 189 <?php _e( 'A comment is held for moderation' ); ?> </label> … … printf( __( 'Comments should be displayed with the %s comments at the top of eac 203 201 <input name="comment_moderation" type="checkbox" id="comment_moderation" value="1" <?php checked( '1', get_option( 'comment_moderation' ) ); ?> /> 204 202 <?php _e( 'Comment must be manually approved' ); ?> </label> 205 203 <br /> 204 206 205 <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> 207 206 </fieldset></td> 208 207 </tr>