LLMS_Admin_Users_Table::add_actions( string[] $actions, WP_User $user )
Add custom actions links
Description Description
Outputs a "Reports" action link seen when hovering over a user in the table.
Parameters Parameters
- $actions
-
(string[]) (Required) Array of existing action links.
- $user
-
(WP_User) (Required) User object.
Return Return
(string[])
Source Source
File: includes/admin/class-llms-admin-users-table.php
public function add_actions( $actions, $user ) {
$url = LLMS_Admin_Reporting::get_current_tab_url(
array(
'student_id' => $user->ID,
)
);
$actions['llms-reporting'] = '<a href="' . esc_url( $url ) . '">' . __( 'Reports', 'lifterlms' ) . '</a>';
return $actions;
}
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
| Version | Description |
|---|---|
| 4.0.0 | Introduced. |