INN/Largo — pull request #124 by drywall (2013-11-12 14:28:09+00:00)
Title: Metabox api, revised

Slight re-architecting of things. The metabox API itself is unchanged, but I changed how it's included. The new approach relies on a separate and new largo-apis.php file to bring in the metabox-api. This is because child themes will need to access the API in their functions.php files, but due to how WP loads parent/child files, Largo's functions.php won't have been loaded when a child's functions.php is called.

This solution allows us to separate out the metabox-api file (and any others we wind up with, such as homepage templates) so that it can be included in a child theme without loading all of the Largo functions, by putting this atop the child's functions.php:

require_once( get_template_directory() . '/largo-apis.php' );