Last active
June 14, 2026 08:59
-
-
Save dartiss/d0d117f251cf6b9bd750c19ec9377c23 to your computer and use it in GitHub Desktop.
WordPress fork detection
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * WordPress fork detection | |
| * | |
| * Check if a WordPress fork is in use. The check is a seperate function, instead of simply using the current function_exists | |
| * in case the method of detection needs to change. | |
| */ | |
| function is_fork() { | |
| $fork = false; | |
| if ( function_exists( 'calmpress_version' ) ) { $fork = 'calmPress'; } | |
| if ( function_exists( 'classicpress_version' ) ) { $fork = 'ClassicPress'; } | |
| if ( defined( 'COSMIC_VERSION' ) ) { $fork = 'CosmicWord'; } | |
| if ( defined( 'retraceur_version' ) ) { $fork = 'Retraceur'; } | |
| return $fork; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment