wordpress functions.php factory