| @@ -28,10 +28,11 @@ | ||
| 28 | 28 | public function ui_metadata(): array { |
| 29 | 29 | return array( |
| 30 | 30 | 'label' => __( 'Database', 'xspeed' ), |
| 31 | 31 | 'icon' => 'Trash2', |
| 32 | - 'description' => __( 'Scan + clean WordPress bloat (revisions, spam, transients, orphan meta) and optimize tables.', 'xspeed' ), | |
| 32 | + 'description' => __( 'Remove old revisions, spam and other leftovers, and optimize database tables.', 'xspeed' ), | |
| 33 | 33 | 'custom_panel' => 'DatabaseCleanerPanel', |
| 34 | + 'group' => 'tools', | |
| 34 | 35 | ); |
| 35 | 36 | } |
| 36 | 37 | |
| 37 | 38 | public function settings_schema(): array { |
| @@ -45,22 +46,29 @@ | ||
| 45 | 46 | 'hourly' => 'Hourly', |
| 46 | 47 | 'daily' => 'Daily', |
| 47 | 48 | 'weekly' => 'Weekly', |
| 48 | 49 | ), |
| 49 | - 'label' => __( 'Auto-Cleanup Schedule', 'xspeed' ), | |
| 50 | - 'description' => __( 'How often to run cleanup automatically. Manual means cleanup only runs when you press the button.', 'xspeed' ), | |
| 50 | + 'label' => __( 'Automatic cleanup', 'xspeed' ), | |
| 51 | + 'description' => __( 'How often xSpeed cleans the database on its own. Manual means it only cleans when you press the button.', 'xspeed' ), | |
| 51 | 52 | ), |
| 52 | 53 | 'included_types' => array( |
| 53 | 54 | 'type' => 'list', |
| 54 | 55 | 'default' => array(), |
| 55 | 56 | 'item_type' => 'string', |
| 56 | - 'label' => __( 'Auto-Cleanup Types', 'xspeed' ), | |
| 57 | - 'description' => __( 'Which cleanup categories run on the schedule above. Leave empty to keep auto-cleanup disabled even if a schedule is set.', 'xspeed' ), | |
| 57 | + 'label' => __( 'What to clean automatically', 'xspeed' ), | |
| 58 | + 'description' => __( 'The items the scheduled cleanup removes. If you leave this empty, nothing is cleaned, even with a schedule set.', 'xspeed' ), | |
| 59 | + 'dependsOn' => array( | |
| 60 | + 'any' => array( | |
| 61 | + array( 'field' => 'schedule', 'value' => 'hourly' ), | |
| 62 | + array( 'field' => 'schedule', 'value' => 'daily' ), | |
| 63 | + array( 'field' => 'schedule', 'value' => 'weekly' ), | |
| 64 | + ), | |
| 65 | + ), | |
| 58 | 66 | ), |
| 59 | 67 | 'limit_revisions' => array( |
| 60 | 68 | 'type' => 'bool', |
| 61 | 69 | 'default' => false, |
| 62 | - 'label' => __( 'Limit Post Revisions', 'xspeed' ), | |
| 70 | + 'label' => __( 'Limit post revisions', 'xspeed' ), | |
| 63 | 71 | 'description' => __( 'Cap how many revisions WordPress keeps for each post. Cleanup removes revisions that already exist; this stops them piling up again.', 'xspeed' ), |
| 64 | 72 | ), |
| 65 | 73 | 'revisions_to_keep' => array( |
| 66 | 74 | 'type' => 'int', |
| @@ -66,10 +74,11 @@ | ||
| 66 | 74 | 'type' => 'int', |
| 67 | 75 | 'default' => 5, |
| 68 | 76 | 'min' => 0, |
| 69 | 77 | 'max' => 500, |
| 70 | - 'label' => __( 'Revisions to Keep', 'xspeed' ), | |
| 71 | - 'description' => __( 'Used when Limit Post Revisions is on. 0 turns revisions off completely. Older revisions are trimmed the next time each post is saved; to remove the backlog now, clean Post Revisions above.', 'xspeed' ), | |
| 78 | + 'label' => __( 'Revisions to keep', 'xspeed' ), | |
| 79 | + 'description' => __( '0 turns revisions off completely. Older revisions are trimmed the next time each post is saved; to remove the backlog now, clean Post Revisions above.', 'xspeed' ), | |
| 80 | + 'dependsOn' => array( 'field' => 'limit_revisions' ), | |
| 72 | 81 | ), |
| 73 | 82 | ); |
| 74 | 83 | } |
| 75 | 84 | |