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.


Top ↑

Parameters Parameters

$actions

(string[]) (Required) Array of existing action links.

$user

(WP_User) (Required) User object.


Top ↑

Return Return

(string[])


Top ↑

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;

	}


Top ↑

Changelog Changelog

Changelog
Version Description
4.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.