Skip to content

Instantly share code, notes, and snippets.

@dartiss
Last active June 14, 2026 08:59
Show Gist options
  • Select an option

  • Save dartiss/d0d117f251cf6b9bd750c19ec9377c23 to your computer and use it in GitHub Desktop.

Select an option

Save dartiss/d0d117f251cf6b9bd750c19ec9377c23 to your computer and use it in GitHub Desktop.
WordPress fork detection
<?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