ninja_forms_register_field_recaptcha

The Ninja Forms ninja forms register field recaptcha function.

Description

ninja_forms_register_field_recaptcha(); 

Usage

  1. if ( !function_exists( 'ninja_forms_register_field_recaptcha' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'ninja-forms/deprecated/includes/fields/recaptcha.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = ninja_forms_register_field_recaptcha(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/deprecated/includes/fields/recaptcha.php  
  1. function ninja_forms_register_field_recaptcha() { 
  2.  
  3. $settings = get_option( "ninja_forms_settings" ); 
  4. $args = array( 
  5. 'name' => __( 'reCAPTCHA', 'ninja-forms' ),  
  6. 'sidebar' => 'template_fields',  
  7. 'edit_function' => '',  
  8. 'display_function' => 'ninja_forms_field_recaptcha_display',  
  9. 'save_function' => '',  
  10. 'group' => 'standard_fields',  
  11. 'default_label' => __( 'Confirm that you are not a bot', 'ninja-forms' ),  
  12. 'edit_label' => true,  
  13. 'req' => true,  
  14. 'edit_label_pos' => true,  
  15. 'edit_req' => false,  
  16. 'edit_custom_class' => false,  
  17. 'edit_help' => false,  
  18. 'edit_meta' => false,  
  19. 'sidebar' => 'template_fields',  
  20. 'edit_conditional' => true,  
  21. 'conditional' => array( 
  22. 'action' => array( 
  23. 'show' => array( 
  24. 'name' => __( 'Show This', 'ninja-forms' ),  
  25. 'js_function' => 'show',  
  26. 'output' => 'hide',  
  27. ),  
  28. 'hide' => array( 
  29. 'name' => __( 'Hide This', 'ninja-forms' ),  
  30. 'js_function' => 'hide',  
  31. 'output' => 'hide',  
  32. ),  
  33. ),  
  34. ),  
  35. 'display_label' => true,  
  36. 'process_field' => false,  
  37.  
  38. ); 
  39. // show recaptcha field in admin only if site and secret key exists. 
  40. if ( !empty( $settings['recaptcha_site_key'] ) && !empty( $settings['recaptcha_secret_key'] ) ) { 
  41. ninja_forms_register_field( '_recaptcha', $args );