PluginProbe
WP-Optimize – Cache, Compress images, Minify & Clean database to boost page speed & performance / 4.7.0
WP-Optimize – Cache, Compress images, Minify & Clean database to boost page speed & performance v4.7.0
4.7.0 4.6.1 4.6.0 4.5.5 4.5.4 4.5.3 4.5.2 3.2.20 3.2.21 3.2.22 3.2.3 3.2.5 3.2.6 3.2.7 3.2.9 3.3.0 3.3.1 3.3.2 3.4.0 3.4.1 3.4.2 3.5.0 3.6.0 3.7.0 3.7.1 All 111 releases
← All changes | js/heartbeat.js +5 -2 3.4.1 → 4.7.0 View file →
@@ -69,9 +69,9 @@
69 69 } catch(e) {
70 70 response = data.callbacks[uid];
71 71 }
72 72
73 - if ('undefined' != typeof(response.result) && false === response.result) {
73 + if ('undefined' != typeof(response.result) && false === response.result && ('undefined' == typeof(response.skip_notice) || false === response.skip_notice)) {
74 74 wp_optimize.notices.show_notice(response.error_code, response.error_message);
75 75 } else {
76 76 if ('undefined' !== typeof(WP_Optimize_Heartbeat_Agents[uid]) && WP_Optimize_Heartbeat_Agents[uid].callback instanceof Function) {
77 77 WP_Optimize_Heartbeat_Agents[uid].callback(response);
@@ -133,11 +133,14 @@
133 133 * @returns {boolean}
134 134 */
135 135 function do_agents_match(agent1, agent2) {
136 136 var command_matches = agent1.command === agent2.command;
137 + var subaction1 = agent1.command_data && agent1.command_data.subaction ? agent1.command_data.subaction : undefined;
138 + var subaction2 = agent2.command_data && agent2.command_data.subaction ? agent2.command_data.subaction : undefined;
139 + var subaction_matches = subaction1 === subaction2;
137 140 var command_not_sent_yet = false === agent1.sent;
138 141
139 - return command_matches && command_not_sent_yet;
142 + return command_matches && subaction_matches && command_not_sent_yet;
140 143 }
141 144
142 145 /**
143 146 * Add a heartbeat agent that will be sent to backend and has a callback to receive the response