The PHP framework of Granola is segmented in to three folders and two root files

  • core/
  • plugin/
  • wordpress/
  • granola.php
  • config.php

Largely, the files within the folders don’t need much modification on a project by project basis, and nor does the granola.php. The config.php file though does change. config.php allows for customisation of WordPress settings, as well as registration of menus, image sizes, ACF options pages, colors for Gutenberg, and more. Largely though, most users will interact with functions registered in the theme folder.

There are three functions defined in the themes function folder that will get more use than any other throughout the code base, they are \Granola\render, Granola\image, and \Granola\svg. These three functions facilitate the inclusion of php files and image files (in the form of an img tag or the inclusion of the source code).