Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set option value to no rather than deleting #1086

Merged
merged 25 commits into from
Jan 8, 2025
Merged
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
94513b1
set option value to `no` rather than deleting
crstauf Aug 13, 2024
cea5456
Merge branch 'master' into fix-forum-17945942
crstauf Aug 15, 2024
79db628
Merge branch 'trunk' into fix-forum-17945942
crstauf Aug 21, 2024
897f085
Merge branch 'trunk' into fix-forum-17945942
crstauf Aug 26, 2024
37a0dbe
Merge branch 'trunk' into fix-forum-17945942
crstauf Sep 5, 2024
767f9a3
save
crstauf Sep 6, 2024
dee6b06
save
crstauf Sep 6, 2024
94bf295
Merge branch 'trunk' into fix-forum-17945942
crstauf Sep 14, 2024
e512888
Merge branch 'trunk' into fix-forum-17945942
crstauf Sep 18, 2024
b9c1756
Merge branch 'trunk' into fix-forum-17945942
crstauf Oct 3, 2024
2550c26
Merge branch 'trunk' into fix-forum-17945942
crstauf Oct 23, 2024
8c7107e
Merge branch 'trunk' into fix-forum-17945942
crstauf Oct 23, 2024
e715c80
Merge branch 'trunk' into fix-forum-17945942
crstauf Oct 23, 2024
716cf60
Merge branch 'trunk' into fix-forum-17945942
crstauf Oct 25, 2024
3222b69
Merge branch 'trunk' into fix-forum-17945942
crstauf Oct 29, 2024
804f66c
Merge branch 'trunk' into fix-forum-17945942
crstauf Oct 30, 2024
5a6f76f
Merge branch 'trunk' into fix-forum-17945942
crstauf Oct 30, 2024
4771986
Merge branch 'trunk' into fix-forum-17945942
crstauf Oct 30, 2024
f84d780
Merge branch 'trunk' into fix-forum-17945942
crstauf Oct 31, 2024
01cec04
Merge branch 'trunk' into fix-forum-17945942
crstauf Nov 1, 2024
157bb5d
Merge branch 'trunk' into fix-forum-17945942
crstauf Nov 2, 2024
0848e8e
Merge branch 'trunk' into fix-forum-17945942
crstauf Nov 15, 2024
c51b749
Merge branch 'trunk' into fix-forum-17945942
crstauf Dec 2, 2024
eb438cb
Merge branch 'trunk' into fix-forum-17945942
crstauf Dec 9, 2024
6aaeacc
Merge branch 'trunk' into fix-forum-17945942
crstauf Dec 10, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions classes/ActionScheduler_WPCommentCleaner.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,19 +66,23 @@ public static function has_logs() {
* Attached to the migration complete hook 'action_scheduler/migration_complete'.
*/
public static function maybe_schedule_cleanup() {
$has_logs = 'no';

$args = array(
'type' => ActionScheduler_wpCommentLogger::TYPE,
'number' => 1,
'fields' => 'ids',
);

if ( (bool) get_comments( $args ) ) {
update_option( self::$has_logs_option_key, 'yes' );
$has_logs = 'yes';

if ( ! as_next_scheduled_action( self::$cleanup_hook ) ) {
as_schedule_single_action( gmdate( 'U' ) + ( 6 * MONTH_IN_SECONDS ), self::$cleanup_hook );
}
}

update_option( self::$has_logs_option_key, $has_logs, true );
}

/**
Expand All @@ -95,7 +99,7 @@ public static function delete_all_action_comments() {
)
);

delete_option( self::$has_logs_option_key );
update_option( self::$has_logs_option_key, 'no', true );
}

/**
Expand Down
Loading