verygoodplugins

Untitled

Sep 25th, 2020
761
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function my_capabilities_field( $user_meta, $user_id ) {
  2.  
  3.     if ( ! empty( $user_meta['wp_ls_capabilities'] ) ) {
  4.         $user_meta['wp_ls_capabilities'] = array_keys( $user_meta['wp_ls_capabilities'] );
  5.     }
  6.  
  7.     return $user_meta;
  8.  
  9. }
  10.  
  11. add_filter( 'wpf_user_update', 'my_capabilities_field', 10, 2 );
RAW Paste Data