Ticket #63071: 63071.patch
| File 63071.patch, 12.3 KB (added by , 16 months ago) |
|---|
-
src/wp-admin/includes/class-custom-background.php
diff --git src/wp-admin/includes/class-custom-background.php src/wp-admin/includes/class-custom-background.php index 8027c6a2ce..ac9aaadff5 100644
class Custom_Background { 310 310 ?> 311 311 <div id="custom-background-image" style="<?php echo $background_styles; ?>"><?php // Must be double quote, see above. ?> 312 312 <?php if ( $background_image_thumb ) { ?> 313 <img class="custom-background-image" src="<?php echo $background_image_thumb; ?>" style="visibility:hidden;" alt="" /><br />314 <img class="custom-background-image" src="<?php echo $background_image_thumb; ?>" style="visibility:hidden;" alt="" />313 <img class="custom-background-image" src="<?php echo esc_url( $background_image_thumb ); ?>" style="visibility:hidden;" alt="" /><br /> 314 <img class="custom-background-image" src="<?php echo esc_url( $background_image_thumb ); ?>" style="visibility:hidden;" alt="" /> 315 315 <?php } ?> 316 316 </div> 317 317 <?php } ?> … … class Custom_Background { 443 443 <label> 444 444 <input class="ui-helper-hidden-accessible" name="background-position" type="radio" value="<?php echo esc_attr( $value ); ?>"<?php checked( $value, $background_position ); ?>> 445 445 <span class="button display-options position"><span class="<?php echo esc_attr( $input['icon'] ); ?>" aria-hidden="true"></span></span> 446 <span class="screen-reader-text"><?php echo $input['label']; ?></span>446 <span class="screen-reader-text"><?php echo esc_html( $input['label'] ); ?></span> 447 447 </label> 448 448 <?php endforeach; ?> 449 449 </div> -
src/wp-admin/includes/class-wp-privacy-policy-content.php
diff --git src/wp-admin/includes/class-wp-privacy-policy-content.php src/wp-admin/includes/class-wp-privacy-policy-content.php index 16fe3a689a..978ee396ee 100644
final class WP_Privacy_Policy_Content { 411 411 $plugin_name = esc_html( $section['plugin_name'] ); 412 412 ?> 413 413 <h4 class="privacy-settings-accordion-heading"> 414 <button aria-expanded="false" class="privacy-settings-accordion-trigger" aria-controls="privacy-settings-accordion-block-<?php echo $i; ?>" type="button">415 <span class="title"><?php echo $plugin_name; ?></span>414 <button aria-expanded="false" class="privacy-settings-accordion-trigger" aria-controls="privacy-settings-accordion-block-<?php echo esc_attr( $i ); ?>" type="button"> 415 <span class="title"><?php echo esc_html( $plugin_name ); ?></span> 416 416 <?php if ( ! empty( $section['removed'] ) || ! empty( $section['updated'] ) ) : ?> 417 <span class="badge <?php echo $badge_class; ?>"> <?php echo $badge_title; ?></span>417 <span class="badge <?php echo esc_attr( $badge_class ); ?>"> <?php echo esc_html( $badge_title ); ?></span> 418 418 <?php endif; ?> 419 419 <span class="icon"></span> 420 420 </button> 421 421 </h4> 422 <div id="privacy-settings-accordion-block-<?php echo $i; ?>" class="privacy-settings-accordion-panel privacy-text-box-body" hidden="hidden">422 <div id="privacy-settings-accordion-block-<?php echo esc_attr( $i ); ?>" class="privacy-settings-accordion-panel privacy-text-box-body" hidden="hidden"> 423 423 <?php 424 echo $removed;425 echo $section['policy_text'];424 echo esc_html( $removed ); 425 echo esc_html( $section['policy_text'] ); 426 426 ?> 427 427 <?php if ( empty( $section['removed'] ) ) : ?> 428 428 <div class="privacy-settings-accordion-actions"> -
src/wp-admin/includes/class-wp-screen.php
diff --git src/wp-admin/includes/class-wp-screen.php src/wp-admin/includes/class-wp-screen.php index 4bb5995e7f..509df4eb22 100644
final class WP_Screen { 882 882 $panel_id = "tab-panel-{$tab['id']}"; 883 883 ?> 884 884 885 <li id="<?php echo esc_attr( $link_id ); ?>"<?php echo $class; ?>>885 <li id="<?php echo esc_attr( $link_id ); ?>"<?php echo esc_html( $class ); ?>> 886 886 <a href="<?php echo esc_url( "#$panel_id" ); ?>" aria-controls="<?php echo esc_attr( $panel_id ); ?>"> 887 887 <?php echo esc_html( $tab['title'] ); ?> 888 888 </a> … … final class WP_Screen { 896 896 897 897 <?php if ( $help_sidebar ) : ?> 898 898 <div class="contextual-help-sidebar"> 899 <?php echo $help_sidebar; ?>899 <?php echo esc_html( $help_sidebar ); ?> 900 900 </div> 901 901 <?php endif; ?> 902 902 … … final class WP_Screen { 907 907 $panel_id = "tab-panel-{$tab['id']}"; 908 908 ?> 909 909 910 <div id="<?php echo esc_attr( $panel_id ); ?>" class="<?php echo $classes; ?>">910 <div id="<?php echo esc_attr( $panel_id ); ?>" class="<?php echo esc_attr( $classes ); ?>"> 911 911 <?php 912 912 // Print tab content. 913 echo $tab['content'];913 echo esc_html( $tab['content'] ); 914 914 915 915 // If it exists, fire tab callback. 916 916 if ( ! empty( $tab['callback'] ) ) { … … final class WP_Screen { 1003 1003 1004 1004 if ( 'post' === $this->base ) { 1005 1005 $expand = '<fieldset class="editor-expand hidden"><legend>' . __( 'Additional settings' ) . '</legend><label for="editor-expand-toggle">'; 1006 $expand .= '<input type="checkbox" id="editor-expand-toggle" ' . checked( get_user_setting( 'editor_expand', 'on' ), 'on', false ) . ' />';1006 $expand .= '<input type="checkbox" id="editor-expand-toggle" ' . checked( get_user_setting( 'editor_expand', 'on' ), 'on', false ) . ' />'; 1007 1007 $expand .= __( 'Enable full-height editor and distraction-free functionality.' ) . '</label></fieldset>'; 1008 1008 $this->_screen_settings = $expand; 1009 1009 } … … final class WP_Screen { 1134 1134 } 1135 1135 } 1136 1136 echo '<label for="wp_welcome_panel-hide">'; 1137 echo '<input type="checkbox" id="wp_welcome_panel-hide" ' . checked( (bool) $welcome_checked, true, false ) . ' />';1137 echo '<input type="checkbox" id="wp_welcome_panel-hide" ' . checked( (bool) $welcome_checked, true, false ) . ' />'; 1138 1138 echo _x( 'Welcome', 'Welcome panel' ) . "</label>\n"; 1139 1139 } 1140 1140 ?> … … final class WP_Screen { 1160 1160 $legend = ! empty( $columns['_title'] ) ? $columns['_title'] : __( 'Columns' ); 1161 1161 ?> 1162 1162 <fieldset class="metabox-prefs"> 1163 <legend><?php echo $legend; ?></legend>1163 <legend><?php echo esc_html( $legend ); ?></legend> 1164 1164 <?php 1165 1165 $special = array( '_title', 'cb', 'comment', 'media', 'name', 'title', 'username', 'blogname' ); 1166 1166 … … final class WP_Screen { 1183 1183 1184 1184 $id = "$column-hide"; 1185 1185 echo '<label>'; 1186 echo '<input class="hide-column-tog" name="' . $id . '" type="checkbox" id="' . $id . '" value="' . $column . '"' . checked( ! in_array( $column, $hidden, true ), true, false ) . ' />';1186 echo '<input class="hide-column-tog" name="' . esc_attr( $id ) . '" type="checkbox" id="' . esc_attr( $id ) . '" value="' . esc_attr( $column ) . '" ' . checked( ! in_array( $column, $hidden, true ), true, false ) . ' />'; 1187 1187 echo "$title</label>\n"; 1188 1188 } 1189 1189 ?> … … final class WP_Screen { 1208 1208 <fieldset class='columns-prefs'> 1209 1209 <legend class="screen-layout"><?php _e( 'Layout' ); ?></legend> 1210 1210 <?php for ( $i = 1; $i <= $num; ++$i ) : ?> 1211 <label class="columns-prefs-<?php echo $i; ?>">1211 <label class="columns-prefs-<?php echo esc_attr( $i ); ?>"> 1212 1212 <input type='radio' name='screen_columns' value='<?php echo esc_attr( $i ); ?>' <?php checked( $screen_layout_columns, $i ); ?> /> 1213 1213 <?php 1214 1214 printf( -
src/wp-admin/includes/class-wp-theme-install-list-table.php
diff --git src/wp-admin/includes/class-wp-theme-install-list-table.php src/wp-admin/includes/class-wp-theme-install-list-table.php index 7e00005ba4..7ec8e66ad5 100644
class WP_Theme_Install_List_Table extends WP_Themes_List_Table { 365 365 <img src="<?php echo esc_url( $theme->screenshot_url . '?ver=' . $theme->version ); ?>" width="150" alt="" /> 366 366 </a> 367 367 368 <h3><?php echo $name; ?></h3>368 <h3><?php echo esc_html( $name ); ?></h3> 369 369 <div class="theme-author"> 370 370 <?php 371 371 /* translators: %s: Theme author. */ … … class WP_Theme_Install_List_Table extends WP_Themes_List_Table { 376 376 <div class="action-links"> 377 377 <ul> 378 378 <?php foreach ( $actions as $action ) : ?> 379 <li><?php echo $action; ?></li>379 <li><?php echo esc_html( $action ); ?></li> 380 380 <?php endforeach; ?> 381 381 <li class="hide-if-no-js"><a href="#" class="theme-detail"><?php _e( 'Details' ); ?></a></li> 382 382 </ul> -
src/wp-admin/includes/dashboard.php
diff --git src/wp-admin/includes/dashboard.php src/wp-admin/includes/dashboard.php index b198325f27..7aaebbd9d5 100644
function wp_dashboard() { 266 266 $columns_css = " columns-$columns"; 267 267 } 268 268 ?> 269 <div id="dashboard-widgets" class="metabox-holder<?php echo $columns_css; ?>"> 270 <div id="postbox-container-1" class="postbox-container"> 271 <?php do_meta_boxes( $screen->id, 'normal', '' ); ?> 272 </div> 273 <div id="postbox-container-2" class="postbox-container"> 274 <?php do_meta_boxes( $screen->id, 'side', '' ); ?> 275 </div> 276 <div id="postbox-container-3" class="postbox-container"> 277 <?php do_meta_boxes( $screen->id, 'column3', '' ); ?> 278 </div> 279 <div id="postbox-container-4" class="postbox-container"> 280 <?php do_meta_boxes( $screen->id, 'column4', '' ); ?> 269 <div id="dashboard-widgets" class="metabox-holder<?php echo esc_attr( $columns_css ); ?>"> 270 <div id="postbox-container-1" class="postbox-container"> 271 <?php do_meta_boxes( $screen->id, 'normal', '' ); ?> 272 </div> 273 <div id="postbox-container-2" class="postbox-container"> 274 <?php do_meta_boxes( $screen->id, 'side', '' ); ?> 275 </div> 276 <div id="postbox-container-3" class="postbox-container"> 277 <?php do_meta_boxes( $screen->id, 'column3', '' ); ?> 278 </div> 279 <div id="postbox-container-4" class="postbox-container"> 280 <?php do_meta_boxes( $screen->id, 'column4', '' ); ?> 281 </div> 281 282 </div> 282 </div>283 283 284 284 <?php 285 285 wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false ); … … function wp_dashboard_right_now() { 334 334 $text = sprintf( _n( '%s Comment', '%s Comments', $num_comm->approved ), number_format_i18n( $num_comm->approved ) ); 335 335 ?> 336 336 <li class="comment-count"> 337 <a href="edit-comments.php"><?php echo $text; ?></a>337 <a href="edit-comments.php"><?php echo esc_html( $text ); ?></a> 338 338 </li> 339 339 <?php 340 340 $moderated_comments_count_i18n = number_format_i18n( $num_comm->moderated ); … … function wp_dashboard_right_now() { 342 342 $text = sprintf( _n( '%s Comment in moderation', '%s Comments in moderation', $num_comm->moderated ), $moderated_comments_count_i18n ); 343 343 ?> 344 344 <li class="comment-mod-count<?php echo ! $num_comm->moderated ? ' hidden' : ''; ?>"> 345 <a href="edit-comments.php?comment_status=moderated" class="comments-in-moderation-text"><?php echo $text; ?></a>345 <a href="edit-comments.php?comment_status=moderated" class="comments-in-moderation-text"><?php echo esc_html( $text ); ?></a> 346 346 </li> 347 347 <?php 348 348 } … … function wp_dashboard_right_now() { 435 435 if ( ! empty( $actions ) ) : 436 436 ?> 437 437 <div class="sub"> 438 <?php echo $actions; ?>438 <?php echo esc_html( $actions ); ?> 439 439 </div> 440 440 <?php 441 441 endif; … … function wp_dashboard_quick_press( $error_msg = false ) { 601 601 602 602 <p class="submit"> 603 603 <input type="hidden" name="action" id="quickpost-action" value="post-quickdraft-save" /> 604 <input type="hidden" name="post_ID" value="<?php echo $post_ID; ?>" />604 <input type="hidden" name="post_ID" value="<?php echo esc_attr( $post_ID ); ?>" /> 605 605 <input type="hidden" name="post_type" value="post" /> 606 606 <?php wp_nonce_field( 'add-post' ); ?> 607 607 <?php submit_button( __( 'Save Draft' ), 'primary', 'save', false, array( 'id' => 'save-post' ) ); ?> … … function _wp_dashboard_recent_comments_row( &$comment, $show_date = true ) { 909 909 <?php endif; // comment_type ?> 910 910 <blockquote><p><?php comment_excerpt( $comment ); ?></p></blockquote> 911 911 <?php if ( $actions_string ) : ?> 912 <p class="row-actions"><?php echo $actions_string; ?></p>912 <p class="row-actions"><?php echo esc_html( $actions_string ); ?></p> 913 913 <?php endif; ?> 914 914 </div> 915 915 </li> … … function wp_dashboard_recent_posts( $args ) { 999 999 1000 1000 if ( $posts->have_posts() ) { 1001 1001 1002 echo '<div id="' . $args['id']. '" class="activity-block">';1002 echo '<div id="' . esc_html( $args['id'] ) . '" class="activity-block">'; 1003 1003 1004 echo '<h3>' . $args['title']. '</h3>';1004 echo '<h3>' . esc_html( $args['title'] ) . '</h3>'; 1005 1005 1006 1006 echo '<ul>'; 1007 1007
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)