Skip to content

Bundling in a theme

scribu edited this page Feb 26, 2013 · 4 revisions

For a theme, this is how the load.php file should look like:

<?php
// scbFramework
require dirname(__FILE__) . '/scb/load.php';

scb_init( '_my_theme_after_scb_loaded' );

function _my_theme_after_scb_loaded() {
	if ( function_exists( 'p2p_register_connection_type' ) )
		return;

	// TODO: replace APP_TD with your textdomain
	define( 'P2P_TEXTDOMAIN', APP_TD );

	require_once dirname( __FILE__ ) . '/p2p-core/init.php';

	// TODO: replace 'appthemes_first_run' with a hook that runs when the theme is activated
	add_action( 'appthemes_first_run', array( 'P2P_Storage', 'install' ) );
}

You can then require the load.php file from your functions.php.

Clone this wiki locally