wpcf7_acceptance_mail_tag()
Хуков нет.
Возвращает
null. Ничего (null).
Использование
wpcf7_acceptance_mail_tag( $replaced, $submitted, $html, $mail_tag );
- $replaced(обязательный)
- .
- $submitted(обязательный)
- .
- $html(обязательный)
- .
- $mail_tag(обязательный)
- .
Код wpcf7_acceptance_mail_tag() wpcf7 acceptance mail tag CF7 6.1.5
function wpcf7_acceptance_mail_tag( $replaced, $submitted, $html, $mail_tag ) {
$form_tag = $mail_tag->corresponding_form_tag();
if ( ! $form_tag ) {
return $replaced;
}
if ( ! empty( $submitted ) ) {
$replaced = __( 'Consented', 'contact-form-7' );
} else {
$replaced = __( 'Not consented', 'contact-form-7' );
}
$content = empty( $form_tag->content )
? (string) reset( $form_tag->values )
: $form_tag->content;
if ( ! $html ) {
$content = wp_strip_all_tags( $content );
}
$content = trim( $content );
if ( $content ) {
$replaced = sprintf(
/* translators: 1: 'Consented' or 'Not consented', 2: conditions */
_x( '%1$s: %2$s', 'mail output for acceptance checkboxes', 'contact-form-7' ),
$replaced,
$content
);
}
return $replaced;
}