Guest User

Untitled

a guest
Jul 20th, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. $member_details->user_login = array_map( 'sanitize_text_field', $_POST['user_login'] );
  2. $member_details->user_role = array_map( 'sanitize_text_field', $_POST['user_role'] );
  3. $member_details->status = array_map( 'sanitize_text_field', $_POST['status'] );
  4.  
  5. $member_details_encode = wp_json_encode( $member_details );
  6.  
  7. global $wpdb;
  8.  
  9. $member_result = $wpdb->insert( 'wpxa_project_members',
  10.  
  11. array(
  12.  
  13. 'project_id' => $_SESSION['project_id'],
  14. 'author_id' => $post_author,
  15. 'member_details' => $member_details_encode
  16.  
  17. ),
  18.  
  19. array(
  20.  
  21. '%d',
  22. '%d',
  23. '%s'
  24.  
  25. )
  26.  
  27. );
  28.  
  29. wp_mail($to = $post_author, $subject = 'This is the subject', $message = 'This is the message');
Add Comment
Please, Sign In to add comment