$results (array) - Array containing the result objects.
$search_id (int) - Search instance ID
$args (array) - Search arguments
Usage
add_filter('asp_cpt_results','asp_cpt_result_filter',10,3);functionasp_cpt_result_filter( $results, $search_id, $args ) { $link ='https://www.google.com/'; // Link to use, when not logged in// Parse through each result itemforeach ($results as $k=>&$r) {/** * $r (stdClass object) { * 'id' -> Post or other result object (taxonomy term, user etc..) ID, * 'title' -> Result title * 'content' -> Result content * 'post_type' -> Result post type (if available) * 'content_type' -> Content type (pagepost, user, term, attachment etc..) * } **/if ( !is_user_logged_in() ) $r->link = $link; }return $results;}