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. Built from https://develop.svn.wordpress.org/trunk@49284 git-svn-id: http://core.svn.wordpress.org/trunk@49046 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
4847fb4263
commit
e0c12cc818
|
@ -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' ) ) {
|
||||
|
|
|
@ -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' );
|
||||
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -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>' );
|
||||
}
|
||||
?>
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '5.6-beta1-49283';
|
||||
$wp_version = '5.6-beta1-49284';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue