Skip to content

Instantly share code, notes, and snippets.

@X-Raym
Last active August 16, 2021 00:40
Show Gist options
  • Save X-Raym/6c167e584230a1e2daf576f5ad7578d5 to your computer and use it in GitHub Desktop.
Save X-Raym/6c167e584230a1e2daf576f5ad7578d5 to your computer and use it in GitHub Desktop.
LearnDash Users Results - Hooks Usage
<?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