Skip to content

Commit

Permalink
Improved constant check
Browse files Browse the repository at this point in the history
* improved constant check.
  • Loading branch information
andrewlimaza committed Jan 18, 2024
1 parent 175c80e commit ead530d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pmpro-network-subsite.php
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ function pmpro_multisite_get_parent_site_pages() {
global $pmpro_pages;

// Only if the constant is defined try to rewrite.
if ( ! defined( 'PMPRO_MULSITIE_REWRITE_URLS' ) ) {
if ( ! defined( 'PMPRO_MULSITIE_REWRITE_URLS' ) || ! PMPRO_MULSITIE_REWRITE_URLS ) {
return;
}

Expand All @@ -192,7 +192,7 @@ function pmpro_multisite_pmpro_url( $url, $page, $querystring, $scheme ) {
global $pmpro_pages;

// Only if the constant is defined try to rewrite URLS.
if ( ! defined( 'PMPRO_MULSITIE_REWRITE_URLS' ) ) {
if ( ! defined( 'PMPRO_MULSITIE_REWRITE_URLS' ) || ! PMPRO_MULSITIE_REWRITE_URLS ) {
return $url;
}

Expand All @@ -211,7 +211,7 @@ function pmpro_multisite_pmpro_url( $url, $page, $querystring, $scheme ) {
}
return $url;
}
// add_filter( 'pmpro_url', 'pmpro_multisite_pmpro_url', 10, 4 );
add_filter( 'pmpro_url', 'pmpro_multisite_pmpro_url', 10, 4 );


/**
Expand Down

0 comments on commit ead530d

Please sign in to comment.