• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

getting current style?

Chris D

XenForo developer
Staff member
#2
The default style:
PHP:
$options = XenForo_Application::getOptions();
$styleId = $options->defaultStyleId;
The current style a visitor is using:
PHP:
$visitor = XenForo_Visitor::getInstance();
$styleId = $visitor->style_id;
 
#3
The default style:
PHP:
$options = XenForo_Application::getOptions();
$styleId = $options->defaultStyleId;
The current style a visitor is using:
PHP:
$visitor = XenForo_Visitor::getInstance();
$styleId = $visitor->style_id;
Thank you!