PluginProbe
Forumax – AI Powered Advanced Community Forum Plugin / 2.5.0
Forumax – AI Powered Advanced Community Forum Plugin v2.5.0
2.5.1 2.5.0 2.4.4 2.4.3 2.4.2 2.4.1 2.4.0 trunk 1.0.8 1.1.0 1.2.1 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 1.3.0 1.3.1 1.3.2 1.3.3 1.4.0 1.4.1 All 31 releases
← All changes | includes/features/forumax_auto_close.php +2 -9 trunk → 2.5.0 View file →
@@ -43,22 +43,15 @@
43 43 if ( $days < 1 ) {
44 44 return;
45 45 }
46 46
47 - // _bbp_last_active_time is stored in site-local time.
48 - $cutoff = wp_date( 'Y-m-d H:i:s', time() - ( $days * DAY_IN_SECONDS ) );
47 + $cutoff = date( 'Y-m-d H:i:s', strtotime( "-{$days} days" ) );
49 48
50 - // Stickies are skipped below; exclude them up front so they can't fill
51 - // every batch and stop the rest from ever being closed.
52 - $stickies = array_map( 'intval', array_merge( (array) bbp_get_super_stickies(), forumax_get_all_forum_stickies() ) );
53 -
54 49 // Get open topics with no recent replies
55 50 $args = [
56 51 'post_type' => 'topic',
57 52 'post_status' => 'publish',
58 - 'posts_per_page' => 100, // Batch to avoid timeouts
59 - 'post__not_in' => $stickies,
60 - 'no_found_rows' => true,
53 + 'posts_per_page' => 50, // Batch to avoid timeouts
61 54 'meta_query' => [
62 55 [
63 56 'key' => '_bbp_last_active_time',
64 57 'value' => $cutoff,