-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
I want to get the value of an option in the filter template in my plugin, but I get the following error: "Titan Framework Error: Wrong usage of getOption, this should be called inside a hook or from within a theme file."
<?php
$titan = TitanFramework::getInstance( PLUGIN_NAME );
// Create panels, options, etc.
function load_mobile_theme($theme) {
global $titan;
[...]
return $titan->getOption('mobile_theme');
}
add_filter('template', 'load_mobile_theme');
add_filter('option_template', 'load_mobile_theme');
add_filter('option_stylesheet', 'load_mobile_theme');
Metadata
Metadata
Assignees
Labels
No labels