Skip to content

Commit 29bca3d

Browse files
committed
Add search string to H2s, fixes WordPress#8373
git-svn-id: https://develop.svn.wordpress.org/trunk@10034 602fd350-edb4-49c9-b593-d223f7449a82
1 parent dfed4a9 commit 29bca3d

9 files changed

Lines changed: 18 additions & 9 deletions

File tree

wp-admin/categories.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,8 @@
131131

132132
<div class="wrap nosubsub">
133133
<?php screen_icon(); ?>
134-
<h2><?php echo wp_specialchars( $title ); ?></h2>
134+
<?php $h2_search = isset($_GET['s']) && $_GET['s'] ? ' ' . sprintf(__('matching &#8220;%s&#8221;'), wp_specialchars( stripslashes($_GET['s']) ) ) : ''; ?>
135+
<h2><?php echo wp_specialchars( $title ) . $h2_search; ?></h2>
135136

136137
<?php
137138
if ( isset($_GET['message']) && ( $msg = (int) $_GET['message'] ) ) : ?>

wp-admin/edit-comments.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,8 @@
8686

8787
<div class="wrap">
8888
<?php screen_icon(); ?>
89-
<h2><?php echo wp_specialchars( $title ); ?></h2>
89+
<?php $h2_search = isset($_GET['s']) && $_GET['s'] ? ' ' . sprintf(__('matching &#8220;%s&#8221;'), wp_specialchars( stripslashes($_GET['s']) ) ) : ''; ?>
90+
<h2><?php echo wp_specialchars( $title ) . $h2_search; ?></h2>
9091

9192
<?php
9293
if ( isset( $_GET['approved'] ) || isset( $_GET['deleted'] ) || isset( $_GET['spam'] ) ) {

wp-admin/edit-link-categories.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@
6161

6262
<div class="wrap nosubsub">
6363
<?php screen_icon(); ?>
64-
<h2><?php echo wp_specialchars( $title ); ?></h2>
64+
<?php $h2_search = isset($_GET['s']) && $_GET['s'] ? ' ' . sprintf(__('matching &#8220;%s&#8221;'), wp_specialchars( stripslashes($_GET['s']) ) ) : ''; ?>
65+
<h2><?php echo wp_specialchars( $title ) . $h2_search; ?></h2>
6566

6667
<?php if ( isset($_GET['message']) && ( $msg = (int) $_GET['message'] ) ) : ?>
6768
<div id="message" class="updated fade"><p><?php echo $messages[$msg]; ?></p></div>

wp-admin/edit-pages.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,8 @@
104104

105105
<div class="wrap">
106106
<?php screen_icon(); ?>
107-
<h2><?php echo wp_specialchars( $title ); ?></h2>
107+
<?php $h2_search = isset($_GET['s']) && $_GET['s'] ? ' ' . sprintf(__('matching &#8220;%s&#8221;'), wp_specialchars( get_search_query() ) ) : ''; ?>
108+
<h2><?php echo wp_specialchars( $title ) . $h2_search; ?></h2>
108109

109110
<?php if ( isset($_GET['locked']) || isset($_GET['skipped']) || isset($_GET['updated']) || isset($_GET['deleted']) ) { ?>
110111
<div id="message" class="updated fade"><p>

wp-admin/edit-tags.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,8 @@
130130

131131
<div class="wrap nosubsub">
132132
<?php screen_icon(); ?>
133-
<h2><?php echo wp_specialchars( $title ); ?></h2>
133+
<?php $h2_search = isset($_GET['s']) && $_GET['s'] ? ' ' . sprintf(__('matching &#8220;%s&#8221;'), wp_specialchars( stripslashes($_GET['s']) ) ) : ''; ?>
134+
<h2><?php echo wp_specialchars( $title ) . $h2_search; ?></h2>
134135

135136
<?php if ( isset($_GET['message']) && ( $msg = (int) $_GET['message'] ) ) : ?>
136137
<div id="message" class="updated fade"><p><?php echo $messages[$msg]; ?></p></div>

wp-admin/edit.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,8 @@
9696

9797
<div class="wrap">
9898
<?php screen_icon(); ?>
99-
<h2><?php echo wp_specialchars( $title ); ?></h2>
99+
<?php $h2_search = isset($_GET['s']) && $_GET['s'] ? ' ' . sprintf(__('matching &#8220;%s&#8221;'), wp_specialchars( get_search_query() ) ) : ''; ?>
100+
<h2><?php echo wp_specialchars( $title ) . $h2_search; ?></h2>
100101

101102
<?php
102103
if ( isset($_GET['posted']) && $_GET['posted'] ) : $_GET['posted'] = (int) $_GET['posted']; ?>

wp-admin/link-manager.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,8 @@
7171

7272
<div class="wrap nosubsub">
7373
<?php screen_icon(); ?>
74-
<h2><?php echo wp_specialchars( $title ); ?></h2>
74+
<?php $h2_search = isset($_GET['s']) && $_GET['s'] ? ' ' . sprintf(__('matching &#8220;%s&#8221;'), wp_specialchars( stripslashes($_GET['s']) ) ) : ''; ?>
75+
<h2><?php echo wp_specialchars( $title ) . $h2_search; ?></h2>
7576

7677
<?php
7778
if ( isset($_GET['deleted']) ) {

wp-admin/upload.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,8 @@
164164

165165
<div class="wrap">
166166
<?php screen_icon(); ?>
167-
<h2><?php echo wp_specialchars( $title ); ?></h2>
167+
<?php $h2_search = isset($_GET['s']) && $_GET['s'] ? ' ' . sprintf(__('matching &#8220;%s&#8221;'), wp_specialchars( get_search_query() ) ) : ''; ?>
168+
<h2><?php echo wp_specialchars( $title ) . $h2_search; ?></h2>
168169

169170
<?php
170171
if ( isset($message) ) { ?>

wp-admin/users.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,8 @@
239239

240240
<div class="wrap">
241241
<?php screen_icon(); ?>
242-
<h2><?php echo wp_specialchars( $title ); ?></h2>
242+
<?php $h2_search = isset($_GET['s']) && $_GET['s'] ? ' ' . sprintf(__('matching &#8220;%s&#8221;'), wp_specialchars( get_search_query() ) ) : ''; ?>
243+
<h2><?php echo wp_specialchars( $title ) . $h2_search; ?></h2>
243244

244245
<div class="filter">
245246
<form id="list-filter" action="" method="get">

0 commit comments

Comments
 (0)