PluginProbe ʕ •ᴥ•ʔ
Easy Updates Manager / 9.0.7
Easy Updates Manager v9.0.7
trunk 2.0.0 2.1.0 2.2.0 2.2.1 2.3.0 2.4.0 2.5.0 2.5.1 2.6.0 2.7.0 3.0.0 3.1.0 3.2.0 3.3.0 3.4.0 3.5.0 3.6.0 4.0 4.0.2 4.0.3 4.1.0 4.1.10 4.1.12 4.2.21 4.2.24 4.3.0 4.3.10 4.3.12 4.3.13 4.6.0 4.7.0 5.0.0 5.1.0 5.1.1 5.2.0 5.3.0 5.3.1 5.3.2 5.4.0 5.4.1 5.4.2 5.4.3 5.4.5 6.0.0 6.0.1 6.0.3 6.0.5 6.1.0 6.1.1 6.1.3 6.1.5 6.1.8 6.2.0 6.2.11 6.2.2 6.2.3 6.2.5 6.2.7 6.2.9 6.3.0 6.3.1 6.3.3 6.4.0 6.4.4 6.4.6 6.4.7 6.4.8 7.0.0 7.0.1 7.0.2 7.0.3 8.0.1 8.0.2 8.0.3 8.0.5 8.1.0 8.1.1 8.2.0 9.0.0 9.0.1 9.0.10 9.0.11 9.0.12 9.0.13 9.0.14 9.0.15 9.0.16 9.0.17 9.0.18 9.0.19 9.0.20 9.0.21 9.0.3 9.0.5 9.0.6 9.0.7 9.0.8 9.0.9
stops-core-theme-and-plugin-updates / templates / force-updates.php
stops-core-theme-and-plugin-updates / templates Last commit date
notices 5 years ago admin-bar.php 7 years ago admin-tab-advanced.php 7 years ago admin-tab-logs.php 5 years ago admin-tab-main.php 7 years ago admin-tab-plugins.php 5 years ago admin-tab-themes.php 5 years ago advanced-premium-preview.php 7 years ago advanced-premium.php 5 years ago exclude-users.php 5 years ago force-updates.php 5 years ago reset-options.php 5 years ago
force-updates.php
71 lines
1 <?php
2 if (!defined('ABSPATH')) die('No direct access.');
3 echo '<div class="eum-advanced-settings-container force-updates">';
4
5 // Check for wp-config constants that disable force updates
6 if (defined('AUTOMATIC_UPDATER_DISABLED') && true == AUTOMATIC_UPDATER_DISABLED) {
7 printf('<div class="mpsum-error mpsum-bold">%s</div>', esc_html__('Automatic updates are disabled. Please check your wp-config.php file for AUTOMATIC_UPDATER_DISABLED and remove the line.'));
8 }
9 if (defined('WP_AUTO_UPDATE_CORE') && false == WP_AUTO_UPDATE_CORE) {
10 printf('<div class="mpsum-error mpsum-bold">%s</div>', esc_html__('Automatic updates for Core are disabled. Please check your wp-config.php file for WP_AUTO_UPDATE_CORE and remove the line.'));
11 }
12
13 // Check for options that also disable force updates
14 $options = MPSUM_Updates_Manager::get_options('core');
15
16 // Show a notice if all updates are disabled
17 if (isset($options['all_updates']) && 'off' == $options['all_updates']) {
18 printf('<div class="mpsum-error mpsum-bold">%s</div>', esc_html__('All updates are disabled. Please re-enable all updates for force updates to work.'));
19 }
20
21 // Show a notice if automatic updates are off
22 if (!MPSUM_Utils::get_instance()->is_automatic_updates_enabled()) {
23 printf('<div class="mpsum-error mpsum-bold">%s</div>', esc_html__('Automatic updates are off, so Force updates will not work.'));
24 }
25
26 // Show a warning if delay updates is above zero
27 if (isset($options['delay_updates']) && $options['delay_updates'] > 0) {
28 printf('<div class="mpsum-notice mpsum-bold">%s</div>', esc_html__('Delayed updates are on, so some assets may not be updated automatically.'));
29 }
30
31 // Begin output
32 printf('<h3>%s</h3>', esc_html__('Force automatic updates', 'stops-core-theme-and-plugin-updates'));
33 printf('<div class="mpsum-notice mpsum-regular">%s</div>', esc_html__('Force updates will request automatic updates of your plugins, core, themes, and translations immediately. This is useful for debugging and checking that automatic updates are working as intended. By default, WordPress checks for updates every 12 hours. Running force updates will, if successful, cause updates to happen immediately.', 'stops-core-theme-and-plugin-updates'));
34 $utils = MPSUM_Utils::get_instance();
35 $updraftplus = $utils->is_installed('updraftplus');
36 if (true === $updraftplus['installed'] && true === $updraftplus['active']) {
37 global $updraftplus_admin;
38 if (is_a($updraftplus_admin, 'UpdraftPlus_Admin') && is_callable(array($updraftplus_admin, 'add_backup_scaffolding'))) {
39 printf('<label><input type="checkbox" name="backup_force_updates" id="backup_force_updates" value="1" />%s</label>', __('Take a backup first (with UpdraftPlus)', 'stops-core-theme-and-plugin-updates'));
40 $updraftplus_admin->add_backup_scaffolding(__('Take a backup before update', 'stops-core-theme-and-plugin-updates'), array($updraftplus_admin, 'backupnow_modal_contents'));
41 }
42 } else {
43 if (true === $updraftplus['installed'] && false === $updraftplus['active']) {
44 $can_activate = is_multisite() ? current_user_can('manage_network_plugins') : current_user_can('activate_plugins');
45 if ($can_activate) {
46 $activate_link = is_multisite() ? network_admin_url('plugins.php?action=activate&plugin='.$updraftplus['name']) : self_admin_url('plugins.php?action=activate&plugin='.$updraftplus['name']);
47 $url = esc_url(wp_nonce_url(
48 $activate_link,
49 'activate-plugin_'.$updraftplus['name']
50 ));
51 $url_text = __('Follow this link to activate it.', 'stops-core-theme-and-plugin-updates');
52 $anchor = "<a href=\"{$url}\">{$url_text}</a>";
53 }
54 $required_plugin = __('Take a backup with UpdraftPlus before updating.', 'stops-core-theme-and-plugin-updates');
55 printf('<p id="eum-auto-backup-description">%s %s</p>', $required_plugin, $anchor);
56 } else {
57 if (current_user_can('install_plugins')) {
58 $url = esc_url(wp_nonce_url(
59 is_multisite() ? network_admin_url('update.php?action=install-plugin&plugin=updraftcentral') : self_admin_url('update.php?action=install-plugin&plugin=updraftplus'),
60 'install-plugin_updraftplus'
61 ));
62 $url_text = __('Follow this link to install it.', 'stops-core-theme-and-plugin-updates');
63 $anchor = "<a href=\"{$url}\">{$url_text}</a>";
64 $required_plugin = __('You can take backups using UpdraftPlus before updating.', 'stops-core-theme-and-plugin-updates');
65 printf('<p id="eum-auto-backup-description">%s %s</p>', $required_plugin, $anchor);
66 }
67 }
68 }
69 printf('<p class="submit"><input type="submit" name="submit" id="force-updates" class="button button-primary" value="%s"></p>', esc_attr__('Force updates', 'stops-core-theme-and-plugin-updates'));
70 echo '</div>';
71