Last active
July 25, 2016 12:46
-
-
Save horike37/7410391 to your computer and use it in GitHub Desktop.
Trust Formの管理者宛メールの件名をカスタマイズする
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 | |
add_filter( 'tr_subject_admin_mail', 'my_tr_subject_admin_mail', 10, 3 ); | |
function my_tr_subject_admin_mail( $subject, $data, $id ) { | |
$responce = get_post_meta( $id, 'answer' ); | |
krsort($responce); | |
$entry_id = key($responce); | |
return $subject . '[id:'.$entry_id.']'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
引数 "10" と、"3" の説明をお願いできますでしょうか。
また、IDではなく、フォームの特定のinput-dataを件名に含ませる方法も教えていただけますでしょうか。
よろしくお願いします。