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 | assets/js/mainwp.js +24 -4 6.1.7 → 6.2.2 View file →
@@ -1498,12 +1498,14 @@
1498 1498 jQuery('.mainwp-backup-full-exclude').hide();
1499 1499 });
1500 1500 jQuery('.mainwp-checkbox-showhide-elements').on('click', function () {
1501 1501 let hiel = $(this).attr('hide-parent');
1502 - // support multi hide values.
1503 - hiel.split(';').forEach((hi) => {
1504 - mainwp_showhide_elements(hi, $(this).find('input').is(':checked'));
1505 - });
1502 + if (hiel !== undefined && hiel !== '') {
1503 + // support multi hide values.
1504 + hiel.split(';').forEach((hi) => {
1505 + mainwp_showhide_elements(hi, $(this).find('input').is(':checked'));
1506 + });
1507 + }
1506 1508 let hideEvent = $(this).attr('fire-event-parent') ?? '';
1507 1509 if (hideEvent != '') {
1508 1510 // to sure click events finished.
1509 1511 setTimeout(function () {
@@ -2408,8 +2410,21 @@
2408 2410 jQuery(document).on('click', '#mainwp_managesites_edit_test', function () {
2409 2411 mainwp_managesites_edit_test();
2410 2412 });
2411 2413
2414 + // Use detected URL (Edit Site Page): set the protocol and www selectors to the child-reported address; no autosave.
2415 + jQuery(document).on('click', '#mainwp_managesites_edit_use_detected', function () {
2416 + let scheme = jQuery(this).attr('data-scheme');
2417 + let with_www = jQuery(this).attr('data-www');
2418 + if (scheme === 'http' || scheme === 'https') {
2419 + jQuery('#mainwp_managesites_edit_siteurl_protocol').dropdown('set selected', scheme);
2420 + }
2421 + if (with_www === 'www' || with_www === 'none-www') {
2422 + jQuery('#mainwp-edit-site-edit-url-www').dropdown('set selected', with_www);
2423 + }
2424 + return false;
2425 + });
2426 +
2412 2427 // Handle submit add multi website
2413 2428 jQuery(document).on('click', '#mainwp_managesites_add_multi_site', function () {
2414 2429 let error_messages = [];
2415 2430 let has_table_data = false;
@@ -4231,13 +4246,18 @@
4231 4246
4232 4247 // Hide after installtion notices (PHP version, Trust MainWP Child, Multisite Warning and OpenSSL warning)
4233 4248 jQuery(document).on('click', '.mainwp-notice-dismiss', function () {
4234 4249 let notice_id = jQuery(this).attr('notice-id');
4250 + let shortterm = jQuery(this).attr('shortterm-notice');
4251 +
4235 4252 jQuery(this).closest('.ui.message').fadeOut("slow");
4236 4253 let data = {
4237 4254 action: 'mainwp_notice_status_update'
4238 4255 };
4239 4256 data['notice_id'] = notice_id;
4257 + if(shortterm === '1'){
4258 + data['short_term'] = 1;
4259 + }
4240 4260 jQuery.post(ajaxurl, mainwp_secure_data(data), function () { });
4241 4261 return false;
4242 4262 });
4243 4263