publicfunctionsearch_theme($theme){// Search the featuresforeach($this->featuresas$word){if(!in_array($word,$theme->get('Tags')))returnfalse;}// Match all phrasesforeach($this->search_termsas$word){if(in_array($word,$theme->get('Tags')))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)){continue2;}}if(false!==stripos($theme->get_stylesheet(),$word))continue;if(false!==stripos($theme->get_template(),$word))continue;returnfalse;}returntrue;}