Close_Date
Class Close_Date
Handles scheduling and closing logic for comments/trackbacks based on meta. No admin UI/metabox logic here.
Namespace: WebberZone\AutoClose\Features
Since: 3.0.0
Source: includes/features/class-close-date.php line 23
Methods
__construct()
Constructor.
Line: 35
public function __construct( );
maybe_schedule_or_close()
Schedules cron if date/time is in the future, closes immediately if past, and clears any existing scheduled event before (re-)scheduling.
Line: 44
public function maybe_schedule_or_close( $post_id ): void;
| Type | Name | Description |
|---|---|---|
int | $post_id | Post ID. |
Returns: void
maybe_close_due_comments_pings()
Cron callback to close comments/pings if due.
Line: 71
public function maybe_close_due_comments_pings( $post_id, $type = ... ): void;
| Type | Name | Description |
|---|---|---|
int | $post_id | Post ID. |
string | $type | Event type (‘comments’ or ‘pings’). Unused; both are re-evaluated. |
Returns: void