array( 'database' => true, 'uploads' => true, 'themes' => true, 'plugins' => true, 'muplugins' => true, 'other' => true, ), // Extra path fragments to exclude (matched against the wp-content-relative path). 'excludes' => array(), // P5: shrink the database dump. Revisions/transients/spam are pure bloat in a // backup; db_exclude_tables holds full table names to skip entirely. 'db_exclude_revisions' => false, 'db_exclude_transients' => false, 'db_exclude_spam' => false, 'db_exclude_tables' => array(), // P4: take a full backup immediately BEFORE a core/plugin/theme update (Pro). 'backup_before_update' => false, // Skip files larger than this many MB (0 = no cap). 'max_file_mb' => 0, // G2: split the archive into volumes of this many MB (0 = single file). 'max_part_mb' => 0, // J3: take a DB recovery point before each restore, and how many to keep. 'recovery_point' => true, 'recovery_keep' => 3, // Also snapshot files in the recovery point (enables full file rollback). 'recovery_files' => false, // G1: incremental (differential) backups + start a new full every N runs. 'incremental' => false, 'incremental_full_every' => 6, // Automatic backups (Pro). 'schedule' => array( 'frequency' => 'off', // off | daily | weekly 'retention' => 5, // keep the newest N backups 'retention_days' => 0, // also delete backups older than N days (0 = off) ), // Password for unattended (scheduled) encryption ('' = no encryption). 'password' => '', // Active off-site destination key (Pro): '' | google | microsoft | dropbox | s3 | ftp. 'destination' => '', 'destination2' => '', // Secondary off-site destination. 'destination_mode' => 'failover', // 'failover' (primary, then secondary) | 'both'. // Credential-based destination config (S3 / FTP). OAuth tokens live in aisiteark_backup_tokens. 'destinations' => array(), 'license' => array( 'key' => '', 'status' => 'inactive', ), 'uninstall_remove_data' => false, ); } /** * Get the full settings array (stored merged over defaults). * * @return array */ public static function get() { $stored = get_option( self::OPTION, array() ); if ( ! is_array( $stored ) ) { $stored = array(); } return wp_parse_args( $stored, self::defaults() ); } /** * Persist the full settings array. * * @param array $settings Settings to store. * @return void */ public static function save( array $settings ) { update_option( self::OPTION, $settings ); } /** * The cached license record. * * @return array */ public static function license() { $s = self::get(); return isset( $s['license'] ) && is_array( $s['license'] ) ? $s['license'] : array(); } }