Hi @ruebot: A few weeks back, you posted in the Islandora IRC asking if it was legal to use a custom PHP function to set the value of a constant (like I've done here). I've been trying to find an official answer to that question; but unfortunately, nothing I've read seems to address the issue directly. That said, I have found a few examples that give the impression that it's okay to do this (see below).

The official WordPress documentation contains [this line of code -- as well as more complex examples](http://codex.wordpress.org/Editing_wp-config.php#Additional_Defined_Constants "Editing wp-config.php: Additional Defined Constants"): `define('STYLESHEETPATH', get_stylesheet_directory());` The value of the constant is being set by a [custom function](http://codex.wordpress.org/Function_Reference/get_stylesheet_directory "Function Reference/get stylesheet directory") created by WordPress, similar to what I'm doing here. I've also seen more than [one tutorial](http://www.tuxradar.com/practicalphp/3/11/0 "TuxRadar: Constants") where the `time()` function is being used to set constant values. I've even encountered code snippets where the constant is defined by an equation -- or by an if/else statement! It's possible that as long as the returned value is a string, integer, or boolean, this type of pre-processing is okay.

I can confirm that this code works not only on my Windows installation, but also on my Islandora VM (Ubuntu), which has been updated to 7.x-1.3.