PluginProbe
MainWP Dashboard: Self-hosted WordPress Management for Agencies / 6.2.2
MainWP Dashboard: Self-hosted WordPress Management for Agencies v6.2.2
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 5.2.1 All 155 releases
← All changes | class/class-mainwp-system-view.php +47 -1 6.1.7 → 6.2.2 View file →
@@ -236,8 +236,13 @@
236 236 mainwp_add_translation( $mainwpTranslations, 'Would you like to use the Bulk Settings Manager with these themes? Check out the %1Documentation%2.', esc_html__( 'Would you like to use the Bulk Settings Manager with these themes? Check out the %1Documentation%2.', 'mainwp' ) );
237 237 mainwp_add_translation( $mainwpTranslations, 'is_activated_parent', esc_html__( '%1 could not be deleted. This theme is parent theme for the currently active theme.', 'mainwp' ) );
238 238 mainwp_add_translation( $mainwpTranslations, 'is_activated_theme', esc_html__( '%1 could not be deleted. This theme is active theme.', 'mainwp' ) );
239 239 mainwp_add_translation( $mainwpTranslations, 'Change score changed. Click to review changes.', esc_html__( 'Change score changed. Click to review changes.', 'mainwp' ) );
240 + mainwp_add_translation( $mainwpTranslations, 'No sites to import', esc_html__( 'No sites to import', 'mainwp' ) );
241 + mainwp_add_translation( $mainwpTranslations, 'No valid data rows were found in the import file.', esc_html__( 'No valid data rows were found in the import file.', 'mainwp' ) );
242 + mainwp_add_translation( $mainwpTranslations, 'Congratulations!', esc_html__( 'Congratulations!', 'mainwp' ) );
243 + mainwp_add_translation( $mainwpTranslations, 'sites imported successfully.', esc_html__( 'sites imported successfully.', 'mainwp' ) );
244 +
240 245 return $mainwpTranslations;
241 246 }
242 247
243 248 /**
@@ -464,8 +469,10 @@
464 469 public static function admin_notices() {
465 470
466 471 static::mainwp_tmpfile_check();
467 472
473 + static::render_extension_update_failure_notice();
474 +
468 475 static::render_notice_config_warning();
469 476
470 477 static::render_notice_multi_sites();
471 478
@@ -485,11 +492,50 @@
485 492
486 493 static::check_rating_notice();
487 494
488 495 static::render_browser_extensions_notice();
496 +
489 497 }
490 498
491 499 /**
500 + * Render the repeated Add-on update-check failure notice.
501 + */
502 + public static function render_extension_update_failure_notice() {
503 + if ( ! \mainwp_current_user_can( 'dashboard', 'manage_extensions' ) ) {
504 + return;
505 + }
506 +
507 + $notice_id = MainWP_System_Handler::instance()->get_extension_update_failure_notice_id();
508 + if ( '' === $notice_id ) {
509 + return;
510 + }
511 +
512 + $is_extensions_page = isset( $_GET['page'] ) && 'Extensions' === sanitize_text_field( wp_unslash( $_GET['page'] ) ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended
513 + if ( ! $is_extensions_page && ! MainWP_Utility::show_mainwp_message( 'notice', $notice_id ) ) {
514 + return;
515 + }
516 + ?>
517 + <div class="ui yellow message mainwp-extension-update-failure-notice" style="margin-bottom:0;">
518 + <div class="header"><?php esc_html_e( 'Unable to check for Add-on updates', 'mainwp' ); ?></div>
519 + <?php if ( $is_extensions_page ) : ?>
520 + <p><?php esc_html_e( 'MainWP is unable to check one or more Add-ons for updates. Retry the check below.', 'mainwp' ); ?></p>
521 + <button
522 + type="button"
523 + id="mainwp-extension-update-check-retry"
524 + class="ui mini yellow button"
525 + data-failed-text="<?php esc_attr_e( 'The update check is still failing. Make sure your MainWP Dashboard can connect to mainwp.com, then try again.', 'mainwp' ); ?>"
526 + ><?php esc_html_e( 'Retry update checks', 'mainwp' ); ?></button>
527 + <span id="mainwp-extension-update-check-retry-status" class="ui small red text" aria-live="polite"></span>
528 + <?php else : ?>
529 + <p><?php esc_html_e( 'MainWP is unable to check one or more Add-ons for updates. Open the Add-ons page to retry the check.', 'mainwp' ); ?></p>
530 + <a class="ui mini yellow button" href="<?php echo esc_url( admin_url( 'admin.php?page=Extensions' ) ); ?>"><?php esc_html_e( 'Review Add-ons', 'mainwp' ); ?></a>
531 + <i class="close icon mainwp-notice-dismiss" notice-id="<?php echo esc_attr( $notice_id ); ?>"></i>
532 + <?php endif; ?>
533 + </div>
534 + <?php
535 + }
536 +
537 + /**
492 538 * Render MainWP themes deprecation notice.
493 539 *
494 540 * @uses \MainWP\Dashboard\MainWP_Settings::get_instance()
495 541 * @uses \MainWP\Dashboard\MainWP_Utility::show_mainwp_message()
@@ -1048,9 +1094,9 @@
1048 1094
1049 1095 if ( isset( $_GET['page'] ) && 'ManageClients' === $_GET['page'] && isset( $_GET['client_id'] ) && ! empty( $_GET['client_id'] ) ) {
1050 1096 $class_string .= ' mainwp-individual-client-overview ';
1051 1097 }
1052 - if ( isset( $_GET['page'] ) && ( 'CostTrackerSettings' === $_GET['page'] || 'ServerInformation' === $_GET['page'] || 'ServerInformationCron' === $_GET['page'] || 'ErrorLog' === $_GET['page'] || 'ActionLogs' === $_GET['page'] || 'PluginPrivacy' === $_GET['page'] || 'Settings' === $_GET['page'] || 'SettingsAdvanced' === $_GET['page'] || 'SettingsMonitors' === $_GET['page'] || 'SettingsEmail' === $_GET['page'] || 'MainWPTools' === $_GET['page'] || 'SettingsInsights' === $_GET['page'] || 'SettingsApiBackups' === $_GET['page'] || 'MonitoringSettings' === $_GET['page'] ) ) {
1098 + if ( isset( $_GET['page'] ) && ( 'CostTrackerSettings' === $_GET['page'] || 'ServerInformation' === $_GET['page'] || 'ServerInformationCron' === $_GET['page'] || 'ErrorLog' === $_GET['page'] || 'ActionLogs' === $_GET['page'] || 'PluginPrivacy' === $_GET['page'] || 'Settings' === $_GET['page'] || 'SettingsAdvanced' === $_GET['page'] || 'SettingsMonitors' === $_GET['page'] || 'SettingsEmail' === $_GET['page'] || 'PremiumUpdates' === $_GET['page'] || 'MainWPTools' === $_GET['page'] || 'SettingsInsights' === $_GET['page'] || 'SettingsApiBackups' === $_GET['page'] || 'MonitoringSettings' === $_GET['page'] ) ) {
1053 1099 $class_string .= ' mainwp-individual-site-view ';
1054 1100 }
1055 1101 if ( isset( $_GET['page'] ) && 'CostTrackerAdd' !== $_GET['page'] && ( ( isset( $_GET['id'] ) && ! empty( $_GET['id'] ) ) || ( isset( $_GET['dashboard'] ) && ! empty( $_GET['dashboard'] ) ) || ( isset( $_GET['updateid'] ) && ! empty( $_GET['updateid'] ) ) || ( isset( $_GET['monitor_wpid'] ) && ! empty( $_GET['monitor_wpid'] ) ) || ( isset( $_GET['emailsettingsid'] ) && ! empty( $_GET['emailsettingsid'] ) ) || ( isset( $_GET['scanid'] ) && ! empty( $_GET['scanid'] ) ) ) ) {
1056 1102 $class_string .= ' mainwp-individual-site-view ';