This hook runs on the admin item table. It is useful to add a custom action link to the ‘actions’ column.


/**
 * @param $inventory_id
 *
 * @return string
 */
function my_custom_function( $inventory_id ) {
	$admin_url = add_query_args( [ 'page' => 'wpim_manage_inventory', 'action' => 'your_custom_action', 'inventory_id' => $inventory_id ], admin_url( 'admin.php' ) );

	return '<a href="' . $admin_url . '">Some Action</a>';
}

add_action( 'wpim_admin_action_links', 'my_custom_function' );