Child theme option constants

<?php

/* ~~~~~~~~~~~~~ Theme Option Constants ~~~~~~~~~~~~~ */
//Overwrite in child theme functions.php by defining individually or using ter_define_constants()
ter_define_constants(array(
'TER_CONSTANT1' => true,
'TER_CONSTANT2' => 'editor',
'TER_CONSTANT3' => 950
));

/* Define Constants: */
function ter_define_constants($constants){
foreach($constants as $key => $value){
if(!defined($key)) define($key,$value);
}
}

?>

0 Comments

You must be logged in to post a comment.