On this page
_admin_search_query()
Displays the search query.
Description
A simple wrapper to display the "s" parameter in a GET URI. This function should only be used when the_search_query() cannot.
Source
File: wp-admin/includes/template.php. View all references
function _admin_search_query() {
echo isset( $_REQUEST['s'] ) ? esc_attr( wp_unslash( $_REQUEST['s'] ) ) : '';
}
Related
Uses
| Uses | Description |
|---|---|
| wp_unslash() wp-includes/formatting.php | Removes slashes from a string or recursively removes slashes from strings within an array. |
| esc_attr() wp-includes/formatting.php | Escaping for HTML attributes. |
Used By
| Used By | Description |
|---|---|
| WP_Plugins_List_Table::search_box() wp-admin/includes/class-wp-plugins-list-table.php | Displays the search box. |
| WP_Media_List_Table::views() wp-admin/includes/class-wp-media-list-table.php | Override parent views so we can use the filter bar display. |
| WP_List_Table::search_box() wp-admin/includes/class-wp-list-table.php | Displays the search box. |
Changelog
| Version | Description |
|---|---|
| 2.7.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/_admin_search_query