wpcf7_flamingo_get_value()
Хуки из функции
Возвращает
null. Ничего (null).
Использование
wpcf7_flamingo_get_value( $field, $contact_form );
- $field(обязательный)
- .
- $contact_form(обязательный)
- .
Код wpcf7_flamingo_get_value() wpcf7 flamingo get value CF7 6.1.7
function wpcf7_flamingo_get_value( $field, $contact_form ) {
if ( empty( $field ) or empty( $contact_form ) ) {
return false;
}
$value = '';
if ( in_array( $field, array( 'email', 'name', 'subject' ), true ) ) {
$template = $contact_form->pref( 'flamingo_' . $field );
if ( null === $template ) {
$template = sprintf( '[your-%s]', $field );
} else {
$template = trim( wpcf7_strip_quote( $template ) );
}
$value = wpcf7_mail_replace_tags( $template );
}
$value = apply_filters( 'wpcf7_flamingo_get_value', $value,
$field, $contact_form
);
return $value;
}