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 (Required) Canonical notification action.
  • $component_name
    string (Required) Notification component ID.
  • $id
    int (Required) Notification ID.

Changelog #


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. Required fields are marked *

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

Add your comment