wpcf7_doihelper_start_session()
Starts a double opt-in session.
Хуки из функции
Возвращает
null. Ничего (null).
Использование
wpcf7_doihelper_start_session( $agent_name, $args, $token );
- $agent_name(обязательный)
- .
- $args(обязательный)
- .
- $token(обязательный) (передается по ссылке — &)
- .
Код wpcf7_doihelper_start_session() wpcf7 doihelper start session CF7 6.1.6
function wpcf7_doihelper_start_session( $agent_name, $args, &$token ) {
if ( isset( $token ) ) {
return;
}
if ( ! function_exists( 'doihelper_start_session' ) ) {
return;
}
$submission = WPCF7_Submission::get_instance();
if ( ! $submission ) {
return;
}
$contact_form = $submission->get_contact_form();
$do_doi = apply_filters( 'wpcf7_do_doi',
! $contact_form->is_false( 'doi' ),
$agent_name,
$args
);
if ( ! $do_doi ) {
return;
}
$token = doihelper_start_session( $agent_name, $args );
}