bbpc_settings_page

The reCaptcha for bbPress 2.0 bbpc settings page function.

Description

bbpc_settings_page(); 

Usage

  1. if ( !function_exists( 'bbpc_settings_page' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'recaptcha-for-bbpress-2-0/bbpress-recaptcha.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = bbpc_settings_page(); 
  7.  

Defined (1)

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

/bbpress-recaptcha.php  
  1. function bbpc_settings_page() { 
  2. $bbpc_options = get_option('bbpc_settings'); 
  3.  
  4. ?> 
  5. <div class="wrap"> 
  6. <h2>bbPress reCaptcha Settings</h2> 
  7. <?php 
  8. if ( ! isset( $_REQUEST['updated'] ) ) 
  9. $_REQUEST['updated'] = false; 
  10. ?> 
  11. <?php if ( false !== $_REQUEST['updated'] ) : ?> 
  12. <div class="updated fade"><p><strong><?php _e( 'Options saved' ); ?></strong></p></div> 
  13. <?php endif; ?> 
  14. <form method="post" action="options.php"> 
  15.  
  16. <?php settings_fields( 'bbpc_settings_group' ); ?> 
  17.  
  18. <h4>reCaptcha Keys</h4> 
  19. <p> 
  20. <label for="bbpc_settings[public_key]"><?php _e( 'reCaptcha Public Key' ); ?></label><br/> 
  21. <input id="bbpc_settings[public_key]" style="width: 300px;" name="bbpc_settings[public_key]" type="text" value="<?php echo esc_attr( $bbpc_options['public_key'] ); ?>" /> 
  22. <p class="description">This your own personal reCaptcha Public key. Go to <a href="https://www.google.com/recaptcha/admin/list">your account</a>, then click on your domain (or add a new one) to find your public key.</p> 
  23. </p> 
  24. <p> 
  25. <label for="bbpc_settings[private_key]"><?php _e( 'reCaptcha Private Key' ); ?></label><br/> 
  26. <input id="bbpc_settings[private_key]" style="width: 300px;" name="bbpc_settings[private_key]" type="text" value="<?php echo esc_attr( $bbpc_options['private_key'] ); ?>" /> 
  27. <p class="description">This your own personal reCaptcha Private key. Go to <a href="https://www.google.com/recaptcha/admin/list">your account</a>, then click on your domain (or add a new one) to find your private key.</p> 
  28. </p> 
  29. <p> 
  30. <input id="bbpc_settings[show_to_logged_in]" name="bbpc_settings[show_to_logged_in]" type="checkbox" value="1" <?php checked( true, isset( $bbpc_options['show_to_logged_in'] ) ); ?>/> 
  31. <label for="bbpc_settings[show_to_logged_in]"><?php _e( 'Show to logged-in users?' ); ?></label><br/> 
  32. <p class="description">Require the logged in users fill out the reCaptcha form? Note, admins are always excluded.</p> 
  33. </p> 
  34.  
  35. <!-- save the options --> 
  36. <p class="submit"> 
  37. <input type="submit" class="button-primary" value="<?php _e( 'Save Options' ); ?>" /> 
  38. </p> 
  39.  
  40.  
  41. </form> 
  42. </div><!--end wrap--> 
  43.  
  44. <?php