Title: _search_terms_tidy
Published: April 25, 2014
Last modified: August 20, 2026

---

# _search_terms_tidy( string $t ): string

## In this article

 * [Parameters](https://developer.wordpress.org/reference/functions/_search_terms_tidy/?output_format=md#parameters)
 * [Return](https://developer.wordpress.org/reference/functions/_search_terms_tidy/?output_format=md#return)
 * [Source](https://developer.wordpress.org/reference/functions/_search_terms_tidy/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/functions/_search_terms_tidy/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/functions/_search_terms_tidy/?output_format=md#changelog)

This function has been deprecated since 3.7.0.

This function’s access is marked private. This means it is not intended for use 
by plugin or theme developers, only by core. It is listed here for completeness.

Formerly used internally to tidy up the search terms.

## 󠀁[Parameters](https://developer.wordpress.org/reference/functions/_search_terms_tidy/?output_format=md#parameters)󠁿

 `$t`stringrequired

Search terms to “tidy”, e.g. trim.

## 󠀁[Return](https://developer.wordpress.org/reference/functions/_search_terms_tidy/?output_format=md#return)󠁿

 string Trimmed search terms.

## 󠀁[Source](https://developer.wordpress.org/reference/functions/_search_terms_tidy/?output_format=md#source)󠁿

    ```php
    function _search_terms_tidy( $t ) {
    	_deprecated_function( __FUNCTION__, '3.7.0' );
    	return trim( $t, "\"'\n\r " );
    }
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/deprecated.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.1/src/wp-includes/deprecated.php#L3402)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/deprecated.php#L3402-L3405)

## 󠀁[Related](https://developer.wordpress.org/reference/functions/_search_terms_tidy/?output_format=md#related)󠁿

| Uses | Description | 
| [_deprecated_function()](https://developer.wordpress.org/reference/functions/_deprecated_function/)`wp-includes/functions.php` |

Marks a function as deprecated and inform when it has been used.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/functions/_search_terms_tidy/?output_format=md#changelog)󠁿

| Version | Description | 
| [3.7.0](https://developer.wordpress.org/reference/since/3.7.0/) | Deprecated.  | 
| [2.9.0](https://developer.wordpress.org/reference/since/2.9.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2F_search_terms_tidy%2F)
before being able to contribute a note or feedback.