Skip to content

Instantly share code, notes, and snippets.

@cliffordp
Created September 4, 2013 20:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cliffordp/6442670 to your computer and use it in GitHub Desktop.
Save cliffordp/6442670 to your computer and use it in GitHub Desktop.
Ways to check for PageLines Theme as active theme http://www.pagelinestheme.com/php-check-pagelines-theme/
<?php
if( function_exists('pl_has_editor') ){
//PageLines v3 (DMS) is the current theme
}
if( !function_exists('pl_has_editor') ){
//PageLines v3 (DMS) is NOT the current theme
}
<?php
if( function_exists('ploption') && !function_exists('pl_has_editor') ){
//PageLines v2 (Framework) is the current theme
}
<?php
// used in Action Map plugin ( https://github.com/pagelines/pagelines-action-map )
$dir = basename( get_template_directory() );
if ( 'pagelines' != $dir && 'dms' != $dir ){
//neither PageLines v2 (Framework) nor v3 (DMS) is the current theme
}
<?php
if( function_exists('ploption') ){
//PageLines v2 (Framework) or v3 (DMS) is the current theme
}
if( !function_exists('ploption') ){
//neither PageLines v2 (Framework) nor v3 (DMS) is the current theme
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment