Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions includes/lite-site/class-lite-site.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ class Lite_Site {
* Initialize the lite site functionality
*/
public static function init() {
// The standalone Newspack Lite Site plugin supersedes this module, so skip initialization to avoid conflicts.
if ( defined( 'NEWSPACK_LITE_SITE_PLUGIN_FILE' ) ) {
return;
}

// Only register rewrite rules if the feature is enabled.
if ( self::is_enabled() ) {
add_action( 'init', [ __CLASS__, 'register_rewrite_rules' ] );
Expand Down Expand Up @@ -525,5 +530,4 @@ function gtag(){dataLayer.push(arguments);}
}
}

// Initialize the class.
Lite_Site::init();
add_action( 'plugins_loaded', [ Lite_Site::class, 'init' ] );
Loading