post_excerpt ); } function highlight( $post, $words, $content ) { global $search_spider; // First check if the excerpt is not the same as the content $highlight = new Highlighter( $content, $words, true ); if ( $highlight->has_matches() && $search_spider->has_highlighted_content == false ) { $highlight->zoom( $this->before, $this->after ); $highlight->mark_words(); return '

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

'; } return ''; } function field_name() { return 'post_excerpt'; } function name() { return __( 'Post/page excerpt', 'search-unleashed' ); } function load( $config ) { if ( isset( $config['before'] ) ) $this->before = $config['before']; if ( isset( $config['after'] ) ) $this->after = $config['after']; } function edit() { global $wpdb; $available = $wpdb->get_results( "SELECT meta_key FROM {$wpdb->postmeta} WHERE meta_key NOT LIKE '%_wp%' GROUP BY meta_key ORDER BY meta_key" ); ?> : : intval( $data['before'] ), 'after' => intval( $data['after'] ) ); } }