includes/class-sensei-learner.php 1 location
|
@@ 34-42 (lines=9) @@
|
31 |
|
// get the user details |
32 |
|
$user = get_user_by( 'id', $user_id ); |
33 |
|
|
34 |
|
if( ! empty( $user->first_name ) && ! empty( $user->last_name ) ){ |
35 |
|
|
36 |
|
$full_name = trim( $user->first_name ) . ' ' . trim( $user->last_name ); |
37 |
|
|
38 |
|
}else{ |
39 |
|
|
40 |
|
$full_name = $user->display_name; |
41 |
|
|
42 |
|
} |
43 |
|
|
44 |
|
/** |
45 |
|
* Filter the user full name from the get_learner_full_name function. |
includes/shortcodes/class-sensei-shortcode-teachers.php 1 location
|
@@ 240-250 (lines=11) @@
|
237 |
|
*/ |
238 |
|
public function get_user_public_name( $user ){ |
239 |
|
|
240 |
|
if (!empty($user->first_name) && !empty($user->last_name)) { |
241 |
|
|
242 |
|
$user_public_name = $user->first_name . ' ' . $user->last_name; |
243 |
|
|
244 |
|
} |
245 |
|
|
246 |
|
else { |
247 |
|
|
248 |
|
$user_public_name = $user->display_name; |
249 |
|
|
250 |
|
} |
251 |
|
|
252 |
|
return $user_public_name; |
253 |
|
} |