post_type && is_search() ) { // fetch download object try { /** @var DLM_Download $download */ $download = download_monitor()->service( 'download_repository' )->retrieve_single( $post->ID ); // allow this search download URL to be filtered return apply_filters( 'dlm_search_download_url', $download->get_the_download_link(), $download ); } catch ( Exception $e ) { } } return $post_link; } }