WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
функция не описана

wpcf7_recaptcha_enqueue_scripts() CF7 1.0

Хуки из функции
Возвращает

null. Ничего.

Использование

wpcf7_recaptcha_enqueue_scripts();

Код wpcf7_recaptcha_enqueue_scripts() CF7 5.4.1

<?php
function wpcf7_recaptcha_enqueue_scripts() {
	$service = WPCF7_RECAPTCHA::get_instance();

	if ( ! $service->is_active() ) {
		return;
	}

	wp_enqueue_script( 'google-recaptcha',
		add_query_arg(
			array(
				'render' => $service->get_sitekey(),
			),
			'https://www.google.com/recaptcha/api.js'
		),
		array(),
		'3.0',
		true
	);

	$assets = array();
	$asset_file = wpcf7_plugin_path( 'modules/recaptcha/index.asset.php' );

	if ( file_exists( $asset_file ) ) {
		$assets = include( $asset_file );
	}

	$assets = wp_parse_args( $assets, array(
		'src' => wpcf7_plugin_url( 'modules/recaptcha/index.js' ),
		'dependencies' => array(
			'google-recaptcha',
			'wp-polyfill',
		),
		'version' => WPCF7_VERSION,
		'in_footer' => true,
	) );

	wp_register_script(
		'wpcf7-recaptcha',
		$assets['src'],
		$assets['dependencies'],
		$assets['version'],
		$assets['in_footer']
	);

	wp_enqueue_script( 'wpcf7-recaptcha' );

	wp_localize_script( 'wpcf7-recaptcha',
		'wpcf7_recaptcha',
		array(
			'sitekey' => $service->get_sitekey(),
			'actions' => apply_filters( 'wpcf7_recaptcha_actions', array(
				'homepage' => 'homepage',
				'contactform' => 'contactform',
			) ),
		)
	);
}