Inventory_Presser_Contact_Form_7::add_link( string $replaced, string $submitted, string $html, WPCF7_MailTag $mail_tag )
Wraps strings like “2020 Toyota Sienna LE, 10329A” with a link in form submission emails.
On This Page
Parameters Parameters
- $replaced
-
(string) (Required)
- $submitted
-
(string) (Required) "2020 Toyota Sienna LE, 10329A"
- $html
-
(string) (Required)
- $mail_tag
-
(WPCF7_MailTag) (Required)
Return Return
(string)
Source Source
File: includes/integrations/class-contact-form-7.php
public function add_link( $replaced, $submitted, $html, $mail_tag ) { // Allow HTML in emails. add_filter( 'wp_mail_content_type', array( $this, 'html_mail_content_type' ) ); $post_id = $this->get_submission_vehicle_post_id( $submitted ); if ( empty( $post_id ) ) { return $replaced; } return sprintf( '<a href="%s">%s</a>', get_permalink( $post_id ), $replaced ); }
Expand full source codeCollapse full source codeView on Github