If you’re in the view and you want to use a function that’s part of your controller object, you can get at it by using $this->controller->function_name(vars); This is exactly how it should be, but is not really in the documentation.
Copy and paste this URL into your WordPress site to embed
Copy and paste this code into your site to embed