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. git-svn-id: https://develop.svn.wordpress.org/trunk@49284 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
ebe858e5a7
commit
e515d61ec0
@ -2580,8 +2580,8 @@
|
||||
var $subTitle = $( '<span />' ).addClass( 'subtitle' ).html(
|
||||
sprintf(
|
||||
/* translators: %s: Search query. */
|
||||
__( 'Search results for “%s”' ),
|
||||
_.escape( data.s )
|
||||
__( 'Search results for: %s' ),
|
||||
'<strong>' + _.escape( data.s ) + '</strong>'
|
||||
) ),
|
||||
$oldSubTitle = $( '.wrap .subtitle' );
|
||||
|
||||
|
@ -232,8 +232,8 @@ if ( isset( $_REQUEST['s'] ) && strlen( $_REQUEST['s'] ) ) {
|
||||
echo '<span class="subtitle">';
|
||||
printf(
|
||||
/* translators: %s: Search query. */
|
||||
__( 'Search results for “%s”' ),
|
||||
wp_html_excerpt( esc_html( wp_unslash( $_REQUEST['s'] ) ), 50, '…' )
|
||||
__( 'Search results for: %s' ),
|
||||
'<strong>' . wp_html_excerpt( esc_html( wp_unslash( $_REQUEST['s'] ) ), 50, '…' . '</strong>' )
|
||||
);
|
||||
echo '</span>';
|
||||
}
|
||||
|
@ -339,7 +339,7 @@ if ( is_plugin_active( 'wpcat2tag-importer/wpcat2tag-importer.php' ) ) {
|
||||
<?php
|
||||
if ( isset( $_REQUEST['s'] ) && strlen( $_REQUEST['s'] ) ) {
|
||||
/* translators: %s: Search query. */
|
||||
printf( '<span class="subtitle">' . __( 'Search results for “%s”' ) . '</span>', esc_html( wp_unslash( $_REQUEST['s'] ) ) );
|
||||
printf( '<span class="subtitle">' . __( 'Search results for: %s' ) . '</span>', '<strong>' . esc_html( wp_unslash( $_REQUEST['s'] ) ) . '</strong>' );
|
||||
}
|
||||
?>
|
||||
|
||||
|
@ -407,7 +407,7 @@ if ( current_user_can( $post_type_object->cap->create_posts ) ) {
|
||||
|
||||
if ( isset( $_REQUEST['s'] ) && strlen( $_REQUEST['s'] ) ) {
|
||||
/* translators: %s: Search query. */
|
||||
printf( ' <span class="subtitle">' . __( 'Search results for “%s”' ) . '</span>', get_search_query() );
|
||||
printf( ' <span class="subtitle">' . __( 'Search results for: %s' ) . '</span>', '<strong>' . get_search_query() . '</strong>' );
|
||||
}
|
||||
?>
|
||||
|
||||
|
@ -407,7 +407,7 @@ class WP_Plugins_List_Table extends WP_List_Table {
|
||||
$s = esc_html( wp_unslash( $_REQUEST['s'] ) );
|
||||
|
||||
/* translators: %s: Plugin search term. */
|
||||
printf( __( 'No plugins found for “%s”.' ), $s );
|
||||
printf( __( 'No plugins found for: %s.' ), '<strong>' . $s . '</strong>' );
|
||||
|
||||
// We assume that somebody who can install plugins in multisite is experienced enough to not need this helper link.
|
||||
if ( ! is_multisite() && current_user_can( 'install_plugins' ) ) {
|
||||
|
@ -105,7 +105,7 @@ echo esc_html( $title );
|
||||
<?php
|
||||
if ( isset( $_REQUEST['s'] ) && strlen( $_REQUEST['s'] ) ) {
|
||||
/* translators: %s: Search query. */
|
||||
printf( '<span class="subtitle">' . __( 'Search results for “%s”' ) . '</span>', esc_html( wp_unslash( $_REQUEST['s'] ) ) );
|
||||
printf( '<span class="subtitle">' . __( 'Search results for: %s' ) . '</span>', '<strong>' . esc_html( wp_unslash( $_REQUEST['s'] ) ) . '</strong>' );
|
||||
}
|
||||
?>
|
||||
|
||||
|
@ -372,7 +372,7 @@ require_once ABSPATH . 'wp-admin/admin-header.php';
|
||||
<?php
|
||||
if ( isset( $_REQUEST['s'] ) && strlen( $_REQUEST['s'] ) ) {
|
||||
/* translators: %s: Search query. */
|
||||
printf( '<span class="subtitle">' . __( 'Search results for “%s”' ) . '</span>', esc_html( $s ) );
|
||||
printf( '<span class="subtitle">' . __( 'Search results for: %s' ) . '</span>', '<strong>' . esc_html( $s ) . '</strong>' );
|
||||
}
|
||||
?>
|
||||
|
||||
|
@ -353,7 +353,7 @@ require_once ABSPATH . 'wp-admin/admin-header.php';
|
||||
<?php
|
||||
if ( isset( $_REQUEST['s'] ) && strlen( $_REQUEST['s'] ) ) {
|
||||
/* translators: %s: Search query. */
|
||||
printf( '<span class="subtitle">' . __( 'Search results for “%s”' ) . '</span>', esc_html( $s ) );
|
||||
printf( '<span class="subtitle">' . __( 'Search results for: %s' ) . '</span>', '<strong>' . esc_html( $s ) . '</strong>' );
|
||||
}
|
||||
?>
|
||||
|
||||
|
@ -279,7 +279,7 @@ if ( isset( $_REQUEST['updated'] ) && 'true' == $_REQUEST['updated'] && ! empty(
|
||||
|
||||
if ( strlen( $usersearch ) ) {
|
||||
/* translators: %s: Search query. */
|
||||
printf( '<span class="subtitle">' . __( 'Search results for “%s”' ) . '</span>', esc_html( $usersearch ) );
|
||||
printf( '<span class="subtitle">' . __( 'Search results for: %s' ) . '</span>', '<strong>' . esc_html( $usersearch ) . '</strong>' );
|
||||
}
|
||||
?>
|
||||
|
||||
|
@ -728,7 +728,7 @@ if ( ( ! is_multisite() || is_network_admin() ) && current_user_can( 'install_pl
|
||||
|
||||
if ( strlen( $s ) ) {
|
||||
/* translators: %s: Search query. */
|
||||
printf( '<span class="subtitle">' . __( 'Search results for “%s”' ) . '</span>', esc_html( urldecode( $s ) ) );
|
||||
printf( '<span class="subtitle">' . __( 'Search results for: %s' ) . '</span>', '<strong>' . esc_html( urldecode( $s ) ) . '</strong>' );
|
||||
}
|
||||
?>
|
||||
|
||||
|
@ -276,7 +276,7 @@ if ( current_user_can( 'upload_files' ) ) {
|
||||
|
||||
if ( isset( $_REQUEST['s'] ) && strlen( $_REQUEST['s'] ) ) {
|
||||
/* translators: %s: Search query. */
|
||||
printf( '<span class="subtitle">' . __( 'Search results for “%s”' ) . '</span>', get_search_query() );
|
||||
printf( '<span class="subtitle">' . __( 'Search results for: %s' ) . '</span>', '<strong>' . get_search_query() . '</strong>' );
|
||||
}
|
||||
?>
|
||||
|
||||
|
@ -571,7 +571,7 @@ switch ( $wp_list_table->current_action() ) {
|
||||
|
||||
if ( strlen( $usersearch ) ) {
|
||||
/* translators: %s: Search query. */
|
||||
printf( '<span class="subtitle">' . __( 'Search results for “%s”' ) . '</span>', esc_html( $usersearch ) );
|
||||
printf( '<span class="subtitle">' . __( 'Search results for: %s' ) . '</span>', '<strong>' . esc_html( $usersearch ) . '</strong>' );
|
||||
}
|
||||
?>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user