Actions

'battlecat/loaded'

Returns true if the battlecat is loaded.

Usage

\add_action('battlecat/loaded', function() {
    // do something if battlecat is loaded
});

'battlecat/pre/init'

Called before the battlecat is initialized.

Usage

\add_action('battlecat/pre/init', function() {
    // do something before battlecat is initalized
});

'battlecat/init'

Called when the battlecat is initialized.

Usage

\add_action('battlecat/init', function() {
    // do something when battlecat is initalized
});

'battlecat/init/module'

Modules hook into this action.

Usage

/**
 * Setup the taxonomy-module.
 *
 * * @hooked battlecat/init/module
 *
 * @return null|\Gnist\BattleCat\Modules\Taxonomy\Plugin
 */
public function include_taxonomy() {
	$deprecated = (array) \bc_module( 'taxonomy' );
 
	if ( ! empty( $deprecated ) ) {
		return null;
	}
 
	return \Gnist\BattleCat\Modules\Taxonomy\Plugin::get_instance();
}
 
\\add_action( 'battlecat/init/module', 'include_taxonomy', 5, 0 );

'battlecat/setup_theme'

The main action used for executing code before the theme has been setup. @Hooked setup_theme

Usage

\add_action('battlecat/setup_theme', function() {
    // do something before the theme is setup
});

'battlecat/wp_head'

The main action used for executing code in the wp_head hook. @Hooked wp_head

Usage

\add_action('battlecat/wp_head', function() {
    // do something in wp_head
});