Skip to content

Commit

Permalink
Updated revision threshold to 100
Browse files Browse the repository at this point in the history
  • Loading branch information
supersoju committed Apr 8, 2024
1 parent 08289a4 commit 2473fab
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions core/A2_Optimized_Optimizations.php
Original file line number Diff line number Diff line change
Expand Up @@ -852,7 +852,7 @@ public function get_best_practices() {
],
'post_revisions' => [
'title' => 'Post Revisions',
'description' => 'The number of post revisions should be less than than 10 for most sites. This could slow down page loads.',
'description' => 'The number of post revisions should be less than than 100 for most sites. This could slow down page loads.',
'status' => $this->is_active('post_revisions', false),
],
'show_on_front' => [
Expand Down Expand Up @@ -1291,11 +1291,11 @@ public function is_active($optimization, $value_only = true) {
case 'post_revisions':
if (defined('WP_POST_REVISIONS') && WP_POST_REVISIONS == true) {
// post revisions are active
if (is_numeric(WP_POST_REVISIONS) && WP_POST_REVISIONS <= 10) {
$result['current'] = 'Post revisions are enabled, but less than 10.';
if (is_numeric(WP_POST_REVISIONS) && WP_POST_REVISIONS <= 100) {
$result['current'] = 'Post revisions are enabled, but less than 100.';
$result['value'] = true;
} else {
$result['current'] = 'Post revisions are enabled with a limit higher than 10.';
$result['current'] = 'Post revisions are enabled with a limit higher than 100.';
$result['value'] = false;
}
} else {
Expand Down

0 comments on commit 2473fab

Please sign in to comment.