Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: functions.php


_ck_
Participant

@_ck_

You can emulate the functions.php in theme directories quite easily in 0.9

Put this into a regular plugin and I suggest naming it _functions.php with a leading underscore so you don’t even have to activate it. Install it and then when a functions.php is found inside the currently active theme, it will be loaded with the regular plugins. Since it’s so tiny, if you have a collection of mini-plugins you can just put it in there instead.

<?php
/*
Plugin Name: functions.php
*/
$template_functions_include = bb_get_active_theme_directory() . 'functions.php';
if ( file_exists( $template_functions_include ) ) { require_once( $template_functions_include ); }
?>

In theory you might even be able to put that code into the header.php inside of the templates if you are making a theme you want to distribute for 0.9

Skip to toolbar