Skip to content

Instantly share code, notes, and snippets.

@cliffordp
Created September 4, 2013 20:48
Show Gist options
  • 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