PluginProbe ʕ •ᴥ•ʔ
Backup Migration / 2.1.7
Backup Migration v2.1.7
2.1.7 2.1.6 2.1.5.2 trunk 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.3.7 1.3.8 1.3.9 1.4.0 1.4.1 1.4.2 1.4.3 1.4.4 1.4.5 1.4.6 1.4.6.1 1.4.7 1.4.8 1.4.9 1.4.9.1 2.0.0 2.1.0 2.1.1 2.1.2 2.1.3 2.1.4 2.1.5 2.1.5.1
backup-backup / includes / dashboard / modules / plugins-auto-update-notice.php
backup-backup / includes / dashboard / modules Last commit date
backup-ongoing.php 3 weeks ago backup_controller.php 3 weeks ago backups-table-header.php 3 weeks ago backups-under-table.php 3 weeks ago before-update-backup-errors.php 3 weeks ago cloud-backup-notice.php 3 weeks ago email-errors.php 3 weeks ago ping-server-is-not-working-notice.php 3 weeks ago plugins-auto-update-notice.php 3 weeks ago quota-errors.php 3 weeks ago security-plugins-warning.php 3 weeks ago site-is-local-notice.php 3 weeks ago stream-backup-notice.php 3 weeks ago super-quick-migration.php 3 weeks ago support-chat.php 3 weeks ago upload-backup.php 3 weeks ago
plugins-auto-update-notice.php
94 lines
1 <?php
2 // Exit on direct access
3 if (!defined('ABSPATH')) exit;
4
5 use BMI\Plugin\Dashboard as Dashboard;
6 use BMI\Plugin\BMI_Logger as Logger;
7 use BMI\Plugin\Backup_Migration_Plugin as BMP;
8
9 // Determine plugin versions and status
10 $has_premium = defined('BMI_BACKUP_PRO') && BMI_BACKUP_PRO;
11 $free_version = defined('BMI_VERSION') ? BMI_VERSION : null;
12 $premium_version = defined('BMI_PRO_VERSION') ? BMI_PRO_VERSION : null;
13
14 $notices = [];
15
16 // Get plugin file paths
17 $free_plugin_file = 'backup-backup/backup-backup.php'; // Adjust to actual plugin file
18 $premium_plugin_file = 'backup-backup-pro/backup-backup-pro.php'; // Adjust to actual premium plugin file
19
20 if (
21 BMP::isPluginAutoUpdateEnabled($free_plugin_file)
22 &&
23 (
24 !$has_premium
25 || BMP::isPluginAutoUpdateEnabled($premium_plugin_file)
26 )
27 ) return;
28
29 // Check if free version needs auto-update
30 $free_needs_update = BMP::bmiNeedsUpdate();
31 $premium_needs_update = BMP::bmiNeedsUpdate(true);
32
33
34 // Get admin URLs
35 $plugins_page_url = admin_url('plugins.php');
36
37 if ($has_premium && ($free_needs_update || $premium_needs_update)) {
38 // Both free and premium versions, at least one needs update
39 $notices[] = sprintf(
40 __('%sWarning:%s plugin version discrepancy detected. Keeping free and premium plugin auto-updated ensures the quality of our service, provides new features, and enforces security. Please enable auto-updates %shere%s.%s%sNote:%s You can safely ignore and dismiss this notice if you have already updated both plugins.', 'backup-backup'),
41 '<strong>', '</strong>',
42 '<a class="hoverable secondary" href="' . esc_url($plugins_page_url) . '">','</a>',
43 "<br>",
44 '<strong>', '</strong>'
45 );
46 } elseif (!$has_premium && $free_needs_update) {
47 // Only free version, needs update
48 // Try to get the enable auto-update link
49 $auto_update_url = wp_nonce_url(
50 add_query_arg(
51 [
52 'action' => 'toggle-auto-update',
53 'plugin' => $free_plugin_file,
54 'paged' => 1,
55 ],
56 admin_url('plugins.php')
57 ),
58 'updates'
59 );
60
61 $notices[] = sprintf(
62 __('Keeping the plugin auto-updated ensures the quality of our service, provides new features and enforces security. Please enable auto-updates %shere%s.', 'backup-backup'),
63 '<a href="' . esc_url($auto_update_url) . '">',
64 '</a>'
65 );
66 }
67
68 if (empty($notices)) {
69 return; // No issues to display
70 }
71 ?>
72
73 <div class="error-noticer" id="backupbliss-issues">
74 <div class="error-header">
75 <div class="cf">
76 <div class="left">
77 <?php esc_html_e('We have some issue(s) regarding BackupBliss.', 'backup-backup'); ?>
78 </div>
79 <div class="right hoverable">
80 <span class="bmi-error-toggle" data-expand="<?php esc_attr_e('Expand', 'backup-backup'); ?>" data-collapse="<?php esc_attr_e('Collapse', 'backup-backup'); ?>">
81 <?php esc_html_e('Expand', 'backup-backup'); ?>
82 </span> |
83 <span class="bmi-error-dismiss" issue-type="backupbliss" onclick="document.getElementById('backupbliss-issues').remove()">
84 <?php esc_html_e('Dismiss', 'backup-backup'); ?>
85 </span>
86 </div>
87 </div>
88 </div>
89 <div class="error-body">
90 <?php
91 echo wp_kses_post(implode("<br /><br />", $notices));
92 ?>
93 </div>
94 </div>