Skip to content

Commit

Permalink
Fix: prevent issue with Hostgator
Browse files Browse the repository at this point in the history
  • Loading branch information
AleTorrisi committed Jan 14, 2025
1 parent 621716d commit cc37a3d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions includes/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ function toStudlyCase( $value ) {
/**
* Get styles path.
*
* return string
* return string
*/
function get_styles_path() {
return 'vendor/newfold-labs/wp-module-performance/styles/styles.css';
Expand Down Expand Up @@ -176,7 +176,7 @@ function get_scripts_path( $script_name = '' ) {
function is_settings_page() {

$current_url = ( isset( $_SERVER['HTTPS'] ) && 'on' === $_SERVER['HTTPS'] ? 'https' : 'http' ) .
'://' .
'://' .
( isset( $_SERVER['HTTP_HOST'] ) ? sanitize_text_field( wp_unslash( $_SERVER['HTTP_HOST'] ) ) : '' ) .
( isset( $_SERVER['REQUEST_URI'] ) ? sanitize_text_field( wp_unslash( $_SERVER['REQUEST_URI'] ) ) : '' );

Expand All @@ -188,7 +188,7 @@ function is_settings_page() {

parse_str( $parsedUrl['query'], $queryParams );

if ( ! isset( $queryParams['page'] ) || 'bluehost' !== $queryParams['page'] ) {
if ( ! isset( $queryParams['page'] ) || ! in_array( $queryParams['page'], array( 'bluehost', 'hostgator' ) ) ) {
return false;
}

Expand Down

0 comments on commit cc37a3d

Please sign in to comment.