$item ) { if ( ! is_array( $item ) || ! isset( $item[2] ) || 'uxpack' !== $item[2] ) { continue; } $menu[ $index ][0] = $title; break; } } /** * Max backups shown in the dashboard widget. */ const DASHBOARD_RECENT_BACKUPS = 5; /** * Max error entries shown in the dashboard widget. */ const DASHBOARD_RECENT_ERRORS = 5; /** * Register dashboard widget for quick backup overview and trigger. */ public function register_dashboard_widget() { if ( ! UXPack_Capabilities::current_user_can( 'view_backups' ) ) { return; } wp_add_dashboard_widget( 'uxpack_dashboard_backup', __( 'UXPack', 'uxpack-basic' ), array( $this, 'render_dashboard_widget' ) ); } /** * Render dashboard widget content. */ public function render_dashboard_widget() { if ( ! UXPack_Capabilities::current_user_can( 'view_backups' ) ) { return; } $backups_url = admin_url( 'admin.php?page=uxpack' ); $log_url = admin_url( 'admin.php?page=uxpack-log' ); $backups = UXPack_Backup::get_backups(); $recent = array_slice( $backups, 0, UXPack_License::is_basic() ? UXPack_License::BASIC_DASHBOARD_BACKUPS : self::DASHBOARD_RECENT_BACKUPS ); $recent_errors = self::get_recent_log_errors( self::DASHBOARD_RECENT_ERRORS ); $log_enabled = (int) get_option( 'uxpack_enable_log', 1 ) === 1; $can_run = UXPack_Capabilities::current_user_can( 'run_backups' ); $health_warnings = class_exists( 'UXPack_Health', false ) ? UXPack_Health::get_warnings() : array(); ?>
0 ) { $errors = array_slice( $errors, 0, $limit ); } return $errors; } /** * Enqueue admin scripts and styles. * * @param string $hook */ public function enqueue_scripts( $hook ) { $is_uxpack_page = strpos( $hook, 'uxpack' ) !== false; $is_dashboard = 'index.php' === $hook; if ( ! $is_uxpack_page && ! $is_dashboard ) { return; } // Dashboard widget needs styles for the tier badge; UXPack pages need full admin assets. if ( $is_dashboard ) { if ( ! UXPack_Capabilities::current_user_can( 'view_backups' ) && ! UXPack_Capabilities::current_user_can( 'access' ) ) { return; } } elseif ( ! UXPack_Capabilities::current_user_can( 'access' ) ) { return; } wp_enqueue_style( 'dashicons' ); $admin_css = UXPACK_PLUGIN_DIR . 'assets/admin.css'; $admin_css_ver = UXPACK_VERSION; if ( is_readable( $admin_css ) ) { $admin_css_mtime = filemtime( $admin_css ); if ( false !== $admin_css_mtime ) { $admin_css_ver = UXPACK_VERSION . '.' . (string) $admin_css_mtime; } } wp_enqueue_style( 'uxpack-admin', UXPACK_PLUGIN_URL . 'assets/admin.css', array( 'dashicons' ), $admin_css_ver ); if ( class_exists( 'UXPack_Pro_Mocks', false ) ) { UXPack_Pro_Mocks::enqueue( $hook ); } // Dashboard only needs the badge styles; skip the heavy admin.js there. if ( $is_dashboard && ! $is_uxpack_page ) { return; } $admin_js = UXPACK_PLUGIN_DIR . 'assets/admin.js'; $admin_js_ver = UXPACK_VERSION; if ( is_readable( $admin_js ) ) { $admin_js_mtime = filemtime( $admin_js ); if ( false !== $admin_js_mtime ) { $admin_js_ver = UXPACK_VERSION . '.' . (string) $admin_js_mtime; } } wp_enqueue_script( 'uxpack-admin', UXPACK_PLUGIN_URL . 'assets/admin.js', array( 'jquery' ), $admin_js_ver, true ); $backup_timeout_ms = (int) apply_filters( 'uxpack_backup_ajax_timeout_ms', 3600000 ); // 60 minutes default if ( $backup_timeout_ms < 60000 ) { $backup_timeout_ms = 60000; // minimum 1 minute } $has_encryption = class_exists( 'UXPack_Encryption', false ); wp_localize_script( 'uxpack-admin', 'uxpackData', array( 'ajaxUrl' => admin_url( 'admin-ajax.php' ), 'nonce' => wp_create_nonce( 'uxpack_backup' ), 'backupTimeout' => $backup_timeout_ms, 'pollInterval' => 3000, 'encryptEnabled' => $has_encryption && UXPack_Encryption::is_encryption_enabled(), 'encryptionMode' => $has_encryption ? UXPack_Encryption::get_encryption_mode() : 'off', 'sitePasswordReady' => $has_encryption && 'ok' === UXPack_Encryption::get_site_password_indicator_state(), 'minPasswordLength' => $has_encryption ? UXPack_Encryption::MIN_PASSWORD_LENGTH : 12, 'currentTablePrefix' => isset( $GLOBALS['wpdb']->prefix ) ? (string) $GLOBALS['wpdb']->prefix : '', 'canRunBackups' => UXPack_Capabilities::current_user_can( 'run_backups' ), 'isMultisite' => is_multisite(), 'licenseTier' => UXPack_License::get_tier(), 'isPro' => UXPack_License::is_pro(), 'directoryEdition' => UXPack_License::is_directory_edition(), 'licenseFeatures' => UXPack_License::get_feature_flags_for_js(), 'settingsProOnlyTabs' => self::get_settings_pro_only_tabs(), 'settingsUrl' => UXPack_License::get_settings_url(), 'restorePage' => ( 'uxpack_page_uxpack-restore' === $hook ), 'backupsPage' => ( 'toplevel_page_uxpack' === $hook ), 'logPage' => ( 'uxpack_page_uxpack-log' === $hook ), 'i18n' => array( 'confirmDelete' => __( 'Are you sure you want to delete this backup?', 'uxpack-basic' ), 'confirmBulkDelete' => __( 'Delete the selected backups? This cannot be undone.', 'uxpack-basic' ), 'cancel' => __( 'Cancel', 'uxpack-basic' ), 'ok' => __( 'OK', 'uxpack-basic' ), 'delete' => __( 'Delete', 'uxpack-basic' ), 'deleting' => __( 'Deleting...', 'uxpack-basic' ), 'deletingSelected' => __( 'Deleting selected...', 'uxpack-basic' ), 'deleteSelected' => __( 'Delete selected', 'uxpack-basic' ), 'downloading' => __( 'Downloading…', 'uxpack-basic' ), 'chainPackageDownload' => __( 'Download chain package', 'uxpack-basic' ), 'chainPackagePreparing' => __( 'Preparing chain package…', 'uxpack-basic' ), 'downloadComplete' => __( 'Download complete.', 'uxpack-basic' ), 'downloadFailed' => __( 'Download failed.', 'uxpack-basic' ), 'emptyState' => __( 'No backups yet. Create your first backup above.', 'uxpack-basic' ), 'backupRunning' => __( 'Backup in progress...', 'uxpack-basic' ), 'backupPreparing' => __( 'Preparing backup…', 'uxpack-basic' ), 'encryptionRunning' => __( 'Encryption in progress...', 'uxpack-basic' ), 'backupKeepPageOpen' => __( 'Keep this page open until the backup finishes. Leaving pauses the backup; return within about 15 minutes to continue.', 'uxpack-basic' ), 'backupCancelling' => __( 'Cancelling backup...', 'uxpack-basic' ), 'backupCancelled' => __( 'Backup cancelled.', 'uxpack-basic' ), 'cancelBackup' => __( 'Cancel backup', 'uxpack-basic' ), 'confirmCancelBackup' => __( 'Cancel this backup? Partial archive files will be removed. The backup may continue briefly while the current step finishes.', 'uxpack-basic' ), 'forceClearBackup' => __( 'Force stop', 'uxpack-basic' ), 'confirmForceClearBackup' => __( 'Clear the stuck backup status and remove partial archive files? Use this when the server was restarted or the backup process is no longer running.', 'uxpack-basic' ), 'success' => __( 'Backup completed successfully.', 'uxpack-basic' ), 'error' => __( 'An error occurred.', 'uxpack-basic' ), 'zipFinalizeFailed' => UXPack_Zip::get_zip_finalize_error_message( '' ), 'requestInterrupted' => __( 'The request was interrupted (e.g. timeout). The backup status could not be confirmed.', 'uxpack-basic' ), 'refreshToCheck' => __( 'Please refresh the page and check the backup list to confirm the result.', 'uxpack-basic' ), 'checkLogHint' => __( 'Open UXPack → Activity Log for details.', 'uxpack-basic' ), 'selectOne' => __( 'Please select at least one backup.', 'uxpack-basic' ), 'confirmClearLog' => __( 'Delete the entire backup log? This cannot be undone.', 'uxpack-basic' ), 'clearLog' => __( 'Clear log', 'uxpack-basic' ), 'logClearing' => __( 'Clearing log…', 'uxpack-basic' ), 'logCleared' => __( 'Backup log cleared.', 'uxpack-basic' ), 'logClearFailed' => __( 'Could not clear the backup log.', 'uxpack-basic' ), 'logEmpty' => __( 'No backup log entries yet.', 'uxpack-basic' ), 'logFilteredEmpty' => __( 'No entries match the current filters.', 'uxpack-basic' ), 'logFiltering' => __( 'Filtering log…', 'uxpack-basic' ), /* translators: 1: number of visible log entries, 2: total log entries */ 'logFilterSummary' => __( 'Showing %1$s of %2$s entries.', 'uxpack-basic' ), 'logFilterBackupAll' => __( 'All backups', 'uxpack-basic' ), 'confirmResetSettings' => __( 'Reset all settings on this page to their default values? This cannot be undone.', 'uxpack-basic' ), 'confirmResetStorage' => __( 'Delete the entire backup storage directory and all backups inside it? This cannot be undone.', 'uxpack-basic' ), 'confirmResetBoth' => __( 'Reset all settings to their default values and delete the entire backup storage directory? This cannot be undone.', 'uxpack-basic' ), 'resetSelectOption' => __( 'Please select at least one reset option.', 'uxpack-basic' ), 'resetSettings' => __( 'Reset', 'uxpack-basic' ), 'resetRunning' => __( 'Resetting…', 'uxpack-basic' ), 'resetFailed' => __( 'Reset could not be completed.', 'uxpack-basic' ), 'confirmImportSettings' => __( 'Import settings from this file? Current settings on this page will be overwritten for every option included in the file.', 'uxpack-basic' ), 'confirmExportIncludeLicense' => __( 'Include the license email and key in this download? Anyone with the file can use those credentials. Continue only if you will store the file securely.', 'uxpack-basic' ), 'downloadSettings' => __( 'Download settings', 'uxpack-basic' ), 'importSettings' => __( 'Import settings', 'uxpack-basic' ), 'settingsImportNoFile' => __( 'Please choose a settings file.', 'uxpack-basic' ), 'settingsImportInvalidFile' => __( 'Please choose a valid UXPack settings JSON file.', 'uxpack-basic' ), /* translators: %s: selected settings filename */ 'settingsImportFileSelected' => __( 'Selected file: %s', 'uxpack-basic' ), 'scheduleTestRun' => __( 'Run diagnostics', 'uxpack-basic' ), 'scheduleTestRunning' => __( 'Running diagnostics…', 'uxpack-basic' ), /* translators: %s: name of the diagnostic check currently running */ 'scheduleTestProgress' => __( 'Checking: %s', 'uxpack-basic' ), 'scheduleTestFailed' => __( 'Diagnostics could not be completed.', 'uxpack-basic' ), /* translators: 1: number of passed checks, 2: number of warnings, 3: number of failed checks */ 'scheduleTestSummary' => __( 'Results: %1$d passed, %2$d warnings, %3$d failed.', 'uxpack-basic' ), 'scheduleTestPass' => __( 'Pass', 'uxpack-basic' ), 'scheduleTestWarning' => __( 'Warning', 'uxpack-basic' ), 'scheduleTestFail' => __( 'Failed', 'uxpack-basic' ), 'scheduleTestStepPhpVersion' => __( 'PHP version', 'uxpack-basic' ), 'scheduleTestStepMemory' => __( 'PHP memory limit', 'uxpack-basic' ), 'scheduleTestStepZipArchive' => __( 'ZipArchive extension', 'uxpack-basic' ), 'scheduleTestStepMysqli' => __( 'mysqli extension', 'uxpack-basic' ), 'scheduleTestStepZipEncrypt' => __( 'ZIP encryption', 'uxpack-basic' ), 'scheduleTestStepAes256' => __( 'AES-256 ZIP encryption', 'uxpack-basic' ), 'scheduleTestStepOpenSsl' => __( 'OpenSSL (encrypted sidecar)', 'uxpack-basic' ), 'scheduleTestStepWpRoot' => __( 'WordPress root readable', 'uxpack-basic' ), 'scheduleTestStepStoragePath' => __( 'Backup storage path', 'uxpack-basic' ), 'scheduleTestStepStorageWrite'=> __( 'Backup storage writable', 'uxpack-basic' ), 'scheduleTestStepDiskFree' => __( 'Free disk space', 'uxpack-basic' ), 'scheduleTestStepBackupIdle' => __( 'No backup in progress', 'uxpack-basic' ), 'scheduleTestStepRestoreIdle' => __( 'No restore in progress', 'uxpack-basic' ), 'scheduleTestStepEnabled' => __( 'Schedule enabled', 'uxpack-basic' ), 'scheduleTestStepTime' => __( 'Site time', 'uxpack-basic' ), 'scheduleTestStepNextRun' => __( 'Next run stored', 'uxpack-basic' ), 'scheduleTestStepDue' => __( 'Backup due now', 'uxpack-basic' ), 'scheduleTestStepBackupRun' => __( 'Backup in progress', 'uxpack-basic' ), 'scheduleTestStepWpCron' => __( 'DISABLE_WP_CRON', 'uxpack-basic' ), 'excludeTreeExpand' => __( 'Expand folder', 'uxpack-basic' ), 'excludeTreeCollapse' => __( 'Collapse folder', 'uxpack-basic' ), 'excludeTreeLoading' => __( 'Loading folders…', 'uxpack-basic' ), 'excludeTreeAlwaysExcluded' => __( 'Always excluded', 'uxpack-basic' ), 'excludeTreePartial' => __( 'Contains exclusions', 'uxpack-basic' ), 'excludeTreeSystemWarning' => __( 'You excluded WordPress system folders (wp-admin, wp-content, or wp-includes). The installer may then not restore a fully working website.', 'uxpack-basic' ), 'excludeTreeEmpty' => __( 'No subfolders.', 'uxpack-basic' ), 'excludeTreeLoadError' => __( 'Could not load folders.', 'uxpack-basic' ), 'scheduleTestStepCronSingle' => __( 'WordPress cron: scheduled backup event', 'uxpack-basic' ), 'scheduleTestStepCronTick' => __( 'WordPress cron: 15-minute tick', 'uxpack-basic' ), 'scheduleTestStepSpawn' => __( 'spawn_cron() available', 'uxpack-basic' ), 'scheduleTestStepTickRun' => __( 'Schedule tick executed', 'uxpack-basic' ), 'scheduleListEmpty' => __( 'No schedules yet. Add one to run backups automatically.', 'uxpack-basic' ), 'scheduleEnabled' => __( 'Enabled', 'uxpack-basic' ), 'scheduleDisabled' => __( 'Disabled', 'uxpack-basic' ), 'scheduleNotScheduled' => __( 'Not scheduled', 'uxpack-basic' ), 'scheduleSuccess' => __( 'Success', 'uxpack-basic' ), 'scheduleSkipped' => __( 'Skipped', 'uxpack-basic' ), 'scheduleError' => __( 'Error', 'uxpack-basic' ), 'scheduleNever' => __( 'Never', 'uxpack-basic' ), 'scheduleEdit' => __( 'Edit', 'uxpack-basic' ), 'scheduleDelete' => __( 'Delete', 'uxpack-basic' ), 'scheduleDeleted' => __( 'Schedule deleted.', 'uxpack-basic' ), 'scheduleAddTitle' => __( 'Add schedule', 'uxpack-basic' ), 'scheduleEditTitle' => __( 'Edit schedule', 'uxpack-basic' ), 'scheduleNewTab' => __( 'New schedule', 'uxpack-basic' ), 'scheduleOverviewTab' => __( 'Overview', 'uxpack-basic' ), /* translators: %s: schedule name */ 'confirmDeleteSchedule' => __( 'Delete schedule “%s”?', 'uxpack-basic' ), 'scheduleColName' => __( 'Name', 'uxpack-basic' ), 'scheduleColStatus' => __( 'Status', 'uxpack-basic' ), 'scheduleColSchedule' => __( 'Schedule', 'uxpack-basic' ), 'scheduleColType' => __( 'Backup type', 'uxpack-basic' ), 'scheduleColNext' => __( 'Next run', 'uxpack-basic' ), 'scheduleColLast' => __( 'Last run', 'uxpack-basic' ), 'scheduleColBackupStatus' => __( 'Backup status', 'uxpack-basic' ), 'scheduleColActions' => __( 'Actions', 'uxpack-basic' ), /* translators: 1: number of used schedule slots, 2: maximum schedule slots */ 'scheduleSlots' => __( '%1$d of %2$d schedule slots', 'uxpack-basic' ), 'backupDetails' => __( 'Backup details', 'uxpack-basic' ), 'backupDetailsClose' => __( 'Close', 'uxpack-basic' ), 'backupLabel' => __( 'Label', 'uxpack-basic' ), 'backupLabelEdit' => __( 'Edit label', 'uxpack-basic' ), 'backupLabelPrompt' => __( 'Enter a label for this backup (optional).', 'uxpack-basic' ), 'backupLabelSave' => __( 'Save label', 'uxpack-basic' ), 'backupLabelSaved' => __( 'Label saved.', 'uxpack-basic' ), 'backupLabelSaveFailed' => __( 'Could not save label.', 'uxpack-basic' ), 'backupLabelPlaceholder' => __( 'Optional label', 'uxpack-basic' ), 'viewDetails' => __( 'View backup details', 'uxpack-basic' ), 'sendTestEmail' => __( 'Send test email', 'uxpack-basic' ), 'sendingTestEmail' => __( 'Sending test email…', 'uxpack-basic' ), 'testEmailSent' => __( 'Test email sent.', 'uxpack-basic' ), 'testEmailFailed' => __( 'Test email could not be sent.', 'uxpack-basic' ), 'remoteConnecting' => __( 'Connecting…', 'uxpack-basic' ), 'remoteConnect' => __( 'Connect', 'uxpack-basic' ), 'remoteConnectFailed' => __( 'Could not start connection.', 'uxpack-basic' ), 'remoteDisconnect' => __( 'Disconnect', 'uxpack-basic' ), 'remoteDisconnectConfirm' => __( 'Disconnect this remote storage account?', 'uxpack-basic' ), 'remoteDisconnecting' => __( 'Disconnecting…', 'uxpack-basic' ), 'remoteDisconnected' => __( 'Disconnected.', 'uxpack-basic' ), 'remoteEnabled' => __( 'Enabled', 'uxpack-basic' ), 'remoteDisabled' => __( 'Disabled', 'uxpack-basic' ), 'remoteConnected' => __( 'Connected', 'uxpack-basic' ), 'remoteNotConnected' => __( 'Not connected', 'uxpack-basic' ), 'remoteTestUpload' => __( 'Upload test backup', 'uxpack-basic' ), 'remoteUploading' => __( 'Uploading…', 'uxpack-basic' ), /* translators: %s: upload percent number (0–100), without a percent sign */ 'remoteUploadingPct' => __( 'Uploading to remote storage… %s%', 'uxpack-basic' ), 'remoteUploadOk' => __( 'Upload completed.', 'uxpack-basic' ), 'remoteUploadFailed' => __( 'Upload failed.', 'uxpack-basic' ), 'remoteUploadTimeout' => __( 'Upload timed out. Try a smaller backup or raise the PHP max_execution_time.', 'uxpack-basic' ), 'destinationsRequired' => __( 'Select at least one destination.', 'uxpack-basic' ), 'destinationsLocal' => __( 'Local storage', 'uxpack-basic' ), 'destinationsChoose' => __( 'Choose destinations', 'uxpack-basic' ), 'manageRemoteStorage' => __( 'Manage remote storage', 'uxpack-basic' ), 'copied' => __( 'Copied', 'uxpack-basic' ), 'copyRedirectUri' => __( 'Copy redirect URI:', 'uxpack-basic' ), 'restore' => __( 'Restore', 'uxpack-basic' ), 'restoreRunning' => __( 'Restore in progress…', 'uxpack-basic' ), 'restoreSuccess' => __( 'Backup restored successfully.', 'uxpack-basic' ), 'restoreFailed' => __( 'Restore failed.', 'uxpack-basic' ), 'restoreModeLabel' => __( 'Restore scope', 'uxpack-basic' ), 'restoreModeFull' => __( 'Files and database', 'uxpack-basic' ), 'restoreModeDb' => __( 'Database only', 'uxpack-basic' ), 'restoreModeFiles' => __( 'Files only', 'uxpack-basic' ), 'restoreFilesSuccess' => __( 'Site files restored successfully.', 'uxpack-basic' ), 'restorePhaseValidating' => __( 'Validating backup…', 'uxpack-basic' ), 'restorePhaseExtracting' => __( 'Extracting files…', 'uxpack-basic' ), 'restorePhaseImporting' => __( 'Importing database…', 'uxpack-basic' ), 'restorePhaseFinalizing' => __( 'Finalizing restore…', 'uxpack-basic' ), 'restoreBackupBefore' => __( 'Create a backup before restore', 'uxpack-basic' ), 'restoreBackupBeforeHint' => __( 'Recommended. Saves the current site before overwriting it.', 'uxpack-basic' ), 'restoreTablePrefix' => __( 'Table prefix', 'uxpack-basic' ), 'restoreTablePrefixHint' => __( 'Optional. Leave blank to use the current prefix from wp-config.php.', 'uxpack-basic' ), 'restoreTablePrefixInvalid' => __( 'The table prefix may only contain letters, numbers, and underscores.', 'uxpack-basic' ), 'restoreBackupBeforeDenied' => __( 'You do not have permission to create backups.', 'uxpack-basic' ), 'restorePreBackupRunning' => __( 'Creating pre-restore backup…', 'uxpack-basic' ), 'restoreUploadTitle' => __( 'Upload backup', 'uxpack-basic' ), 'restoreUploadHint' => __( 'Drag and drop a UXPack ZIP archive here, or choose a file.', 'uxpack-basic' ), 'restoreUploadChoose' => __( 'Choose file', 'uxpack-basic' ), 'restoreUploadRunning' => __( 'Uploading backup…', 'uxpack-basic' ), 'restoreUploadSuccess' => __( 'Backup uploaded.', 'uxpack-basic' ), 'restoreUploadFailed' => __( 'Upload failed.', 'uxpack-basic' ), 'restoreSelectBackup' => __( 'Backup archive', 'uxpack-basic' ), 'restoreSelectBackupHint' => __( 'Choose a backup from storage or upload an external UXPack ZIP.', 'uxpack-basic' ), 'restoreMultisiteWarning' => __( 'Multisite compatibility notice', 'uxpack-basic' ), 'restoreRun' => __( 'Run restore', 'uxpack-basic' ), 'restoreNoBackupSelected' => __( 'Please select or upload a backup first.', 'uxpack-basic' ), 'backupPasswordRequired' => __( 'Please enter a backup password.', 'uxpack-basic' ), 'backupPasswordMismatch' => __( 'Backup passwords do not match.', 'uxpack-basic' ), /* translators: %d: minimum password length */ 'backupPasswordTooShort' => __( 'The backup password must be at least %d characters long.', 'uxpack-basic' ), 'backupPasswordOverrideHint'=> __( 'Optional: enter a one-time password to override the site password for this backup.', 'uxpack-basic' ), 'restorePasswordRequired' => __( 'Please enter the backup password.', 'uxpack-basic' ), 'verify' => __( 'Verify', 'uxpack-basic' ), 'verifyRunning' => __( 'Verifying backup…', 'uxpack-basic' ), 'verifyModalTitle' => __( 'Verify backup', 'uxpack-basic' ), 'verifyModalMessage' => __( 'Checks whether the archive is readable and contains a valid manifest and database dump.', 'uxpack-basic' ), 'verifyModalConfirm' => __( 'Run verification', 'uxpack-basic' ), 'verifyFailed' => __( 'Verification could not be completed.', 'uxpack-basic' ), 'verifyPass' => __( 'Pass', 'uxpack-basic' ), 'verifyWarning' => __( 'Warning', 'uxpack-basic' ), 'verifyFail' => __( 'Failed', 'uxpack-basic' ), 'verifyClose' => __( 'Close', 'uxpack-basic' ), 'showPassword' => __( 'Show password', 'uxpack-basic' ), 'hidePassword' => __( 'Hide password', 'uxpack-basic' ), 'settingsSaving' => __( 'Saving settings…', 'uxpack-basic' ), 'settingsSaved' => __( 'Settings saved.', 'uxpack-basic' ), 'settingsSaveFailed' => __( 'Settings could not be saved.', 'uxpack-basic' ), 'licenseServicePending' => __( 'Checking license service…', 'uxpack-basic' ), 'updateServerPending' => __( 'Checking update server…', 'uxpack-basic' ), 'backupLocked' => __( 'Locked', 'uxpack-basic' ), 'backupUnlocked' => __( 'Unlocked', 'uxpack-basic' ), 'backupLockToggle' => __( 'Lock backup', 'uxpack-basic' ), 'backupUnlockToggle' => __( 'Unlock backup', 'uxpack-basic' ), 'backupLockedDelete' => __( 'This backup is locked and cannot be deleted.', 'uxpack-basic' ), 'backupLockSaved' => __( 'Backup lock updated.', 'uxpack-basic' ), 'backupLockSaveFailed' => __( 'Could not update backup lock.', 'uxpack-basic' ), 'proRequired' => UXPack_License::get_upgrade_message(), ), ) ); $admin_pro_js = UXPACK_PLUGIN_DIR . 'assets/admin-pro.js'; if ( class_exists( 'UXPack_Admin_Pro', false ) && is_readable( $admin_pro_js ) ) { $admin_pro_js_ver = UXPACK_VERSION; $admin_pro_js_mtime = filemtime( $admin_pro_js ); if ( false !== $admin_pro_js_mtime ) { $admin_pro_js_ver = UXPACK_VERSION . '.' . (string) $admin_pro_js_mtime; } wp_enqueue_script( 'uxpack-admin-pro', UXPACK_PLUGIN_URL . 'assets/admin-pro.js', array( 'jquery', 'uxpack-admin' ), $admin_pro_js_ver, true ); } } /** * Render a notice when the current install is not licensed for Pro. * * Also used by directory Basic mock templates (UXPack_Pro_Mocks). * * @return void */ public static function render_license_upgrade_notice() { if ( UXPack_License::is_pro() ) { return; } ?>UXPack Pro. Upgrade to restore in the admin, encrypt backups, use retention and remote storage, and more. %1$sSee all Pro features%2$s.', 'uxpack-basic' ), '', '' ) ); } else { echo wp_kses_post( sprintf( /* translators: 1: opening settings anchor, 2: closing settings anchor, 3: opening buy-license anchor, 4: closing buy-license anchor */ __( 'This page or parts of it require UXPack Pro. %1$sEnter your license key%2$s under Settings → General, or %3$sbuy a license at getuxpack.com%4$s.', 'uxpack-basic' ), '', '', '', '' ) ); } ?>
'uxpack-verify-password', 'class' => 'regular-text', 'autocomplete' => 'current-password', ) ); ?>
' . esc_html__( 'No backup log entries yet.', 'uxpack-basic' ) . '
'; return; } if ( empty( $log_page['entries'] ) ) { if ( self::activity_log_has_active_filters( $filters ) ) { echo '' . esc_html__( 'No entries match the current filters.', 'uxpack-basic' ) . '
'; } return; } ?>
|
|
0 ) : ?>
|
|
|
0 && ( '' !== $last_status || ! empty( $schedule['last_message'] ) ) ) : ?>
|
' . esc_html( UXPack_Schedule::get_current_time_label() ) . '', esc_html( wp_timezone_string() ), esc_html( UXPack_Schedule::get_trigger_mode_label() ) ); ?>
render_page_footer(); ?>