Ticket #26601: 26601.10.diff
File 26601.10.diff, 17.8 KB (added by , 6 years ago) |
---|
-
src/wp-admin/css/common.css
diff --git src/wp-admin/css/common.css src/wp-admin/css/common.css index 6a1e9d7..6bd5482 100644
code { 562 562 color: #00a0d2; 563 563 } 564 564 565 .wrap > header { 566 display: block; 567 padding: 9px 0 4px 0; 568 position: relative; 569 } 570 571 .wrap > header:after { 572 content: ''; 573 display: table; 574 clear: both; 575 } 576 565 577 .wrap h2, 566 578 .subtitle { 567 579 font-weight: normal; … … code { 572 584 font-size: 23px; 573 585 font-weight: 400; 574 586 padding: 9px 15px 4px 0; 575 line-height: 29px; 587 line-height: 1.261; 588 } 589 590 .wrap > header h2 { 591 float: left; 592 padding: 0 6px 0 0; 576 593 } 577 594 578 595 .subtitle { … … code { 597 614 font-size: 13px; 598 615 } 599 616 617 .wrap > header .add-new-h2, 618 .wrap > header .add-new-h2:active { 619 display: block; 620 float: left; 621 margin: 0 4px; 622 top: 2px; 623 } 624 600 625 .wrap .add-new-h2:hover { 601 626 background: #00a0d2; 602 627 color: #fff; … … th.action-links { 971 996 margin-right: 20px; 972 997 } 973 998 999 header .title-count { 1000 display: block; 1001 float: left; 1002 padding: 5px 10px; 1003 padding: 4px 10px 6px 10px\9; /* Target IE */ 1004 top: 1px; 1005 } 1006 974 1007 .filter-items { 975 1008 float: left; 976 1009 } … … img { 3105 3138 display: none !important; 3106 3139 } 3107 3140 3141 .wrap > header { 3142 padding: 10px 0 0 0; 3143 } 3144 3108 3145 .wrap .add-new-h2, .wrap .add-new-h2:active { 3109 3146 padding: 10px 15px; 3110 3147 font-size: 14px; 3111 3148 } 3112 3149 3150 .wrap > header .add-new-h2, .wrap > header .add-new-h2:active { 3151 padding: 11px 15px 10px 15px; 3152 top: -4px; 3153 } 3154 3113 3155 .wp-color-result { 3114 3156 height: auto; 3115 3157 padding-left: 45px; -
src/wp-admin/css/themes.css
diff --git src/wp-admin/css/themes.css src/wp-admin/css/themes.css index c2cab3f..00b9b76 100644
37 37 line-height: 1.5; 38 38 } 39 39 40 .themes-php header .wp-filter-search { 41 float: left; 42 top: -1px; 43 } 44 40 45 /* Position admin messages */ 41 46 .themes-php div.updated, 42 47 .themes-php div.error, … … body.folded .theme-overlay .theme-wrap { 983 988 } 984 989 } 985 990 991 @media screen and ( max-width: 782px ) { 992 body.themes-php .wrap > header { 993 padding-bottom: 4px; 994 } 995 996 .themes-php .wrap > header h2 { 997 margin-bottom: 15px; 998 } 999 1000 .themes-php .wrap > header .add-new-h2, .themes-php .wrap > header .add-new-h2:active { 1001 margin-bottom: 9px; 1002 } 1003 1004 body.theme-install-php .wrap > header .add-new-h2, body.theme-install-php .wrap > header .add-new-h2:active { 1005 top: -4px; 1006 } 1007 1008 .themes-php header .wp-filter-search { 1009 clear: both; 1010 display: inline; 1011 float: none; 1012 top: -3px; 1013 } 1014 } 1015 986 1016 @media only screen and (max-width: 650px) { 987 1017 .theme-overlay .theme-update, 988 1018 .theme-overlay .theme-description { … … body.folded .theme-overlay .theme-wrap { 1021 1051 width: 100%; 1022 1052 } 1023 1053 1054 .themes-php .wrap > header h2 { 1055 width: auto; 1056 } 1057 1024 1058 .themes-php .wp-filter-search { 1025 1059 float: none; 1026 1060 clear: both; … … body.folded .theme-overlay .theme-wrap { 1032 1066 max-width: 280px; 1033 1067 } 1034 1068 1069 .themes-php header .wp-filter-search { 1070 display: inline; 1071 margin: 0 0 8px 0; 1072 } 1073 1035 1074 .theme-browser .theme.add-new-theme span:after { 1036 1075 font: normal 60px/90px 'dashicons'; 1037 1076 width: 80px; … … body.show-upload-theme p.no-themes { 1156 1195 display: none !important; 1157 1196 } 1158 1197 1198 .theme-install-php .wrap > header .add-new-h2, 1199 .theme-install-php .wrap > header .add-new-h2:active { 1200 top: 2px; 1201 } 1202 1159 1203 @media only screen and (max-width: 1120px) { 1160 1204 .upload-theme .wp-upload-form { 1161 1205 margin: 20px 0; -
src/wp-admin/edit-comments.php
diff --git src/wp-admin/edit-comments.php src/wp-admin/edit-comments.php index 29717d8..88b8a17 100644
require_once( ABSPATH . 'wp-admin/admin-header.php' ); 140 140 ?> 141 141 142 142 <div class="wrap"> 143 <h2><?php 144 if ( $post_id ) 145 echo sprintf( __( 'Comments on “%s”' ), 146 sprintf( '<a href="%s">%s</a>', 147 get_edit_post_link( $post_id ), 148 wp_html_excerpt( _draft_or_post_title( $post_id ), 50, '…' ) 149 ) 150 ); 151 else 152 echo __('Comments'); 153 154 if ( isset($_REQUEST['s']) && $_REQUEST['s'] ) 155 echo '<span class="subtitle">' . sprintf( __( 'Search results for “%s”' ), wp_html_excerpt( esc_html( wp_unslash( $_REQUEST['s'] ) ), 50, '…' ) ) . '</span>'; ?> 156 </h2> 143 <header> 144 <h2><?php if ( $post_id ) echo sprintf( __( 'Comments on “%s”' ), sprintf( '<a href="%s">%s</a>', get_edit_post_link( $post_id ), wp_html_excerpt( _draft_or_post_title( $post_id ), 50, '…' ) ) ); 145 else echo __( 'Comments' );?></h2> 146 <?php 147 if ( isset($_REQUEST['s']) && $_REQUEST['s'] ) echo '<span class="subtitle">' . sprintf( __( 'Search results for “%s”' ), wp_html_excerpt( esc_html( wp_unslash( $_REQUEST['s'] ) ), 50, '…' ) ) . '</span>'; ?> 148 </header> 157 149 158 150 <?php 159 151 if ( isset( $_REQUEST['error'] ) ) { -
src/wp-admin/edit-form-advanced.php
diff --git src/wp-admin/edit-form-advanced.php src/wp-admin/edit-form-advanced.php index 92f56b7..cdc9334 100644
require_once( ABSPATH . 'wp-admin/admin-header.php' ); 401 401 ?> 402 402 403 403 <div class="wrap"> 404 <h2><?php 405 echo esc_html( $title ); 406 if ( isset( $post_new_file ) && current_user_can( $post_type_object->cap->create_posts ) ) 407 echo ' <a href="' . esc_url( admin_url( $post_new_file ) ) . '" class="add-new-h2">' . esc_html( $post_type_object->labels->add_new ) . '</a>'; 408 ?></h2> 409 <?php if ( $notice ) : ?> 410 <div id="notice" class="notice notice-warning"><p id="has-newer-autosave"><?php echo $notice ?></p></div> 411 <?php endif; ?> 412 <?php if ( $message ) : ?> 413 <div id="message" class="updated"><p><?php echo $message; ?></p></div> 414 <?php endif; ?> 415 <div id="lost-connection-notice" class="error hidden"> 416 <p><span class="spinner"></span> <?php _e( '<strong>Connection lost.</strong> Saving has been disabled until you’re reconnected.' ); ?> 417 <span class="hide-if-no-sessionstorage"><?php _e( 'We’re backing up this post in your browser, just in case.' ); ?></span> 418 </p> 419 </div> 404 <header> 405 <h2><?php echo esc_html( $title );?></h2> 406 <?php if ( isset( $post_new_file ) && current_user_can( $post_type_object->cap->create_posts ) ) 407 echo ' <a href="' . esc_url( admin_url( $post_new_file ) ) . '" class="add-new-h2">' . esc_html( $post_type_object->labels->add_new ) . '</a>';?> 408 <br class="clear" /> 409 <?php if ( $notice ) : ?> 410 <div id="notice" class="notice notice-warning"><p id="has-newer-autosave"><?php echo $notice ?></p></div> 411 <?php endif; ?> 412 <?php if ( $message ) : ?> 413 <div id="message" class="updated"> 414 <p><?php echo $message; ?></p> 415 </div> 416 <?php endif; ?> 417 <div id="lost-connection-notice" class="error hidden"> 418 <p><span class="spinner"></span> <?php _e( '<strong>Connection lost.</strong> Saving has been disabled until you’re reconnected.' ); ?> 419 <span class="hide-if-no-sessionstorage"><?php _e( 'We’re backing up this post in your browser, just in case.' ); ?></span> 420 </p> 421 </div> 422 </header> 423 420 424 <form name="post" action="post.php" method="post" id="post"<?php 421 425 /** 422 426 * Fires inside the post editor form tag. -
src/wp-admin/edit.php
diff --git src/wp-admin/edit.php src/wp-admin/edit.php index 10b4e46..cd5cc90 100644
$bulk_counts = array_filter( $bulk_counts ); 277 277 require_once( ABSPATH . 'wp-admin/admin-header.php' ); 278 278 ?> 279 279 <div class="wrap"> 280 <h2><?php 281 echo esc_html( $post_type_object->labels->name ); 282 if ( current_user_can( $post_type_object->cap->create_posts ) ) 283 echo ' <a href="' . esc_url( admin_url( $post_new_file ) ) . '" class="add-new-h2">' . esc_html( $post_type_object->labels->add_new ) . '</a>'; 284 if ( ! empty( $_REQUEST['s'] ) ) 285 printf( ' <span class="subtitle">' . __('Search results for “%s”') . '</span>', get_search_query() ); 286 ?></h2> 280 <header> 281 <h2><?php echo esc_html( $post_type_object->labels->name );?></h2> 282 <?php 283 if ( current_user_can( $post_type_object->cap->create_posts ) ) 284 echo ' <a href="' . esc_url( admin_url( $post_new_file ) ) . '" class="add-new-h2">' . esc_html( $post_type_object->labels->add_new ) . '</a>'; 285 if ( ! empty( $_REQUEST['s'] ) ) 286 printf( ' <span class="subtitle">' . __('Search results for “%s”') . '</span>', get_search_query() ); 287 ?> 288 </header> 287 289 288 290 <?php 289 291 // If we have a bulk message to issue: -
src/wp-admin/js/common.js
diff --git src/wp-admin/js/common.js src/wp-admin/js/common.js index dda9247..48dea8f 100644
$(document).ready( function() { 369 369 } 370 370 371 371 // Move .notice, .updated and .error alert boxes. Don't move boxes designed to be inline. 372 $firstHeading = $( 'div.wrap h2:first' ); 372 $firstHeading = $( 'div.wrap > header' ); 373 if ( $firstHeading.length === 0 ) { 374 $firstHeading = $( 'div.wrap h2:first' ); 375 } 373 376 $firstHeading.nextAll( 'div.updated, div.error, div.notice' ).addClass( 'below-h2' ); 374 377 $( 'div.updated, div.error, div.notice' ).not( '.below-h2, .inline' ).insertAfter( $firstHeading ); 375 378 -
src/wp-admin/js/theme.js
diff --git src/wp-admin/js/theme.js src/wp-admin/js/theme.js index fbd3789..f6cd873 100644
themes.view.Appearance = wp.Backbone.View.extend({ 85 85 }, 86 86 87 87 // Defines search element container 88 searchContainer: $( '#wpbody h2:first' ),88 searchContainer: $( '#wpbody .wrap > header' ), 89 89 90 90 // Search input and view 91 91 // for current theme collection -
src/wp-admin/plugin-install.php
diff --git src/wp-admin/plugin-install.php src/wp-admin/plugin-install.php index 653113a..3d9d9fe 100644
get_current_screen()->set_help_sidebar( 94 94 include(ABSPATH . 'wp-admin/admin-header.php'); 95 95 ?> 96 96 <div class="wrap"> 97 <h2> 98 <?php 99 echo esc_html( $title ); 100 if ( ! empty( $tabs['upload'] ) && current_user_can( 'upload_plugins' ) ) { 101 if ( $tab === 'upload' ) { 102 $href = self_admin_url( 'plugin-install.php' ); 103 $text = _x( 'Browse', 'plugins' ); 104 } else { 105 $href = self_admin_url( 'plugin-install.php?tab=upload' ); 106 $text = __( 'Upload Plugin' ); 107 } 108 echo ' <a href="' . $href . '" class="upload add-new-h2">' . $text . '</a>'; 109 } 110 ?> 111 </h2> 97 <header> 98 <h2><?php echo esc_html( $title );?></h2> 99 <?php if ( ! empty( $tabs['upload'] ) && current_user_can( 'upload_plugins' ) ) { 100 if ( $tab === 'upload' ) { 101 $href = self_admin_url( 'plugin-install.php' ); 102 $text = _x( 'Browse', 'plugins' ); 103 } else { 104 $href = self_admin_url( 'plugin-install.php?tab=upload' ); 105 $text = __( 'Upload Plugin' ); 106 } 107 echo ' <a href="' . $href . '" class="upload add-new-h2">' . $text . '</a>'; 108 }?> 109 </header> 112 110 113 111 <?php 114 112 if ( $tab !== 'upload' ) { -
src/wp-admin/plugins.php
diff --git src/wp-admin/plugins.php src/wp-admin/plugins.php index df5d788..f7d3ada 100644
if ( !empty($invalid) ) 435 435 <?php endif; ?> 436 436 437 437 <div class="wrap"> 438 <h2><?php echo esc_html( $title ); 439 if ( ( ! is_multisite() || is_network_admin() ) && current_user_can('install_plugins') ) { ?> 440 <a href="<?php echo self_admin_url( 'plugin-install.php' ); ?>" class="add-new-h2"><?php echo esc_html_x('Add New', 'plugin'); ?></a> 438 <header> 439 <h2><?php echo esc_html( $title );?></h2> 440 <?php if ( ( ! is_multisite() || is_network_admin() ) && current_user_can('install_plugins') ) { ?> 441 <a href="<?php echo self_admin_url( 'plugin-install.php' ); ?>" class="add-new-h2"><?php echo esc_html_x('Add New', 'plugin'); ?></a> 442 </header> 441 443 <?php } 442 444 if ( $s ) 443 445 printf( '<span class="subtitle">' . __('Search results for “%s”') . '</span>', esc_html( $s ) ); ?> 444 </h2>445 446 446 447 <?php 447 448 /** -
src/wp-admin/theme-install.php
diff --git src/wp-admin/theme-install.php src/wp-admin/theme-install.php index 73e343a..ff51439 100644
include(ABSPATH . 'wp-admin/admin-header.php'); 99 99 100 100 ?> 101 101 <div class="wrap"> 102 <h 2><?php103 echo esc_html( $title );104 105 /**106 * Filter the tabs shown on the Add Themes screen.107 *108 * This filter is for backwards compatibility only, for the suppression109 * of the upload tab.110 *111 * @since 2.8.0112 *113 * @param array $tabs The tabs shown on the Add Themes screen. Default is 'upload'.114 */115 $tabs = apply_filters( 'install_themes_tabs', array( 'upload' => __( 'Upload Theme' ) ) );116 if ( ! empty( $tabs['upload'] ) && current_user_can( 'upload_themes' ) ) {117 echo ' <a href="#" class="upload add-new-h2">' . __( 'Upload Theme' ) . '</a>';118 echo ' <a href="#" class="browse-themes add-new-h2">' . _x( 'Browse', 'themes' ) . '</a>';119 }120 ?></h2>102 <header> 103 <h2><?php echo esc_html( $title );?></h2> 104 <?php 105 /** 106 * Filter the tabs shown on the Add Themes screen. 107 * 108 * This filter is for backwards compatibility only, for the suppression 109 * of the upload tab. 110 * 111 * @since 2.8.0 112 * 113 * @param array $tabs The tabs shown on the Add Themes screen. Default is 'upload'. 114 */ 115 $tabs = apply_filters( 'install_themes_tabs', array( 'upload' => __( 'Upload Theme' ) ) ); 116 if ( ! empty( $tabs['upload'] ) && current_user_can( 'upload_themes' ) ) { 117 echo ' <a href="#" class="upload add-new-h2">' . __( 'Upload Theme' ) . '</a>'; 118 echo ' <a href="#" class="browse-themes add-new-h2">' . _x( 'Browse', 'themes' ) . '</a>'; 119 } ?> 120 </header> 121 121 122 122 <div class="upload-theme"> 123 123 <?php install_themes_upload(); ?> -
src/wp-admin/themes.php
diff --git src/wp-admin/themes.php src/wp-admin/themes.php index 52e3531..3c3bde0 100644
require_once( ABSPATH . 'wp-admin/admin-header.php' ); 121 121 ?> 122 122 123 123 <div class="wrap"> 124 <h2><?php esc_html_e( 'Themes' ); ?> 124 <header> 125 <h2><?php esc_html_e( 'Themes' ); ?></h2> 125 126 <span class="title-count theme-count"><?php echo count( $themes ); ?></span> 126 <?php if ( ! is_multisite() && current_user_can( 'install_themes' ) ) : ?>127 <a href="<?php echo admin_url( 'theme-install.php' ); ?>" class="hide-if-no-js add-new-h2"><?php echo esc_html_x( 'Add New', 'Add new theme' ); ?></a>128 <?php endif; ?>129 </h 2>127 <?php if ( ! is_multisite() && current_user_can( 'install_themes' ) ) : ?> 128 <a href="<?php echo admin_url( 'theme-install.php' ); ?>" class="hide-if-no-js add-new-h2"><?php echo esc_html_x( 'Add New', 'Add new theme' ); ?></a> 129 <?php endif; ?> 130 </header> 130 131 <?php 131 132 if ( ! validate_current_theme() || isset( $_GET['broken'] ) ) : ?> 132 133 <div id="message1" class="updated"><p><?php _e('The active theme is broken. Reverting to the default theme.'); ?></p></div> -
src/wp-admin/upload.php
diff --git src/wp-admin/upload.php src/wp-admin/upload.php index c62c219..dc4df21 100644
if ( 'grid' === $mode ) { 71 71 require_once( ABSPATH . 'wp-admin/admin-header.php' ); 72 72 ?> 73 73 <div class="wrap" id="wp-media-grid" data-search="<?php _admin_search_query() ?>"> 74 <h2> 75 <?php 76 echo esc_html( $title ); 77 if ( current_user_can( 'upload_files' ) ) { ?> 78 <a href="media-new.php" class="add-new-h2"><?php echo esc_html_x( 'Add New', 'file' ); ?></a><?php 79 } 80 ?> 81 </h2> 74 <header> 75 <h2> 76 <?php echo esc_html( $title ); ?></h2> 77 <?php if ( current_user_can( 'upload_files' ) ) { ?> 78 <a href="media-new.php" class="add-new-h2"><?php echo esc_html_x( 'Add New', 'file' ); ?></a> 79 <?php } ?> 80 </header> 82 81 <div class="error hide-if-js"> 83 82 <p><?php _e( 'The grid view for the Media Library requires JavaScript. <a href="upload.php?mode=list">Switch to the list view</a>.' ); ?></p> 84 83 </div> -
src/wp-admin/users.php
diff --git src/wp-admin/users.php src/wp-admin/users.php index 39d3ae4..0226f28 100644
if ( ! empty($messages) ) { 428 428 } ?> 429 429 430 430 <div class="wrap"> 431 <h2>432 <?php 433 echo esc_html( $title ); 434 if ( current_user_can( 'create_users' ) ) { ?>435 <a href="user-new.php" class="add-new-h2"><?php echo esc_html_x( 'Add New', 'user' ); ?></a>436 <?php } elseif ( is_multisite() && current_user_can( 'promote_users' ) ) { ?>437 <a href="user-new.php" class="add-new-h2"><?php echo esc_html_x( 'Add Existing', 'user' ); ?></a>438 <?php }439 440 if ( $usersearch ) 441 printf( '<span class="subtitle">' . __('Search results for “%s”') . '</span>', esc_html( $usersearch ) ); ?>442 </h2> 431 <header> 432 <h2><?php echo esc_html( $title );?></h2> 433 <?php 434 if ( current_user_can( 'create_users' ) ) { ?> 435 <a href="user-new.php" class="add-new-h2"><?php echo esc_html_x( 'Add New', 'user' ); ?></a> 436 <?php } elseif ( is_multisite() && current_user_can( 'promote_users' ) ) { ?> 437 <a href="user-new.php" class="add-new-h2"><?php echo esc_html_x( 'Add Existing', 'user' ); ?></a> 438 <?php } 439 if ( $usersearch ) 440 printf( '<span class="subtitle">' . __('Search results for “%s”') . '</span>', esc_html( $usersearch ) ); ?> 441 </header> 442 443 443 444 444 <?php $wp_list_table->views(); ?> 445 445 -
src/wp-admin/widgets.php
diff --git src/wp-admin/widgets.php src/wp-admin/widgets.php index 42ebc1b..5d7c731 100644
$errors = array( 310 310 require_once( ABSPATH . 'wp-admin/admin-header.php' ); ?> 311 311 312 312 <div class="wrap"> 313 <h2>314 <?php 315 echo esc_html( $title );316 if ( current_user_can( 'customize' ) ) {317 printf(318 ' <a class="add-new-h2 hide-if-no-customize" href="%1$s">%2$s</a>',319 esc_url( add_query_arg(320 array(321 array( 'autofocus' => array( 'panel' => 'widgets' ) ),322 'return' => urlencode( wp_unslash( $_SERVER['REQUEST_URI'] ) )323 ),324 admin_url( 'customize.php' )325 ) ),326 __( 'Manage in Customizer' )327 );328 }329 ?>330 </h2>313 <header> 314 <h2><?php echo esc_html( $title );?></h2> 315 <?php 316 if ( current_user_can( 'customize' ) ) { 317 printf( 318 ' <a class="add-new-h2 hide-if-no-customize" href="%1$s">%2$s</a>', 319 esc_url( add_query_arg( 320 array( 321 array( 'autofocus' => array( 'panel' => 'widgets' ) ), 322 'return' => urlencode( wp_unslash( $_SERVER['REQUEST_URI'] ) ) 323 ), 324 admin_url( 'customize.php' ) 325 ) ), 326 __( 'Manage in Customizer' ) 327 ); 328 } 329 ?> 330 </header> 331 331 332 332 <?php if ( isset($_GET['message']) && isset($messages[$_GET['message']]) ) { ?> 333 333 <div id="message" class="updated"><p><?php echo $messages[$_GET['message']]; ?></p></div>