Reply To: Get File Names in Email
August 5, 2020 at 9:39 am Reply
Support Manager
Okay, try this:
add_filter( 'syncs3_s3urls_merge_tag_link_anchor_text', 'em_replace_s3url_link_text', 10, 4 );
/**
* Modify a link's anchor text in the {s3urls} merge tag.
*
* @param string $text Anchor text
* @param string $url File S3 URL
* @param array $form Form data
* @param array $entry Entry data
*
* @return string
*/
function em_replace_s3url_link_text( $text, $url, $form, $entry ) {
return "C:/path/to/{$text}";
}
The filename is now the default, so this is just prepending the path. All you need to do is adjust the path in front of {$text} – the {$text} portion is the filename.