here to install MainWP plugin (do not forget to activate it after installation).', esc_html__( 'No MainWP Child plugin detected, first install and activate the plugin and add your site to MainWP afterwards. Click here to install MainWP plugin (do not forget to activate it after installation).', 'mainwp' ) ); mainwp_add_translation( $mainwpTranslations, 'Testing the connection', esc_html__( 'Testing the connection', 'mainwp' ) ); mainwp_add_translation( $mainwpTranslations, 'Are you sure you want to delete this site?', esc_html__( 'Are you sure you want to delete this site?', 'mainwp' ) ); mainwp_add_translation( $mainwpTranslations, 'Removing and deactivating the MainWP Child plugin..', esc_html__( 'Removing and deactivating the MainWP Child plugin..', 'mainwp' ) ); mainwp_add_translation( $mainwpTranslations, 'The site has been removed and the MainWP Child plugin has been disabled.', esc_html__( 'The site has been removed and the MainWP Child plugin has been disabled.', 'mainwp' ) ); mainwp_add_translation( $mainwpTranslations, 'The requested site has not been found', esc_html__( 'The requested site has not been found', 'mainwp' ) ); mainwp_add_translation( $mainwpTranslations, 'The site has been removed but the MainWP Child plugin could not be disabled', esc_html__( 'The site has been removed but the MainWP Child plugin could not be disabled', 'mainwp' ) ); mainwp_add_translation( $mainwpTranslations, 'Paused import by user.', esc_html__( 'Paused import by user.', 'mainwp' ) ); mainwp_add_translation( $mainwpTranslations, 'Continue', esc_html__( 'Continue', 'mainwp' ) ); mainwp_add_translation( $mainwpTranslations, 'Continue import.', esc_html__( 'Continue import.', 'mainwp' ) ); mainwp_add_translation( $mainwpTranslations, 'Pause', esc_html__( 'Pause', 'mainwp' ) ); mainwp_add_translation( $mainwpTranslations, 'Finished', esc_html__( 'Finished', 'mainwp' ) ); mainwp_add_translation( $mainwpTranslations, 'Please enter the Site name.', esc_html__( 'Please enter the Site name.', 'mainwp' ) ); mainwp_add_translation( $mainwpTranslations, 'Please enter the Site url.', esc_html__( 'Please enter the Site url.', 'mainwp' ) ); mainwp_add_translation( $mainwpTranslations, 'Please enter Admin name of the site.', esc_html__( 'Please enter Admin name of the site.', 'mainwp' ) ); mainwp_add_translation( $mainwpTranslations, 'Number of sites to Import: %1 Created sites: %2 Failed: %3', esc_html__( 'Number of sites to Import: %1 Created sites: %2 Failed: %3', 'mainwp' ) ); mainwp_add_translation( $mainwpTranslations, 'HTTP error - website does not exist', esc_html__( 'HTTP error - website does not exist', 'mainwp' ) ); mainwp_add_translation( $mainwpTranslations, 'No selected Categories', esc_html__( 'No selected Categories', 'mainwp' ) ); mainwp_add_translation( $mainwpTranslations, 'Please select websites or tags to add a user.', esc_html__( 'Please select websites or tags to add a user.', 'mainwp' ) ); mainwp_add_translation( $mainwpTranslations, 'Number of Users to Import: %1 Created users: %2 Failed: %3', esc_html__( 'Number of Users to Import: %1 Created users: %2 Failed: %3', 'mainwp' ) ); mainwp_add_translation( $mainwpTranslations, 'Please enter the username.', esc_html__( 'Please enter the username.', 'mainwp' ) ); mainwp_add_translation( $mainwpTranslations, 'Please enter the email.', esc_html__( 'Please enter the email.', 'mainwp' ) ); mainwp_add_translation( $mainwpTranslations, 'Please enter the password.', esc_html__( 'Please enter the password.', 'mainwp' ) ); mainwp_add_translation( $mainwpTranslations, 'Please select a valid role.', esc_html__( 'Please select a valid role.', 'mainwp' ) ); mainwp_add_translation( $mainwpTranslations, 'Loading previous page..', esc_html__( 'Loading previous page..', 'mainwp' ) ); mainwp_add_translation( $mainwpTranslations, 'Loading next page..', esc_html__( 'Loading next page..', 'mainwp' ) ); mainwp_add_translation( $mainwpTranslations, 'Searching the WordPress repository..', esc_html__( 'Searching the WordPress repository..', 'mainwp' ) ); mainwp_add_translation( $mainwpTranslations, 'Please select websites or tags on the right side to install files.', esc_html__( 'Please select websites or tags on the right side to install files.', 'mainwp' ) ); mainwp_add_translation( $mainwpTranslations, 'Queued', esc_html__( 'Queued', 'mainwp' ) ); mainwp_add_translation( $mainwpTranslations, 'In progress', esc_html__( 'In progress', 'mainwp' ) ); mainwp_add_translation( $mainwpTranslations, 'Preparing %1 installation.', esc_html__( 'Preparing %1 installation.', 'mainwp' ) ); mainwp_add_translation( $mainwpTranslations, 'Installation successful', esc_html__( 'Installation successful', 'mainwp' ) ); mainwp_add_translation( $mainwpTranslations, 'Installation failed', esc_html__( 'Installation failed', 'mainwp' ) ); mainwp_add_translation( $mainwpTranslations, 'Please select websites or tags to install files.', esc_html__( 'Please select websites or tags to install files.', 'mainwp' ) ); mainwp_add_translation( $mainwpTranslations, 'Creating the backupfile on the child installation, this might take a while depending on the size. Please be patient.', esc_html__( 'Creating the backupfile on the child installation, this might take a while depending on the size. Please be patient.', 'mainwp' ) ); mainwp_add_translation( $mainwpTranslations, 'Backupfile on child site created successfully.', esc_html__( 'Backupfile on child site created successfully.', 'mainwp' ) ); mainwp_add_translation( $mainwpTranslations, 'Downloading the file.', esc_html__( 'Downloading the file.', 'mainwp' ) ); mainwp_add_translation( $mainwpTranslations, 'Download from child completed.', esc_html__( 'Download from child completed.', 'mainwp' ) ); mainwp_add_translation( $mainwpTranslations, 'Please wait while we are saving your note', esc_html__( 'Please wait while we are saving your note', 'mainwp' ) ); mainwp_add_translation( $mainwpTranslations, 'Note saved.', esc_html__( 'Note saved.', 'mainwp' ) ); mainwp_add_translation( $mainwpTranslations, 'An error occured while saving your message.', esc_html__( 'An error occured while saving your message.', 'mainwp' ) ); mainwp_add_translation( $mainwpTranslations, 'Please search and select users for update password.', esc_html__( 'Please search and select users for update password.', 'mainwp' ) ); mainwp_add_translation( $mainwpTranslations, 'All', esc_html__( 'All', 'mainwp' ) ); mainwp_add_translation( $mainwpTranslations, 'Any', esc_html__( 'Any', 'mainwp' ) ); mainwp_add_translation( $mainwpTranslations, 'HTTP error', esc_html__( 'HTTP error', 'mainwp' ) ); mainwp_add_translation( $mainwpTranslations, 'Error on your child WordPress', esc_html__( 'Error on your child WordPress', 'mainwp' ) ); mainwp_add_translation( $mainwpTranslations, 'MainWP Child plugin not detected. First, install and activate the plugin and add your site to MainWP afterwards. If you continue experiencing this issue, Please review MainWP Knowledgebase, and if you still have issues, please let us know in the MainWP Community.', esc_html__( 'MainWP Child plugin not detected. First, install and activate the plugin and add your site to MainWP afterwards. If you continue experiencing this issue, Please review MainWP Knowledgebase, and if you still have issues, please let us know in the MainWP Community.', 'mainwp' ) ); mainwp_add_translation( $mainwpTranslations, 'Remove', esc_html__( 'Remove', 'mainwp' ) ); mainwp_add_translation( $mainwpTranslations, 'Please reconnect to Dropbox', esc_html__( 'Please reconnect to Dropbox', 'mainwp' ) ); mainwp_add_translation( $mainwpTranslations, 'Please wait', esc_html__( 'Please wait', 'mainwp' ) ); mainwp_add_translation( $mainwpTranslations, 'Upgrading all', esc_html__( 'Upgrading all', 'mainwp' ) ); mainwp_add_translation( $mainwpTranslations, 'Upgrading %1', esc_html__( 'Upgrading %1', 'mainwp' ) ); mainwp_add_translation( $mainwpTranslations, 'Updating your plan...', esc_html__( 'Updating your plan...', 'mainwp' ) ); mainwp_add_translation( $mainwpTranslations, 'Updated your plan', esc_html__( 'Updated your plan', 'mainwp' ) ); $mainwp_backup_before_upgrade_days = get_option( 'mainwp_backup_before_upgrade_days' ); if ( empty( $mainwp_backup_before_upgrade_days ) || ! ctype_digit( $mainwp_backup_before_upgrade_days ) ) { $mainwp_backup_before_upgrade_days = 7; } mainwp_add_translation( $mainwpTranslations, 'A full backup has not been taken in the last days for the following sites:', str_replace( '%1', '' . $mainwp_backup_before_upgrade_days, esc_html__( 'A full backup has not been taken in the last %1 days for the following sites:', 'mainwp' ) ) ); mainwp_add_translation( $mainwpTranslations, 'Starting required backup(s).', esc_html__( 'Starting required backup(s).', 'mainwp' ) ); mainwp_add_translation( $mainwpTranslations, 'Required backup(s) complete', esc_html__( 'Required backup(s) complete', 'mainwp' ) ); mainwp_add_translation( $mainwpTranslations, 'Continue update anyway', esc_html__( 'Continue update anyway', 'mainwp' ) ); mainwp_add_translation( $mainwpTranslations, 'Continue update', esc_html__( 'Continue update', 'mainwp' ) ); mainwp_add_translation( $mainwpTranslations, 'Pause', esc_html__( 'Pause', 'mainwp' ) ); mainwp_add_translation( $mainwpTranslations, 'Resume', esc_html__( 'Resume', 'mainwp' ) ); mainwp_add_translation( $mainwpTranslations, 'Checking if a backup is required for the selected updates...', esc_html__( 'Checking if a backup is required for the selected updates...', 'mainwp' ) ); mainwp_add_translation( $mainwpTranslations, 'Full backup required', esc_html__( 'Full backup required', 'mainwp' ) ); mainwp_add_translation( $mainwpTranslations, 'Checking backup settings', esc_html__( 'Checking backup settings', 'mainwp' ) ); mainwp_add_translation( $mainwpTranslations, 'Hide Shortcuts', esc_html__( 'Hide Shortcuts', 'mainwp' ) ); mainwp_add_translation( $mainwpTranslations, 'Show Shortcuts', esc_html__( 'Show Shortcuts', 'mainwp' ) ); mainwp_add_translation( $mainwpTranslations, 'Are you sure?', esc_html__( 'Are you sure?', 'mainwp' ) ); mainwp_add_translation( $mainwpTranslations, 'Bulk reconnect finished.', esc_html__( 'Bulk reconnect finished.', 'mainwp' ) ); mainwp_add_translation( $mainwpTranslations, 'Note Saved', esc_html__( 'Note Saved', 'mainwp' ) ); mainwp_add_translation( $mainwpTranslations, 'An error occured while saving your message', esc_html__( 'An error occured while saving your message', 'mainwp' ) ); mainwp_add_translation( $mainwpTranslations, 'Download from child site completed.', esc_html__( 'Download from child site completed.', 'mainwp' ) ); mainwp_add_translation( $mainwpTranslations, 'Please wait while we are saving your note', esc_html__( 'Please wait while we are saving your note', 'mainwp' ) ); mainwp_add_translation( $mainwpTranslations, 'Installation Successful', esc_html__( 'Installation Successful', 'mainwp' ) ); mainwp_add_translation( $mainwpTranslations, 'Upload to %1 (%2) successful.', esc_html__( 'Upload to %1 (%2) successful.', 'mainwp' ) ); mainwp_add_translation( $mainwpTranslations, 'Upload to %1 (%2) failed:', esc_html__( 'Upload to %1 (%2) failed:', 'mainwp' ) ); mainwp_add_translation( $mainwpTranslations, 'Updating Themes', esc_html__( 'Updating Themes', 'mainwp' ) ); mainwp_add_translation( $mainwpTranslations, 'Updating Plugins', esc_html__( 'Updating Plugins', 'mainwp' ) ); mainwp_add_translation( $mainwpTranslations, 'Updating WordPress', esc_html__( 'Updating WordPress', 'mainwp' ) ); mainwp_add_translation( $mainwpTranslations, 'updated', esc_html__( 'updated', 'mainwp' ) ); mainwp_add_translation( $mainwpTranslations, 'Updating', esc_html__( 'Updating', 'mainwp' ) ); mainwp_add_translation( $mainwpTranslations, 'Please enter a valid name for your backup task', esc_html__( 'Please enter a valid name for your backup task', 'mainwp' ) ); mainwp_add_translation( $mainwpTranslations, 'The backup task was added successfully', esc_html__( 'The backup task was added successfully', 'mainwp' ) ); mainwp_add_translation( $mainwpTranslations, 'Bulk test connection finished', esc_html__( 'Bulk test connection finished', 'mainwp' ) ); mainwp_add_translation( $mainwpTranslations, 'To find out more about what your HTTP status code means please %1click here%2 to locate your number (%3)', esc_html__( 'To find out more about what your HTTP status code means please %1click here%2 to locate your number (%3)', 'mainwp' ) ); mainwp_add_translation( $mainwpTranslations, 'Refreshing the page for Step 3 "Grab API Keys" in 5 seconds... if refresh fails please %1click here%2.', esc_html__( 'Refreshing the page for Step 3 "Grab API Keys" in 5 seconds... if refresh fails please %1click here%2.', 'mainwp' ) ); mainwp_add_translation( $mainwpTranslations, 'No ignored abandoned plugins', esc_html__( 'No ignored abandoned plugins', 'mainwp' ) ); mainwp_add_translation( $mainwpTranslations, 'Please upload plugins to install.', esc_html__( 'Please upload plugins to install.', 'mainwp' ) ); mainwp_add_translation( $mainwpTranslations, 'Please upload themes to install.', esc_html__( 'Please upload themes to install.', 'mainwp' ) ); mainwp_add_translation( $mainwpTranslations, 'Did you know with the %1 you can control the settings of this plugin directly from your MainWP Dashboard?', esc_html__( 'Did you know with the %1 you can control the settings of this plugin directly from your MainWP Dashboard?', 'mainwp' ) ); mainwp_add_translation( $mainwpTranslations, 'Did you know with the %1 you can control the settings of these plugins directly from your MainWP Dashboard?', esc_html__( 'Did you know with the %1 you can control the settings of these plugins directly from your MainWP Dashboard?', 'mainwp' ) ); mainwp_add_translation( $mainwpTranslations, 'Did you know with the %1 you can control the settings of this theme directly from your MainWP Dashboard?', esc_html__( 'Did you know with the %1 you can control the settings of this theme directly from your MainWP Dashboard?', 'mainwp' ) ); mainwp_add_translation( $mainwpTranslations, 'Did you know with the %1 you can control the settings of these themes directly from your MainWP Dashboard?', esc_html__( 'Did you know with the %1 you can control the settings of these themes directly from your MainWP Dashboard?', 'mainwp' ) ); mainwp_add_translation( $mainwpTranslations, 'Would you like to use the Bulk Settings Manager with this plugin? Check out the %1Documentation%2.', esc_html__( 'Would you like to use the Bulk Settings Manager with this plugin? Check out the %1Documentation%2.', 'mainwp' ) ); mainwp_add_translation( $mainwpTranslations, 'Would you like to use the Bulk Settings Manager with these plugin? Check out the %1Documentation%2.', esc_html__( 'Would you like to use the Bulk Settings Manager with these plugin? Check out the %1Documentation%2.', 'mainwp' ) ); mainwp_add_translation( $mainwpTranslations, 'Would you like to use the Bulk Settings Manager with this theme? Check out the %1Documentation%2.', esc_html__( 'Would you like to use the Bulk Settings Manager with this theme? Check out the %1Documentation%2.', 'mainwp' ) ); 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' ) ); 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' ) ); mainwp_add_translation( $mainwpTranslations, 'is_activated_theme', esc_html__( '%1 could not be deleted. This theme is active theme.', 'mainwp' ) ); mainwp_add_translation( $mainwpTranslations, 'Change score changed. Click to review changes.', esc_html__( 'Change score changed. Click to review changes.', 'mainwp' ) ); return $mainwpTranslations; } /** * Check if MainWP Extensions are Activated or not. * * @param mixed $plugin_slug Plugin Slug. * * @return string Activation warning message. * * @uses \MainWP\Dashboard\MainWP_Extensions_Handler::get_indexed_extensions_infor() */ public static function after_extensions_plugin_row( $plugin_slug ) { $extensions = MainWP_Extensions_Handler::get_indexed_extensions_infor(); if ( ! isset( $extensions[ $plugin_slug ] ) ) { return; } if ( ! isset( $extensions[ $plugin_slug ]['apiManager'] ) || ! $extensions[ $plugin_slug ]['apiManager'] ) { return; } if ( isset( $extensions[ $plugin_slug ]['activated_key'] ) && 'Activated' === $extensions[ $plugin_slug ]['activated_key'] ) { return; } $slug = basename( $plugin_slug, '.php' ); $activate_notices = get_user_option( 'mainwp_hide_activate_notices' ); if ( is_array( $activate_notices ) && isset( $activate_notices[ $slug ] ) ) { return; } ?>
', '' ); ?>
 ', ' ' ); // NOSONAR - noopener - open safe. ?>
get_websites_count() > 4 && ! $is_demo && MainWP_Utility::show_mainwp_message( 'notice', 'mainwp_browser_extensions_notice' ) ) { ?>


get_websites_count() > 0 && ! static::check_keys_encrypted() && MainWP_Utility::show_mainwp_message( 'notice', 'mainwp_secure_priv_key_notice' ) ) { ?>

query( MainWP_DB::instance()->get_sql_websites_for_current_user( false, null, 'wp.url', false, false, null, true ) ); while ( $websites && ( $website = MainWP_DB::fetch_object( $websites ) ) ) { // try to decrypt priv key. $de_privkey = MainWP_Encrypt_Data_Lib::instance()->decrypt_privkey( base64_decode( $website->privkey ), $website->id ); // phpcs:ignore -- NOSONAR - base64_encode trust. if ( ! empty( $de_privkey ) ) { update_option( 'mainwp_keys_is_encrypted', 1 ); return true; } } return false; } /** * Renders wp_mail warning. */ public static function render_wp_mail_warning() { $mail_failed = get_option( 'mainwp_notice_wp_mail_failed' ); if ( 'yes' === $mail_failed ) { ?>
', '' ); ?>
$last_hidden + 30 * DAY_IN_SECONDS || MainWP_Utility::show_mainwp_message( 'notice', 'phpver_8_0' ) ) { ?>
', '' ); ?>

>
', '', '', '' ); ?>
$days * 24 * 3600 ) ? true : false; } } else { $current_options['request_reviews1'] = 30; $current_options['request_reviews1_starttime'] = time(); update_option( 'mainwp_showhide_events_notice', $current_options ); } if ( isset( $current_options['request_reviews2'] ) ) { if ( 'forever' === $current_options['request_reviews2'] ) { $display_request2 = false; } else { $days = intval( $current_options['request_reviews2'] ); $start_time = $current_options['request_reviews2_starttime']; $display_request2 = ( ( time() - $start_time ) > $days * 24 * 3600 ) ? true : false; } } else { $currentExtensions = MainWP_Extensions_Handler::get_extensions(); if ( is_array( $currentExtensions ) && count( $currentExtensions ) > 10 ) { $display_request2 = true; } } if ( $display_request1 ) { static::render_rating_notice_1(); } elseif ( $display_request2 ) { static::render_rating_notice_2(); } } /** * Renders MainWP Dashboard & Child Plugin auto update Alert. */ public static function render_notice_trust_update() { $is_demo = MainWP_Demo_Handle::is_demo_mode(); if ( ! $is_demo ) { ?>

get_websites_count() > 0 ) { return; } else { $plugins = get_plugins(); if ( ! is_array( $plugins ) || count( $plugins ) <= 4 ) { return; } } ?>

demo.yourdomain.com")' ); ?>

(function (w, d, s) { console.log('init usetifulScript'); let a = d.getElementsByTagName('head')[0]; let r = d.createElement('script'); r.async = 1; r.src = s; r.setAttribute('id', 'usetifulScript'); r.dataset.token = '480fa17b0507a1c60abba94bfdadd0a7'; a.appendChild(r); })(window, document, 'https://www.usetiful.com/dist/usetiful.js'); "; } /** * MainWP Admin body CSS class attributes. * * @param mixed $class_string MainWP CSS Class attributes. * * @return string $class_string The CSS attributes to add to the page. * * @uses \MainWP\Dashboard\MainWP_System::is_mainwp_pages() */ public static function admin_body_class( $class_string ) { // phpcs:ignore -- NOSONAR - complex. if ( MainWP_System::is_mainwp_pages() ) { $class_string .= ' mainwp-ui mainwp-ui-page '; $class_string .= ' mainwp-ui-leftmenu '; $selected_theme = MainWP_Settings::get_instance()->get_selected_theme(); if ( ! empty( $selected_theme ) ) { $class_string .= ' mainwp-custom-theme '; } if ( ! empty( $selected_theme ) && is_string( $selected_theme ) ) { $class_string .= ' mainwp-' . $selected_theme . '-theme '; } else { $class_string .= ' mainwp-classic-theme '; } $siteViewMode = MainWP_Utility::get_siteview_mode(); if ( 'grid' === $siteViewMode ) { $class_string .= ' mainwp-sites-grid-view '; } else { $class_string .= ' mainwp-sites-table-view '; } // phpcs:disable WordPress.Security.NonceVerification,WordPress.Security.ValidatedSanitizedInput.InputNotSanitized if ( isset( $_GET['page'] ) && 'managesites' === $_GET['page'] && isset( $_GET['dashboard'] ) && ! empty( $_GET['dashboard'] ) ) { $class_string .= ' mainwp-individual-site-overview '; } if ( isset( $_GET['page'] ) && 'ManageClients' === $_GET['page'] && isset( $_GET['client_id'] ) && ! empty( $_GET['client_id'] ) ) { $class_string .= ' mainwp-individual-client-overview '; } 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'] ) ) { $class_string .= ' mainwp-individual-site-view '; } 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'] ) ) ) ) { $class_string .= ' mainwp-individual-site-view '; } // phpcs:enable $class_string = apply_filters( 'mainwp_page_admin_body_class', $class_string ); } return $class_string; } /** * Method render_footer_content() * * Render footer content. * * @param mixed $websites The websites object. * @param int $current_wpid The current website id. * * @uses \MainWP\Dashboard\MainWP_DB::fetch_object() * @uses \MainWP\Dashboard\MainWP_DB::data_seek() * @uses \MainWP\Dashboard\MainWP_Utility::get_nice_url() */ public static function render_footer_content( $websites, $current_wpid = false ) { // phpcs:ignore -- NOSONAR -Current complexity is the only way to achieve desired results, pull request solutions appreciated. if ( is_array( $websites ) ) { $count = count( $websites ); for ( $i = 0; $i < $count; $i++ ) { $website = $websites[ $i ]; echo ''; } } elseif ( false !== $websites ) { while ( $website = MainWP_DB::fetch_object( $websites ) ) { echo ''; } } /** * Action: mainwp_admin_footer * * Fires at the bottom of MainWP content. * * @since Unknown */ do_action( 'mainwp_admin_footer' ); MainWP_UI::render_select_mainwp_themes_modal(); MainWP_UI::render_install_extensions_promo_modal(); ?> 'Extensions-Mainwp-Pro-Reports-Extension', 'slug' => 'mainwp-child-reports/mainwp-child-reports.php', 'name' => 'MainWP Child Reports', ), array( 'page' => 'Extensions-Mainwp-Client-Reports-Extension', 'slug' => 'mainwp-child-reports/mainwp-child-reports.php', 'name' => 'MainWP Child Reports', ), array( 'page' => 'Extensions-Mainwp-Backwpup-Extension', 'slug' => 'backwpup/backwpup.php', 'name' => 'BackWPup', ), array( 'page' => 'Extensions-Mainwp-Ithemes-Security-Extension', 'slug' => 'better-wp-security/better-wp-security.php', 'slug_pro' => 'ithemes-security-pro/ithemes-security-pro.php', 'name' => 'iThemes Security', ), array( 'page' => 'Extensions-Mainwp-Updraftplus-Extension', 'slug' => 'updraftplus/updraftplus.php', 'name' => 'UpdraftPlus', ), array( 'page' => 'Extensions-Mainwp-Wordfence-Extension', 'slug' => 'wordfence/wordfence.php', 'name' => 'Wordfence', ), array( 'page' => 'Extensions-Wordpress-Seo-Extension', 'slug' => 'wordpress-seo/wp-seo.php', 'name' => 'Yoast SEO', ), array( 'page' => 'Extensions-Mainwp-Jetpack-Protect-Extension', 'slug' => 'jetpack-protect/jetpack-protect.php', 'name' => 'Jetpack Protect', ), array( 'page' => 'Extensions-Mainwp-Jetpack-Scan-Extension', 'slug' => 'jetpack-protect/jetpack-protect.php', // tweaked: to requires install the JP protect plugin. 'slug_pro' => 'jetpack/jetpack.php', 'name' => 'Jetpack Protect', ), ); return apply_filters( 'mainwp_plugins_install_checks', $plugins ); } /** * Render plugins install check modal. * for the exntesion overview page with the missing install plugin only. */ public static function render_plugins_install_check() { // phpcs:ignore -- NOSONAR - complex function. $plugins_to_checks = static::get_plugins_install_check(); $page = isset( $_GET['page'] ) ? sanitize_text_field( wp_unslash( $_GET['page'] ) ) : ''; // phpcs:ignore WordPress.Security.NonceVerification,WordPress.Security.ValidatedSanitizedInput.InputNotSanitized $plugin_check = MainWP_Utility::get_sub_array_having( $plugins_to_checks, 'page', $page ); if ( ! empty( $plugin_check ) ) { $plugin_check = current( $plugin_check ); } if ( empty( $plugin_check ) ) { return; } // if is not overview extension page return. if ( isset( $_GET['tab'] ) && 'overview' !== $_GET['tab'] && 'dashboard' !== $_GET['tab'] ) { // phpcs:ignore WordPress.Security.NonceVerification,WordPress.Security.ValidatedSanitizedInput.InputNotSanitized return; } $plugin_slug = isset( $plugin_check['slug'] ) ? $plugin_check['slug'] : ''; $slug_pro = isset( $plugin_check['slug_pro'] ) ? $plugin_check['slug_pro'] : ''; $plugin_name = isset( $plugin_check['name'] ) ? $plugin_check['name'] : ''; if ( empty( $plugin_slug ) || empty( $plugin_name ) ) { return; } $check_slug = 'install_check_' . sanitize_text_field( wp_unslash( dirname( $plugin_slug ) ) ); $check_hidetime = MainWP_Utility::get_hide_notice_status( $check_slug ); if ( $check_hidetime && time() < $check_hidetime + 30 * DAY_IN_SECONDS ) { return; } $websites = MainWP_DB::instance()->query( MainWP_DB::instance()->get_sql_websites_for_current_user() ); if ( empty( $websites ) ) { return; } $missing_installed = array(); while ( $websites && $website = MainWP_DB::fetch_object( $websites ) ) { $site_name = $website->name; if ( '' !== $website->sync_errors ) { continue; } $not_found = true; if ( '' !== $website->plugins ) { $plugins = json_decode( $website->plugins, 1 ); if ( is_array( $plugins ) && ! empty( $plugins ) ) { foreach ( $plugins as $plugin ) { if ( isset( $plugin['slug'] ) && ( $plugin_slug === $plugin['slug'] || ( '' !== $slug_pro && $slug_pro === $plugin['slug'] ) ) ) { $not_found = false; break; // foreach. } } } } if ( $not_found ) { $missing_installed[ $website->id ] = $website->name; } } if ( empty( $missing_installed ) ) { return; } $items_list_id = 'sync-sites-status'; ?>