Advertisement
verygoodplugins

Untitled

Oct 24th, 2018
192
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.34 KB | None | 0 0
  1. function tag_with_name( $user_id, $contact_id, $post_data ) {
  2.  
  3.     if( ! empty( $post_data['first_name'] ) && ! empty( $post_data['last_name'] ) ) {
  4.  
  5.         $tag = $post_data['first_name'] . $post_data['last_name'];
  6.  
  7.         wp_fusion()->user->apply_tags( array( $tag ), $user_id );
  8.  
  9.     }
  10.  
  11. }
  12.  
  13. add_action( 'wpf_user_created', 'tag_with_name', 10, 3 );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement