Theme.php
public function init($production = false)
    {
        setTheme($this);

        do_action("before_theme_setup");

        # Set mode
        $this->production = $production;

        # Set some other params
        $this->is_ajax = defined('DOING_AJAX') && DOING_AJAX;
        $this->is_post_req = $_SERVER['REQUEST_METHOD'] == 'POST';
        $this->theme_dir = get_template_directory();

        # Load extensions
        do_action("before_theme_autoload_modules");
        if (THEME_AUTOLOAD_MODULES):
            $this->autoLoadModules();
        endif;
        do_action("after_theme_autoload_modules");

        # Register wrappers
        do_action("before_theme_register_wrappers");
        do_action("on_theme_register_wrappers");
        do_action("after_theme_register_wrappers");

        # Register sections
        do_action("before_theme_register_sections");
        do_action("on_theme_register_sections");
        do_action("after_theme_register_sections");

        do_action("after_theme_setup");
    }
public function init($production = false)
    {
        setTheme($this);

        do_action("before_theme_setup");

        # Set mode
        $this->production = $production;

        # Set some other params
        $this->is_ajax = defined('DOING_AJAX') && DOING_AJAX;
        $this->is_post_req = $_SERVER['REQUEST_METHOD'] == 'POST';
        $this->theme_dir = get_template_directory();

        # Load extensions
        do_action("before_theme_autoload_modules");
        if (THEME_AUTOLOAD_MODULES):
            $this->autoLoadModules();
        endif;
        do_action("after_theme_autoload_modules");

        # Register wrappers
        do_action("before_theme_register_wrappers");
        do_action("on_theme_register_wrappers");
        do_action("after_theme_register_wrappers");

        # Register sections
        do_action("before_theme_register_sections");
        do_action("on_theme_register_sections");
        do_action("after_theme_register_sections");

        do_action("after_theme_setup");
    }
Init theme

@param bool $production True false to enable caching if cache module is enabled