mycred_add_new_notice

Codex / / Functions / mycred_add_new_notice

Navigation:

  1. Description
  2. Usage
  3. Parameters
  4. Return

Description

This function allows you to add a new notification for a specific user. Notifications are shown when the user logs in (if the notice is generated when they are not online) or on the next page reload (if they are logged in).

Usage

$notice = array(
	'user_id' => 1,
	'message' => 'You have received 10 points!'
);

mycred_add_new_notice( $notice );

Parameters

  • notice (array)
    An associative array containing the users ID and the message to show.
  • lifespan (int)
    Option to set the number of days the message is saved. Defaults to 1.

Return

Void

Last edited October 19, 2015