Notifications
Notifications class.
Listens for the acc_comments_processed and acc_revisions_processed actions fired by Comments::process_comments() and Revisions::process_revisions(), accumulates the counts, then sends a summary email at the end of the cron run (priority 20 on acc_cron_hook, after the default priority-10 processors).
Namespace: WebberZone\AutoClose\Features
Since: 3.1.0
Source: includes/features/class-notifications.php line 27
Methods
__construct()
Constructor.
Since: 3.1.0
Line: 58
public function __construct( );
collect_comments()
Collect comment/ping close counts.
Since: 3.1.0
Line: 72
public function collect_comments( int $comments, int $pings ): void;
| Type | Name | Description |
|---|---|---|
int | $comments | Number of posts whose comments were closed. |
int | $pings | Number of posts whose pings were closed. |
Returns: void
collect_revisions()
Collect revision delete count.
Since: 3.1.0
Line: 84
public function collect_revisions( int $deleted ): void;
| Type | Name | Description |
|---|---|---|
int | $deleted | Number of revisions deleted. |
Returns: void
maybe_send_email()
Send a summary email if the option is enabled.
Runs at priority 20 on acc_cron_hook, after the comments (priority 10) and revisions (priority 10) processors have completed.
Since: 3.1.0
Line: 96
public function maybe_send_email( ): void;
Returns: void