From b50f25ae113c95660a4caaeda8421af07da70958 Mon Sep 17 00:00:00 2001 From: ryan Date: Fri, 3 Oct 2008 03:06:43 +0000 Subject: [PATCH] Function to prep 's' for display on admin pages that don't run WP_Query(). Props Viper007Bond. see #7552 git-svn-id: http://svn.automattic.com/wordpress/trunk@9074 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/categories.php | 2 +- wp-admin/edit-comments.php | 2 +- wp-admin/edit-link-categories.php | 2 +- wp-admin/edit-pages.php | 2 +- wp-admin/edit-tags.php | 2 +- wp-admin/includes/template.php | 16 +++++++++++++++- wp-admin/link-manager.php | 2 +- 7 files changed, 21 insertions(+), 7 deletions(-) diff --git a/wp-admin/categories.php b/wp-admin/categories.php index e879ea093f..2322770cd3 100644 --- a/wp-admin/categories.php +++ b/wp-admin/categories.php @@ -143,7 +143,7 @@ endif; ?>
diff --git a/wp-admin/edit-comments.php b/wp-admin/edit-comments.php index fe079375f9..664dfa1d61 100644 --- a/wp-admin/edit-comments.php +++ b/wp-admin/edit-comments.php @@ -176,7 +176,7 @@ unset($status_links);
diff --git a/wp-admin/edit-link-categories.php b/wp-admin/edit-link-categories.php index 7185bc3a82..4d461a1746 100644 --- a/wp-admin/edit-link-categories.php +++ b/wp-admin/edit-link-categories.php @@ -79,7 +79,7 @@ endif; ?>
diff --git a/wp-admin/edit-pages.php b/wp-admin/edit-pages.php index 5da23b026a..49e8ff455c 100644 --- a/wp-admin/edit-pages.php +++ b/wp-admin/edit-pages.php @@ -165,7 +165,7 @@ endif;
diff --git a/wp-admin/edit-tags.php b/wp-admin/edit-tags.php index 1ab2706d63..20fcd3aa89 100644 --- a/wp-admin/edit-tags.php +++ b/wp-admin/edit-tags.php @@ -146,7 +146,7 @@ endif; ?>
diff --git a/wp-admin/includes/template.php b/wp-admin/includes/template.php index 1243f77967..d156162944 100644 --- a/wp-admin/includes/template.php +++ b/wp-admin/includes/template.php @@ -2978,4 +2978,18 @@ function _draft_or_post_title($post_id = 0) return $title; } -?> +/** + * Display the search query. + * + * A simple wrapper to display the "s" parameter in a GET URI. This function + * should only be used when {@link the_search_query()} cannot. + * + * @uses attribute_escape + * @since 2.7.0 + * + */ +function _admin_search_query() { + echo ( isset($_GET['s']) ) ? attribute_escape( stripslashes( $_GET['s'] ) ) : ''; +} + +?> \ No newline at end of file diff --git a/wp-admin/link-manager.php b/wp-admin/link-manager.php index 1afdef0c5e..b620936641 100644 --- a/wp-admin/link-manager.php +++ b/wp-admin/link-manager.php @@ -124,7 +124,7 @@ echo $select_order;