Advertisement
verygoodplugins

Untitled

May 17th, 2019
233
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.38 KB | None | 0 0
  1. function custom_format_checkbox_alt( $user_meta, $user_id ) {
  2.  
  3.     foreach( $user_meta as $key => $value ) {
  4.  
  5.         if( $key == 'boutique_awards_winner_2018' ) {
  6.            
  7.             if( empty( $value ) ) {
  8.                 $user_meta[$key] = 'No';
  9.             } else {
  10.                 $user_meta[$key] = 'Yes';
  11.             }
  12.  
  13.         }
  14.  
  15.     }
  16.  
  17.     return $user_meta;
  18.  
  19. }
  20.  
  21. add_filter( 'wpf_user_update', 'custom_format_checkbox_alt', 10, 2 );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement