PluginProbe
MainWP Dashboard: Self-hosted WordPress Management for Agencies / 6.2.1
MainWP Dashboard: Self-hosted WordPress Management for Agencies v6.2.1
6.2.3 6.2.2 6.2.1 6.2 6.1.8 6.1.7 6.1.6 6.1.5 6.1.4 6.1.3 6.1.2 6.1.1 6.1 6.0.12 6.0.11 4.6.0.1 5.0 5.0.1 5.0.2 5.0.3 5.0.3.1 5.0.3.2 5.1 5.1.1 5.2 All 156 releases
← All changes | pages/page-mainwp-settings-indicator.php +34 -17 5.2 → 6.2.1 View file →
@@ -6,8 +6,13 @@
6 6 */
7 7
8 8 namespace MainWP\Dashboard;
9 9
10 +// Exit if accessed directly.
11 +if ( ! defined( 'ABSPATH' ) ) {
12 + exit;
13 +}
14 +
10 15 /**
11 16 * Class MainWP_Settings_Indicator
12 17 *
13 18 * @package MainWP\Dashboard
@@ -45,11 +50,11 @@
45 50
46 51 /**
47 52 * Method render_indicator().
48 53 *
49 - * @param bool $indi_type Indicator type.
50 - * @param bool $wrapper_cls field wrapper class.
51 - * @param bool $visible Current indicator status.
54 + * @param string $indi_type Indicator type.
55 + * @param string $wrapper_cls field wrapper class.
56 + * @param bool $visible Current indicator status.
52 57 */
53 58 public static function render_indicator( $indi_type = 'field', $wrapper_cls = '', $visible = true ) {
54 59 echo static::get_indicator( $indi_type, $wrapper_cls, $visible ); //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
55 60 }
@@ -64,9 +69,9 @@
64 69 $cls = $visible ? 'visible-indicator' : '';
65 70 if ( 'header' === $indi_type ) {
66 71 return '<i style="display:none;" field-indicator-wrapper-class="' . esc_html( $wrapper_cls ) . '" class="ui circle icon tiny yellow settings-field-header-indicator ' . $cls . ' "></i>';
67 72 } else {
68 - return '<i class="ui circle icon tiny yellow settings-field-icon-indicator ' . $cls . '"></i>';
73 + return '<span data-tooltip="' . esc_attr__( 'Changed from default', 'mainwp' ) . '" data-variation="mini" data-position="top center" data-inverted=""><i class="ui circle icon tiny yellow settings-field-icon-indicator ' . $cls . '"></i></span>';
69 74 }
70 75 }
71 76
72 77 /**
@@ -74,18 +79,23 @@
74 79 *
75 80 * @param string $field setting field to check.
76 81 * @param mixed $current_value setting current value.
77 82 * @param bool $render_indi to render indication.
83 + * @param mixed $default_val default value directly.
78 84 */
79 - public static function render_not_default_indicator( $field, $current_value, $render_indi = true ) {
80 - $def = static::get_defaults_value( $field );
85 + public static function render_not_default_indicator( $field, $current_value, $render_indi = true, $default_val = null ) {
86 + $indi_value = static::get_defaults_value( $field );
81 87
88 + if ( null !== $default_val ) {
89 + $indi_value = $default_val;
90 + }
91 +
82 92 $visible = false;
83 - if ( ( 'none_preset_value' !== $field && $current_value !== $def ) || ( 'none_preset_value' === $field && ! empty( $current_value ) ) ) {
93 + if ( ( 'none_preset_value' !== $field && $current_value !== $indi_value ) || ( 'none_preset_value' === $field && ! empty( $current_value ) ) ) {
84 94 $visible = true;
85 95 }
86 96 $indi = static::get_indicator( 'field', '', $visible );
87 - $indi = apply_filters( 'mainwp_default_settings_indicator', $indi, $field, $def, $current_value, $render_indi );
97 + $indi = apply_filters( 'mainwp_default_settings_indicator', $indi, $field, $indi_value, $current_value, $render_indi, $default_val );
88 98 if ( $render_indi ) {
89 99 echo $indi; //phpcs:ignore -- ok.
90 100 }
91 101 return $indi;
@@ -135,13 +145,11 @@
135 145 'mainwp_delay_autoupdate' => 1,
136 146 'mainwp_disable_update_confirmations' => 0,
137 147 'mainwp_show_language_updates' => 1,
138 148 'mainwp_check_http_response' => 0,
139 - 'mainwp_ignore_HTTP_response_status' => '',
140 149 'mainwp_backup_before_upgrade' => 0,
141 150 'mainwp_backup_before_upgrade_days' => 7,
142 151 'mainwp_numberdays_Outdate_Plugin_Theme' => 365,
143 - 'mainwp_disableSitesChecking' => 1, // default disable.
144 152 'mainwp_disableSitesHealthMonitoring' => 1,
145 153 'mainwp_sitehealthThreshold' => 80,
146 154 'mainwp_enableLegacyBackupFeature' => 0,
147 155 'mainwp_backupsOnServer' => 1,
@@ -158,8 +166,9 @@
158 166 'mainwp_maximumIPRequests' => 1,
159 167 'mainwp_minimumIPDelay' => 1000,
160 168 'mainwp_maximumSyncRequests' => 8,
161 169 'mainwp_maximumInstallUpdateRequests' => 3,
170 + 'mainwp_maximum_uptime_monitoring_requests' => 10,
162 171 'mainwp_optimize' => 1,
163 172 'mainwp_wp_cron' => 1,
164 173 'mainwp_sslVerifyCertificate' => 1,
165 174 'mainwp_verify_connection_method' => 1,
@@ -167,8 +176,10 @@
167 176 'mainwp_forceUseIPv4' => 0,
168 177 'mainwp_module_log_enabled' => 1,
169 178 'mainwp_selected_theme' => 'default',
170 179 'mainwp_enable_guided_tours' => 0,
180 + 'mainwp_enable_guided_video' => 0,
181 + 'mainwp_enable_guided_chatbase' => 0,
171 182 'mainwp_site_backup_before_upgrade' => 2,
172 183 'mainwp_site_suspended_site' => 0,
173 184 'mainwp_site_automatic_update' => 0,
174 185 'mainwp_site_is_ignoreCoreUpdates' => 0,
@@ -173,12 +184,12 @@
173 184 'mainwp_site_automatic_update' => 0,
174 185 'mainwp_site_is_ignoreCoreUpdates' => 0,
175 186 'mainwp_site_is_ignorePluginUpdates' => 0,
176 187 'mainwp_site_is_ignoreThemeUpdates' => 0,
177 - 'mainwp_site_status_check_interval' => 0, // Use global setting.
188 + 'mainwp_site_is_ignore_trans_updates' => 0,
178 189 'mainwp_site_monitoring_notification_emails' => '',
179 190 'mainwp_site_disable_health_check' => 0,
180 - 'mainwp_site_verify_certificate' => 1,
191 + 'mainwp_site_verify_certificate' => 2,
181 192 'mainwp_site_ssl_version' => 0,
182 193 'mainwp_site_verify_method' => 3,
183 194 'mainwp_site_signature_algo' => 9999, // Use global setting.
184 195 'mainwp_site_force_use_ipv4' => 2, // Use global setting.
@@ -190,13 +201,19 @@
190 201 'cost_tracker_currency_position' => is_array( $defauls_currency_settings ) && isset( $defauls_currency_settings['currency_position'] ) ? $defauls_currency_settings['currency_position'] : null,
191 202 'cost_tracker_thousand_separator' => is_array( $defauls_currency_settings ) && isset( $defauls_currency_settings['thousand_separator'] ) ? $defauls_currency_settings['thousand_separator'] : null,
192 203 'cost_tracker_decimal_separator' => is_array( $defauls_currency_settings ) && isset( $defauls_currency_settings['decimal_separator'] ) ? $defauls_currency_settings['decimal_separator'] : null,
193 204 'cost_tracker_decimals' => is_array( $defauls_currency_settings ) && isset( $defauls_currency_settings['decimals'] ) ? (int) $defauls_currency_settings['decimals'] : null,
194 - 'mainwp_frequencySitesChecking' => 60,
195 205 'mainwp_frequency_AutoUpdate' => 'daily',
196 206 'mainwp_dayinweek_AutoUpdate' => 0,
197 207 'mainwp_dayinmonth_AutoUpdate' => 1,
198 208 'mainwp_time_AutoUpdate' => '00:00',
209 + 'mainwp_edit_monitor_up_status_codes' => 'useglobal',
210 + 'mainwp_edit_monitor_maxretries' => -1, // use global.
211 + 'mainwp_edit_monitor_maxretries_global' => 1,
212 + 'mainwp_edit_monitor_monitoring_emails' => '',
213 + 'mainwp_check_http_response_method' => 'head',
214 + 'mainwp_warm_cache_pages_ttl' => 10,
215 + 'mainwp_module_log_child_activities_ttl' => 7,
199 216 );
200 217
201 218 if ( 'all' === $field ) {
202 219 return $defaults;
@@ -219,9 +236,9 @@
219 236 $defaults = array(
220 237 'daily_digest' => array(
221 238 'disable' => $disable,
222 239 'recipients' => $recipients,
223 - 'subject' => $general ? 'Daily Digest' : '[site.name] Daily Digest',
240 + 'subject' => $general ? 'Daily Digest from Your MainWP Dashboard' : '[site.name] Daily Digest from Your MainWP Dashboard',
224 241 'heading' => $general ? 'Daily Digest' : '[site.name] Daily Digest',
225 242 'overrided' => 0,
226 243 ),
227 244 'uptime' => array(
@@ -226,9 +243,9 @@
226 243 ),
227 244 'uptime' => array(
228 245 'disable' => $disable,
229 246 'recipients' => $recipients,
230 - 'subject' => $general ? 'Uptime Monitoring' : '[site.name] Uptime Monitoring',
247 + 'subject' => $general ? 'Uptime Monitoring Alert from your MainWP Dashboard' : '[site.name] Uptime Monitoring Alert from your MainWP Dashboard',
231 248 'heading' => $general ? 'Uptime Monitoring' : '[site.name] Uptime Monitoring',
232 249 'overrided' => 0,
233 250 ),
234 251 'site_health' => array(
@@ -233,9 +250,9 @@
233 250 ),
234 251 'site_health' => array(
235 252 'disable' => $disable,
236 253 'recipients' => $recipients,
237 - 'subject' => $general ? 'Site Health Monitoring' : '[site.name] Site Health Monitoring',
254 + 'subject' => $general ? 'Site Health Monitoring Alert from Your MainWP Dashboard' : '[site.name] Site Health Monitoring Alert from Your MainWP Dashboard',
238 255 'heading' => $general ? 'Site Health Monitoring' : '[site.name] Site Health Monitoring',
239 256 'overrided' => 0,
240 257 ),
241 258 'http_check' => array(
@@ -247,9 +264,9 @@
247 264 ),
248 265 'deactivated_license_alert' => array(
249 266 'disable' => $disable,
250 267 'recipients' => $recipients,
251 - 'subject' => 'Extension License Deactivation Notification',
268 + 'subject' => 'Extension License Deactivation Notification from Your MainWP Dashboard',
252 269 'heading' => 'Extension License Deactivation Notification',
253 270 'overrided' => 0,
254 271 ),
255 272 );