BuddyPress::notifications_for_user( string $action, int $item_id, int $secondary_item_id, int $total_items, string $format = 'string', string $component_action_name = '', string $component_name = '', int $id = '' )

Description #

Format custom notification of AnsPress.

Parameters #

  • $action
    string (Required) Component action.
  • $item_id
    int (Required) Notification item ID.
  • $secondary_item_id
    int (Required) Notification secondary item ID.
  • $total_items
    int (Required) Number of notifications with the same action.
  • $format
    string (Optional) Format of return. Either 'string' or 'object'. Default value: 'string'
  • $component_action_name
    string (Optional) Canonical notification action. Default value: ''
  • $component_name
    string (Optional) Notification component ID. Default value: ''
  • $id
    int (Optional) Notification ID. Default value: ''

Changelog #

VersionDescription
4.1.8Introduced.

Source #

File: addons/buddypress/buddypress.php

	public function notifications_for_user( $action, $item_id, $secondary_item_id, $total_items, $format = 'string', $component_action_name = '', $component_name = '', $id = '' ) {
		if ( method_exists( $this, 'notification_' . $component_action_name ) ) {
			$method = 'notification_' . $action;
			return $this->$method( $item_id, $secondary_item_id, $total_items, $format, $id );
		}
	}

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Add your comment