bbp_edit_user_signature_handler

The bbP Signature bbp edit user signature handler function.

Description

bbp_edit_user_signature_handler( $user_id ); 

Parameters (1)

0. $user_id
The user id.

Usage

  1. if ( !function_exists( 'bbp_edit_user_signature_handler' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'bbp-signature/bbp-signature.php'; 
  3.  
  4. // The user id. 
  5. $user_id = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = bbp_edit_user_signature_handler($user_id); 
  9.  

Defined (1)

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

/bbp-signature.php  
  1. function bbp_edit_user_signature_handler( $user_id ) { 
  2.  
  3. // Sanitize the user signature 
  4. $signature = !empty( $_POST['_bbp_signature'] ) ? $_POST['_bbp_signature'] : ''; 
  5. $signature = apply_filters( 'bbp_edit_user_signature_handler', $signature ); 
  6.  
  7. // Update signature user meta 
  8. if ( !empty( $signature ) ) 
  9. update_user_meta( $user_id, '_bbp_signature', $signature ); 
  10.  
  11. // Delete signature user meta 
  12. else 
  13. delete_user_meta( $user_id, '_bbp_signature' );