@@ -18,14 +18,22 @@ function wplf_send_email_copy( $return ) {
1818 if ( isset ($ form_meta ['_wplf_email_copy_enabled ' ]) && $ form_meta ['_wplf_email_copy_enabled ' ][0 ] ) {
1919 $ to = isset ($ form_meta ['_wplf_email_copy_to ' ]) ? $ form_meta ['_wplf_email_copy_to ' ][0 ] : get_option ( 'admin_email ' );
2020 $ subject = wp_sprintf ( __ ('New submission from %s ' , 'wp-libre-form ' ), $ referrer );
21- $ content = wp_sprintf ( __ ('Form "%s" (ID %d) was submitted with values below: ' , 'wp-libre-form ' ), $ form_title , $ form_id ) . "\n\n" ;
21+ $ content = wp_sprintf ( __ ('Form "%s" (ID %d) was submitted with values below: ' , 'wp-libre-form ' ), $ form_title , $ form_id );
22+ $ content = apply_filters ( 'wplf_email_copy_content_start ' , $ content , $ form_title , $ form_id ). "\n\n" ;
23+
2224 foreach ( $ _POST as $ key => $ value ) {
2325 if ( '_ ' === $ key [0 ] ) {
2426 continue ;
2527 }
2628 $ content .= esc_html ( $ key ) . ': ' . esc_html ( print_r ( $ value , true ) ) . "\n" ;
2729 }
28- wp_mail ( $ to , $ subject , $ content );
30+
31+ wp_mail (
32+ apply_filters ( 'wplf_email_copy_to ' , $ to ),
33+ apply_filters ( 'wplf_email_copy_subject ' , $ subject ),
34+ apply_filters ( 'wplf_email_copy_content ' , $ content ),
35+ apply_filters ( 'wplf_email_copy_headers ' , '' ),
36+ apply_filters ( 'wplf_email_copy_attachments ' , array () )
37+ );
2938 }
3039}
31-
0 commit comments