_admin_search_query() WordPress Function

The _admin_search_query() function is used to construct and return a search query for the WordPress admin. It is used internally by the WordPress admin search functionality.

_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.


Top ↑

Source

File: wp-admin/includes/template.php

function _admin_search_query() {
	echo isset( $_REQUEST['s'] ) ? esc_attr( wp_unslash( $_REQUEST['s'] ) ) : '';
}


Top ↑

Changelog

Changelog
VersionDescription
2.7.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.