你如何扩展Themosis helpers.php函数?

How can you extend the functions in the Themosis Core -> helpers.php file?

I am wanting to override the following:

if (! function_exists('csrf_field')) {
    /**
     * Generate a CSRF token form field.
     *
     * @return HtmlString
     */
    function csrf_field()
    {
        return new HtmlString('<input type="hidden" name="_token" value="'.csrf_token().'">');
    }
}

So that if varnish is defined as enable it changes to use a edge side include to put the token on the page?

But don't know where in the application structure I can overwrite this function.

Thanks

Just add a function with the same name to your functions.php

function csrf_field(){
    return new HtmlString('<input type="hidden" name="_token" value="'.csrf_token().'">');
}

and make your changes.