site()

Returns the site object in any situation

  • return ($site)

Example

<?php echo site()->title() ?>