WordPress at Your Fingertips
function is not described

WP_Themes_List_Table::search_theme() public WP 1.0

{} It's a method of the class: WP_Themes_List_Table{}

No Hooks.

Return

true|false.

Usage

$WP_Themes_List_Table = new WP_Themes_List_Table();
$WP_Themes_List_Table->search_theme( $theme );
$theme(WP_Theme) (required)
-

Code of WP_Themes_List_Table::search_theme() WP 5.8.2

public function search_theme( $theme ) {
	// Search the features.
	foreach ( $this->features as $word ) {
		if ( ! in_array( $word, $theme->get( 'Tags' ), true ) ) {
			return false;
		}
	}

	// Match all phrases.
	foreach ( $this->search_terms as $word ) {
		if ( in_array( $word, $theme->get( 'Tags' ), true ) ) {
			continue;
		}

		foreach ( array( 'Name', 'Description', 'Author', 'AuthorURI' ) as $header ) {
			// Don't mark up; Do translate.
			if ( false !== stripos( strip_tags( $theme->display( $header, false, true ) ), $word ) ) {
				continue 2;
			}
		}

		if ( false !== stripos( $theme->get_stylesheet(), $word ) ) {
			continue;
		}

		if ( false !== stripos( $theme->get_template(), $word ) ) {
			continue;
		}

		return false;
	}

	return true;
}