bb_ksd_configuration_page

The BuddyPress bb ksd configuration page function.

Description

bb_ksd_configuration_page(); 

Usage

  1. if ( !function_exists( 'bb_ksd_configuration_page' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-forums/bbpress/bb-plugins/akismet.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = bb_ksd_configuration_page(); 
  7.  

Defined (1)

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

/bp-forums/bbpress/bb-plugins/akismet.php  
  1. function bb_ksd_configuration_page() 
  2. ?> 
  3. <h2><?php _e( 'Akismet Settings' ); ?></h2> 
  4.  
  5. <form class="settings" method="post" action="<?php bb_uri( 'bb-admin/admin-base.php', array( 'plugin' => 'bb_ksd_configuration_page'), BB_URI_CONTEXT_FORM_ACTION + BB_URI_CONTEXT_BB_ADMIN ); ?>"> 
  6. <fieldset> 
  7. <p><?php printf( __( 'For many people, <a href="%s">Akismet</a> will greatly reduce or even completely eliminate the spam you get on your site. If one does happen to get through, simply mark it as "spam" and Akismet will learn from the mistakes.' ), 'http://akismet.com/' ); ?></p> 
  8.  
  9. <?php 
  10. $after = ''; 
  11. if ( false !== $key = bb_get_option( 'akismet_key' ) ) { 
  12. if ( bb_akismet_verify_key( $key ) ) { 
  13. $after = __( 'This key is valid' ); 
  14. } else { 
  15. bb_delete_option( 'akismet_key' ); 
  16.  
  17. bb_option_form_element( 'akismet_key', array( 
  18. 'title' => __( 'WordPress.com API Key' ),  
  19. 'attributes' => array( 'maxlength' => 12 ),  
  20. 'after' => $after,  
  21. 'note' => sprintf( __( 'If you don\'t have a WordPress.com API Key, you can get one at <a href="%s">WordPress.com</a>' ), 'http://wordpress.com/api-keys/' ) 
  22. ) ); 
  23.  
  24. bb_option_form_element( 'akismet_stats', array( 
  25. 'title' => __( 'Enable stats page' ),  
  26. 'type' => 'checkbox',  
  27. 'options' => array( 
  28. 1 => __( 'Create a page that shows spam statistics.' ) 
  29. ),  
  30. 'note' => __( 'This page will be viewable by moderators or higher.' ) 
  31. ) ); 
  32. ?> 
  33.  
  34. </fieldset> 
  35. <fieldset class="submit"> 
  36. <?php bb_nonce_field( 'options-akismet-update' ); ?> 
  37. <input type="hidden" name="action" value="update-akismet-settings" /> 
  38. <input class="submit" type="submit" name="submit" value="<?php _e('Save Changes') ?>" /> 
  39. </fieldset> 
  40. </form> 
  41. <?php