PluginProbe
Hostinger Tools / 2.2.2
Hostinger Tools v2.2.2
3.0.77 3.0.76 3.0.75 3.0.74 3.0.73 3.0.72 3.0.71 3.0.70 3.0.69 3.0.68 3.0.67 3.0.66 1.8.1 1.8.2 1.8.3 1.9.1 1.9.4 1.9.5 1.9.6 1.9.7 1.9.8 1.9.9 2.0.0 2.0.1 2.0.4 All 108 releases
← All changes | includes/Hooks.php +6 -7 2.2.12.2.2 View file →
@@ -10,21 +10,20 @@
10 10 add_action( 'init', array( $this, 'check_url_and_flush_rules' ) );
11 11 }
12 12
13 13 public function check_url_and_flush_rules() {
14 - $https = isset( $_SERVER['HTTPS'] ) && $_SERVER['HTTPS'] === 'on' ? "https" : "http";
15 - $host = sanitize_text_field( wp_unslash( $_SERVER['HTTP_HOST'] ) );
16 - $request_uri = sanitize_text_field( wp_unslash( $_SERVER['REQUEST_URI'] ) );
14 + if ( defined( 'DOING_AJAX' ) && \DOING_AJAX ) {
15 + return false;
16 + }
17 17
18 - $current_url = $https . "://" . $host . $request_uri;
19 - $url_components = parse_url( $current_url );
18 + $current_url = home_url( add_query_arg( null, null ) );
19 + $url_components = wp_parse_url( $current_url );
20 20
21 21 if ( isset( $url_components['query'] ) ) {
22 22 parse_str( $url_components['query'], $params );
23 23
24 24 if ( isset( $params['app_name'] ) ) {
25 - $app_name = sanitize_text_field( urldecode( $params['app_name'] ) );
26 - $app_name = str_replace( '+', ' ', $app_name );
25 + $app_name = sanitize_text_field( $params['app_name'] );
27 26
28 27 if ( $app_name === 'Omnisend App' ) {
29 28 if ( function_exists( 'flush_rewrite_rules' ) ) {
30 29 flush_rewrite_rules();