Skip to content

Commit

Permalink
Merge pull request #139 from a2hosting/a2opt-738
Browse files Browse the repository at this point in the history
Updated revision threshold to 100
  • Loading branch information
supersoju authored Apr 9, 2024
2 parents 08289a4 + 2473fab commit e74e0ce
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 e74e0ce

Please sign in to comment.