ninja_forms_register_field_recaptcha
The Ninja Forms ninja forms register field recaptcha function.
Description
ninja_forms_register_field_recaptcha();
Usage
if ( !function_exists( 'ninja_forms_register_field_recaptcha' ) ) { require_once ABSPATH . PLUGINDIR . 'ninja-forms/deprecated/includes/fields/recaptcha.php'; } // NOTICE! Understand what this does before running. $result = ninja_forms_register_field_recaptcha();
Defined (1)
The function is defined in the following location(s).
- /deprecated/includes/fields/recaptcha.php
- function ninja_forms_register_field_recaptcha() {
- $settings = get_option( "ninja_forms_settings" );
- $args = array(
- 'name' => __( 'reCAPTCHA', 'ninja-forms' ),
- 'sidebar' => 'template_fields',
- 'edit_function' => '',
- 'display_function' => 'ninja_forms_field_recaptcha_display',
- 'save_function' => '',
- 'group' => 'standard_fields',
- 'default_label' => __( 'Confirm that you are not a bot', 'ninja-forms' ),
- 'edit_label' => true,
- 'req' => true,
- 'edit_label_pos' => true,
- 'edit_req' => false,
- 'edit_custom_class' => false,
- 'edit_help' => false,
- 'edit_meta' => false,
- 'sidebar' => 'template_fields',
- 'edit_conditional' => true,
- 'conditional' => array(
- 'action' => array(
- 'show' => array(
- 'name' => __( 'Show This', 'ninja-forms' ),
- 'js_function' => 'show',
- 'output' => 'hide',
- ),
- 'hide' => array(
- 'name' => __( 'Hide This', 'ninja-forms' ),
- 'js_function' => 'hide',
- 'output' => 'hide',
- ),
- ),
- ),
- 'display_label' => true,
- 'process_field' => false,
- 'pre_process' => 'ninja_forms_field_recaptcha_pre_process',
- );
- // show recaptcha field in admin only if site and secret key exists.
- if ( !empty( $settings['recaptcha_site_key'] ) && !empty( $settings['recaptcha_secret_key'] ) ) {
- ninja_forms_register_field( '_recaptcha', $args );
- }
- }