TitanFramework::__construct PHP Method

__construct() public method

Creates a new TitanFramework object
Since: 1.0
public __construct ( string $optionNamespace )
$optionNamespace string The namespace to get options from.
    function __construct($optionNamespace)
    {
        // Set current blog
        $this->blogId = get_current_blog_id();
        // Clean namespace.
        $optionNamespace = str_replace(' ', '-', trim(strtolower($optionNamespace)));
        $this->optionNamespace = $optionNamespace;
        $this->settings = $this->defaultSettings;
        do_action('tf_init', $this);
        do_action('tf_init_' . $this->optionNamespace, $this);
        $this->cssInstance = new TitanFrameworkCSS($this);
        add_action('admin_enqueue_scripts', array($this, 'loadAdminScripts'));
        add_action('tf_create_option_' . $this->optionNamespace, array($this, 'rememberAllOptions'));
        add_filter('tf_create_option_continue_' . $this->optionNamespace, array($this, 'removeChildThemeOptions'), 10, 2);
        // Create a save option filter for customizer options.
        add_filter('pre_update_option', array($this, 'addCustomizerSaveFilter'), 10, 3);
    }