Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.
LLMS_Meta_Box_Award_Engagement_Submit::student_information()
Current student information html.
Return Return
(string)
Source Source
File: includes/admin/post-types/meta-boxes/class.llms.meta.box.award.engagement.submit.php
private function student_information() { $post_type = get_post_type( $this->post->ID ); $student_id = $this->current_student_id(); $student = $student_id ? llms_get_student( $student_id ) : $student_id; // Bail if no student. if ( empty( $student ) ) { return ''; } $first = $student->get( 'first_name' ); $last = $student->get( 'last_name' ); if ( ! $first || ! $last ) { $name = $student->get( 'display_name' ); } else { $name = $last . ', ' . $first; } $url = add_query_arg( array( 'page' => 'llms-reporting', 'tab' => 'students', 'student_id' => $student_id, 'stab' => $this->post_types[ $post_type ]['reporting_stab'], ), admin_url( 'admin.php' ) ); return sprintf( '<li class="llms-mb-list student-info"> <b>%1$s:</b> <span>%2$s</span></li>', __( 'Student', 'lifterlms' ), sprintf( '<a href="%1$s" target="_blank">%2$s <%3$s></a>', esc_url( $url ), $name, $student->get( 'user_email' ) ) ); }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
6.0.0 | Introduced. |