Created
April 26, 2023 06:52
-
-
Save mwangepatrick/62d6ac456ad5472f87e762a7967b79cd to your computer and use it in GitHub Desktop.
How to modify the ACF user object results
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter('acf/fields/user/result', 'my_acf_fields_post_object_result', 10, 4); | |
function my_acf_fields_post_object_result( $text, $user, $field, $post_id ) { | |
$text .= ' (' . $user->user_email . ')'; | |
return $text; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment