Last active
April 3, 2017 01:21
-
-
Save Shelob9/5d7de56241b3bdada4ebf056869168e6 to your computer and use it in GitHub Desktop.
Use image instead of link for Caldera Forms email field See: https://calderaforms.com/doc/caldera_forms_magic_file_use_link/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Use image tag in emails for Caldera Forms image fields of all forms | |
*/ | |
add_filter( 'caldera_forms_magic_file_use_link', '__return_true' ); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Use image tag in emails for Caldera Forms image fields of one form | |
*/ | |
add_filter( 'caldera_forms_magic_file_use_link', function( $use_link, $field, $form ){ | |
if( 'CF123456' == $form[ 'ID' ] ){ | |
return true; | |
} | |
return $use_link; | |
}, 10, 3 ); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment