Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- add_filter( 'mycred_parse_tags_user', function ( $content, $user, $data ) {
- if ( ! is_object( $user ) && is_array( $user ) )
- $user = (object) $user;
- if ( ! isset( $user->ID ) ) return $content;
- $profile_url = mycred_get_users_profile_url( $user->ID );
- $display_name = $user->display_name;
- if(class_exists('PeepSoUser')){
- $peepso_user = PeepSoUser::get_instance($user->ID);
- $display_name = $peepso_user->get_fullname();
- }
- $content = str_replace( '%user_profile_link%', '<a href="' . esc_url_raw( $profile_url ) . '">' . esc_attr( $display_name ) . '</a>', $content );
- return $content;
- }, 10, 3);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement