display_name; } function get_permalink( $id ) { return str_replace( get_bloginfo( 'home' ), '', get_permalink( $id ) ); } function get_author( $word, $post ) { if ( $this->link === true ) return sprintf( '%s', get_author_posts_url( $post->post_author ), $word ); return $word; } function highlight( $post, $words, $content ) { $highlight = new Highlighter( get_the_author_meta('display_name', $post->post_author ), $words, true ); if ( $highlight->has_matches() ) { $highlight->mark_words(); return '
'.__( 'Author', 'search-unleashed' ).': '.$this->get_author( $highlight->get(), $post ).'
'; } return ''; } function name() { return __( 'Post/page author', 'search-unleashed' ); } function field_name() { return 'post_author'; } function load( $config ) { if ( isset( $config['link'] ) ) $this->link = $config['link']; } function edit() { ?>