Make WordPress Core

Changeset 49284


Ignore:
Timestamp:
10/23/2020 03:59:34 PM (6 years ago)
Author:
helen
Message:

Administration: Unify search results message on list tables.

This wraps the search string in a <strong> tag, which makes easier to parse visually especially when your search string also contains double quotes.

Props Mista-Flo, mapk, sergeybiryukov.
Fixes #37353.

Location:
trunk/src
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/js/_enqueues/wp/updates.js

    r49151 r49284  
    25812581                                        sprintf(
    25822582                                                /* translators: %s: Search query. */
    2583                                                 __( 'Search results for &#8220;%s&#8221;' ),
    2584                                                 _.escape( data.s )
     2583                                                __( 'Search results for: %s' ),
     2584                                                '<strong>' + _.escape( data.s ) + '</strong>'
    25852585                                        ) ),
    25862586                                        $oldSubTitle = $( '.wrap .subtitle' );
  • trunk/src/wp-admin/edit-comments.php

    r49193 r49284  
    233233        printf(
    234234                /* translators: %s: Search query. */
    235                 __( 'Search results for &#8220;%s&#8221;' ),
    236                 wp_html_excerpt( esc_html( wp_unslash( $_REQUEST['s'] ) ), 50, '&hellip;' )
     235                __( 'Search results for: %s' ),
     236                '<strong>' . wp_html_excerpt( esc_html( wp_unslash( $_REQUEST['s'] ) ), 50, '&hellip;' . '</strong>' )
    237237        );
    238238        echo '</span>';
  • trunk/src/wp-admin/edit-tags.php

    r47550 r49284  
    340340if ( isset( $_REQUEST['s'] ) && strlen( $_REQUEST['s'] ) ) {
    341341        /* translators: %s: Search query. */
    342         printf( '<span class="subtitle">' . __( 'Search results for &#8220;%s&#8221;' ) . '</span>', esc_html( wp_unslash( $_REQUEST['s'] ) ) );
     342        printf( '<span class="subtitle">' . __( 'Search results for: %s' ) . '</span>', '<strong>' . esc_html( wp_unslash( $_REQUEST['s'] ) ) . '</strong>' );
    343343}
    344344?>
  • trunk/src/wp-admin/edit.php

    r49193 r49284  
    408408if ( isset( $_REQUEST['s'] ) && strlen( $_REQUEST['s'] ) ) {
    409409        /* translators: %s: Search query. */
    410         printf( ' <span class="subtitle">' . __( 'Search results for &#8220;%s&#8221;' ) . '</span>', get_search_query() );
     410        printf( ' <span class="subtitle">' . __( 'Search results for: %s' ) . '</span>', '<strong>' . get_search_query() . '</strong>' );
    411411}
    412412?>
  • trunk/src/wp-admin/includes/class-wp-plugins-list-table.php

    r49241 r49284  
    408408
    409409                        /* translators: %s: Plugin search term. */
    410                         printf( __( 'No plugins found for &#8220;%s&#8221;.' ), $s );
     410                        printf( __( 'No plugins found for: %s.' ), '<strong>' . $s . '</strong>' );
    411411
    412412                        // We assume that somebody who can install plugins in multisite is experienced enough to not need this helper link.
  • trunk/src/wp-admin/link-manager.php

    r47785 r49284  
    106106if ( isset( $_REQUEST['s'] ) && strlen( $_REQUEST['s'] ) ) {
    107107        /* translators: %s: Search query. */
    108         printf( '<span class="subtitle">' . __( 'Search results for &#8220;%s&#8221;' ) . '</span>', esc_html( wp_unslash( $_REQUEST['s'] ) ) );
     108        printf( '<span class="subtitle">' . __( 'Search results for: %s' ) . '</span>', '<strong>' . esc_html( wp_unslash( $_REQUEST['s'] ) ) . '</strong>' );
    109109}
    110110?>
  • trunk/src/wp-admin/network/sites.php

    r49108 r49284  
    373373if ( isset( $_REQUEST['s'] ) && strlen( $_REQUEST['s'] ) ) {
    374374        /* translators: %s: Search query. */
    375         printf( '<span class="subtitle">' . __( 'Search results for &#8220;%s&#8221;' ) . '</span>', esc_html( $s ) );
     375        printf( '<span class="subtitle">' . __( 'Search results for: %s' ) . '</span>', '<strong>' . esc_html( $s ) . '</strong>' );
    376376}
    377377?>
  • trunk/src/wp-admin/network/themes.php

    r49193 r49284  
    354354if ( isset( $_REQUEST['s'] ) && strlen( $_REQUEST['s'] ) ) {
    355355        /* translators: %s: Search query. */
    356         printf( '<span class="subtitle">' . __( 'Search results for &#8220;%s&#8221;' ) . '</span>', esc_html( $s ) );
     356        printf( '<span class="subtitle">' . __( 'Search results for: %s' ) . '</span>', '<strong>' . esc_html( $s ) . '</strong>' );
    357357}
    358358?>
  • trunk/src/wp-admin/network/users.php

    r49108 r49284  
    280280        if ( strlen( $usersearch ) ) {
    281281                /* translators: %s: Search query. */
    282                 printf( '<span class="subtitle">' . __( 'Search results for &#8220;%s&#8221;' ) . '</span>', esc_html( $usersearch ) );
     282                printf( '<span class="subtitle">' . __( 'Search results for: %s' ) . '</span>', '<strong>' . esc_html( $usersearch ) . '</strong>' );
    283283        }
    284284        ?>
  • trunk/src/wp-admin/plugins.php

    r49193 r49284  
    729729if ( strlen( $s ) ) {
    730730        /* translators: %s: Search query. */
    731         printf( '<span class="subtitle">' . __( 'Search results for &#8220;%s&#8221;' ) . '</span>', esc_html( urldecode( $s ) ) );
     731        printf( '<span class="subtitle">' . __( 'Search results for: %s' ) . '</span>', '<strong>' . esc_html( urldecode( $s ) ) . '</strong>' );
    732732}
    733733?>
  • trunk/src/wp-admin/upload.php

    r49193 r49284  
    277277if ( isset( $_REQUEST['s'] ) && strlen( $_REQUEST['s'] ) ) {
    278278        /* translators: %s: Search query. */
    279         printf( '<span class="subtitle">' . __( 'Search results for &#8220;%s&#8221;' ) . '</span>', get_search_query() );
     279        printf( '<span class="subtitle">' . __( 'Search results for: %s' ) . '</span>', '<strong>' . get_search_query() . '</strong>' );
    280280}
    281281?>
  • trunk/src/wp-admin/users.php

    r49178 r49284  
    572572if ( strlen( $usersearch ) ) {
    573573        /* translators: %s: Search query. */
    574         printf( '<span class="subtitle">' . __( 'Search results for &#8220;%s&#8221;' ) . '</span>', esc_html( $usersearch ) );
     574        printf( '<span class="subtitle">' . __( 'Search results for: %s' ) . '</span>', '<strong>' . esc_html( $usersearch ) . '</strong>' );
    575575}
    576576?>
Note: See TracChangeset for help on using the changeset viewer.