get_permalink( $data->ID ); } function get_permalink( $id ) { return str_replace( get_bloginfo( 'home' ), '', get_permalink( $id ) ); } function highlight( $post, $words, $content ) { $highlight = new Highlighter( $this->get_permalink( $post->ID ), $words, true ); if ( $highlight->has_matches() ) { $highlight->mark_words(); return '
'.__( 'Permalink', 'search-unleashed' ).': '.$highlight->get().'
'; } return ''; } function field_name() { return 'post_slug'; } function name() { return __( 'Post/page slug', 'search-unleashed' ); } }