PluginProbe
Elementor Website Builder – more than just a page builder / 3.20.2
Elementor Website Builder – more than just a page builder v3.20.2
4.3.0-beta2 4.3.0-beta1 4.2.4 4.2.3 4.2.2 4.2.1 4.2.0 4.1.5 4.2.0-beta2 4.2.0-dev2 4.2.0-beta1 4.1.4 4.1.3 4.1.2 4.1.1 4.1.0 4.1.0-beta3 4.1.0-dev3 4.0.9 4.1.0-beta2 4.1.0-dev2 4.0.8 4.1.0-beta1 4.1.0-dev1 4.0.7 All 451 releases
← All changes | core/common/modules/ajax/module.php +11 -2 4.1.43.20.2 View file →
@@ -265,10 +265,19 @@
265 265 while ( ob_get_status() ) {
266 266 ob_end_clean();
267 267 }
268 268
269 - header( 'Content-Type: application/json; charset=UTF-8' );
270 - echo $json; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
269 + if ( function_exists( 'gzencode' ) ) {
270 + $response = gzencode( $json );
271 +
272 + header( 'Content-Type: application/json; charset=utf-8' );
273 + header( 'Content-Encoding: gzip' );
274 + header( 'Content-Length: ' . strlen( $response ) );
275 +
276 + echo $response; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
277 + } else {
278 + echo $json; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
279 + }
271 280
272 281 wp_die( '', '', [ 'response' => null ] );
273 282 }
274 283