BuddyDev

Search

mpp_log_exists( $args )

Check if log exists for given set of info.

Description

This function checks if a log entry exists for the given set of data and returns the database record as the object.

Parameters

$args

  • user_id (int) (Required) the user for which we are creating this log
  • item_id (int) (Required) gallery or media id to which we associate this action
  • action (string) (required, max 16 characters) Unique name to identify action ( e.g. ”view”, “like” etc)
  • value ( int|string) ( optional ) any value you want to associate with this action log ( e.g. view count or like count or rating value etc )

 Returns:-

(null|object) Null if record does not exist otherwise the record as an object.

Examples

Getting log

 

 Changelog

  • Since 1.0.0

Source

medisapress/core/logger/functions.php