Clanbite Notifications

apply_filters( 'clanbite_notification_poll_blocking_wait', bool $blocking, int $user_id )

Filters whether /notifications/poll may sleep in a loop until it times out or new items arrive (long-polling).

Filter PHP

Parameters

$blocking (bool)

Defaults to the Notifications setting poll_long_polling.

$user_id (int)

Polling user ID.

Example

add_filter( 'clanbite_notification_poll_blocking_wait', function ( $blocking, $user_id ) {
	// Change $blocking here.
	return $blocking;
}, 10, 2 );

Defined in inc/extensions/notifications/class-notification-rest-controller.php

Changelog

VersionDescription
1.3.0Updated.