BuddyDev

Search

mpp_get_log( $args )

Get logs information.

Description

This function fetches one or more log records.

Parameters

$args

  • user_id (int) (Optional) the user for which we are creating this log
  • item_id (int) (Optional) gallery or media id to which we associate this action
  • action (string) (Optional) action identifier ( e.g. ”view”, “like” etc)
  • value ( int|string) ( Optional ) any specific value you want to look for ( e.g. view count or like count or rating value etc )
  • per_page ( int) (Optional) How many per page
  • page (int) (Optional ) Specify the page number for paged results

Returns

null|array Null if no record found otherwise an array of record objects.

 Examples

The code shows how we log when a user views the Media( It is not part of core )

 

 Changelog

  • Since 1.0.0

Source

medisapress/core/logger/functions.php