hello! I thought this would be a simple thing, but I can't find the solution. I am using a shortcode with the cloak_email tag to generate a mailto link:
The client has asked for the email subject to be included ... not sure how to do this? Any suggestions? Thanks!
- Code: Select all
$FUNCS->register_shortcode( 'mail', 'mail_handler' ); function mail_handler( $params, $content=null ){ global $FUNCS; extract( $FUNCS->get_named_vars(array( 'address' => '', 'link' => '' ), $params) ); $mail = "<cms:get_custom_field 'email_address' masterpage='globals.php' />"; if( empty($address) ) $address=$mail; if( empty($link) ) $link=$mail; $html = '<cms:cloak_email email="'.$address.'" title="'.$link.'" />'; // Pass on the code to Couch for execution using the 'embed' function return $FUNCS->embed( $html, $is_code=1 ); }
The client has asked for the email subject to be included ... not sure how to do this? Any suggestions? Thanks!