\ActionScheduler_WPCommentCleaner

Class ActionScheduler_WPCommentCleaner

Summary

Methods
Properties
Constants
init()
has_logs()
maybe_schedule_cleanup()
delete_all_action_comments()
register_admin_notice()
print_admin_notice()
No public properties found
No constants found
No protected methods found
$cleanup_hook
$wp_comment_logger
$has_logs_option_key
N/A
No private methods found
No private properties found
N/A

Properties

$cleanup_hook

$cleanup_hook : string

Post migration hook used to cleanup the WP comment table.

Type

normal

$wp_comment_logger

$wp_comment_logger : \ActionScheduler_wpCommentLogger

An instance of the ActionScheduler_wpCommentLogger class to interact with the comments table.

This instance should only be used as an interface. It should not be initialized.

Type

normal

$has_logs_option_key

$has_logs_option_key : string

The key used to store the cached value of whether there are logs in the WP comment table.

Type

normal

Methods

init()

init() : mixed

Initialize the class and attach callbacks.

Returns

mixed

has_logs()

has_logs() : bool

Determines if there are log entries in the wp comments table.

Uses the flag set on migration completion set by @see self::maybe_schedule_cleanup().

Returns

bool —

Whether there are scheduled action comments in the comments table.

maybe_schedule_cleanup()

maybe_schedule_cleanup() : mixed

Schedules the WP Post comment table cleanup to run in 6 months if it's not already scheduled.

Attached to the migration complete hook 'action_scheduler/migration_complete'.

Returns

mixed

delete_all_action_comments()

delete_all_action_comments() : mixed

Delete all action comments from the WP Comments table.

Returns

mixed

register_admin_notice()

register_admin_notice() : mixed

Registers admin notices about the orphaned action logs.

Returns

mixed

print_admin_notice()

print_admin_notice() : mixed

Prints details about the orphaned action logs and includes information on where to learn more.

Returns

mixed