/** * Get and return all of the custom user fields * * @return array */ function register_user_metas($user_type = 'subscriber', $fields = null) { if (is_null($fields)) { return false; } foreach ($fields as $field) { add_custom_user_field($user_type, $field); } return true; }
/** * Get and return all of the custom user fields * * @return array */ function get_custom_user_fields($user_type = 'subscriber') { //initializing variables $fields = add_custom_user_field(); if (!isset($fields[$user_type])) { return false; } return $fields[$user_type]; }