bp_gifts_screen_settings_menu

The Buddypress Gifts Latest 2014 bp gifts screen settings menu function.

Description

bp_gifts_screen_settings_menu(); 

Usage

  1. if ( !function_exists( 'bp_gifts_screen_settings_menu' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress-gifts-latest-2014/includes/bp-gifts-core.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = bp_gifts_screen_settings_menu(); 
  7.  

Defined (1)

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

/includes/bp-gifts-core.php  
  1. function bp_gifts_screen_settings_menu() { 
  2.  
  3. global $bp, $current_user, $bp_settings_updated, $pass_error; 
  4.  
  5.  
  6.  
  7. if ( isset( $_POST['submit'] ) ) { 
  8.  
  9. /** Check the nonce */ 
  10.  
  11. check_admin_referer('bp-gifts-admin'); 
  12.  
  13.  
  14.  
  15. $bp_settings_updated = true; 
  16.  
  17.  
  18.  
  19. /** 
  20.   
  21. * This is when the user has hit the save button on their settings. 
  22.   
  23. * The best place to store these settings is in wp_usermeta. 
  24.   
  25. */ 
  26.  
  27. update_usermeta( $bp->loggedin_user->id, 'bp-gifts-option-one', attribute_escape( $_POST['bp-gifts-option-one'] ) ); 
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37. bp_core_load_template( apply_filters( 'bp_core_template_plugin', 'plugin-template' ) ); 
  38.