wpcf7_captcha_ajax_refill()
Хуков нет.
Возвращает
null. Ничего (null).
Использование
wpcf7_captcha_ajax_refill( $items );
- $items(обязательный)
- .
Код wpcf7_captcha_ajax_refill() wpcf7 captcha ajax refill CF7 6.1.6
function wpcf7_captcha_ajax_refill( $items ) {
if ( ! is_array( $items ) ) {
return $items;
}
$tags = wpcf7_scan_form_tags( array( 'type' => 'captchac' ) );
if ( empty( $tags ) ) {
return $items;
}
$refill = array();
foreach ( $tags as $tag ) {
$name = $tag->name;
$options = $tag->options;
if ( empty( $name ) ) {
continue;
}
$op = wpcf7_captchac_options( $options );
if ( $filename = wpcf7_generate_captcha( $op ) ) {
$captcha_url = wpcf7_captcha_url( $filename );
$refill[$name] = $captcha_url;
}
}
if ( ! empty( $refill ) ) {
$items['captcha'] = $refill;
}
return $items;
}