Last active
August 16, 2021 00:40
-
-
Save X-Raym/6c167e584230a1e2daf576f5ad7578d5 to your computer and use it in GitHub Desktop.
LearnDash Users Results - Hooks Usage
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 | |
/* | |
Plugin Name: LearnDash Users Results - Customization | |
Description: LearnDash Users Results - Customization | |
Author: X-Raym | |
Author URI: https://www.extremraym.com/ | |
*/ | |
// Chane user name display | |
add_filter( 'learndash_users_results_user_display', 'learndash_users_results_user_display', 10, 1 ); | |
function learndash_users_results_user_display( $user_info ) { | |
$name = $user_info->last_name . ' ' . $user_info->first_name; | |
if ( $name === " " ) | |
$name = $user_info->display_name; | |
return $name; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment