LLMS_Admin_Users_Table::output_col( string $output, string $col_name, int $user_id )
Register custom columns
Parameters Parameters
- $output
-
(string) (Required) Column output value to display (defaults to empty).
- $col_name
-
(string) (Required) Column name/id.
- $user_id
-
(int) (Required) WP_User ID.
Return Return
(string)
Source Source
File: includes/admin/class-llms-admin-users-table.php
public function output_col( $output, $col_name, $user_id ) { switch ( $col_name ) { case 'llms-enrollments': $student = llms_get_student( $user_id ); if ( $student ) { $output = $this->get_enrollments_column_output( $student ); } break; case 'llms-last-login': $last = get_user_meta( $user_id, 'llms_last_login', true ); $last = is_numeric( $last ) ? $last : strtotime( $last ); $output = $last ? date_i18n( $this->get_login_column_date_format(), $last ) : __( 'Never', 'lifterlms' ); break; } return $output; }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
4.0.0 | Introduced. |