ID ); } function highlight( $post, $words, $content ) { $highlight = new Highlighter( get_the_category_list( ',', '', $post->ID ), $words, true ); if ( $highlight->has_matches() ) { $highlight->mark_words(); return '

'.__( 'Category', 'search-unleashed' ).': '.$highlight->get().'

'; } return ''; } function field_name() { return 'post_category'; } function field_value( $data ) { if ( $data == -1 ) return false; if ( is_numeric( $data ) ) return get_the_category_by_ID( intval( $data ) ); return $data; } function name() { return __( 'Post category', 'search-unleashed' ); } }