+
+# upgrade db (only) on special trigger (assures only one upgrade at a time)
+if (isset($_SERVER['HTTP_X_UPGRADE_DB_NOW'])) {
+ require_once(DOCROOT . 'inc/db_upgrade.php');
+ db_upgrade();
+}
+
+# paypal_ipn.php calls these when it receives a valid payment
+$GLOBALS['payment_handlers'] = [
+ # the key (below) must be the first word in the paypal variable "custom"
+ # the file will be run with wfpl's file_run()
+ # example:
+ #'membership' => DOCROOT . 'inc/payment_membership.php'
+];
+
+$GLOBALS['email_templates'] = [
+ 'backend_bug' => [
+ 'title' => "Notification for site programmer(s)",
+ 'description' => "This email template is used if/when the back-end code of this site encounters an unusual/suspicious situation that it's not sure how to cope with.",
+ 'variables' => [
+ ['details', "details about the unusual/suspicious situation"]
+ ],
+ 'subject' => "backend alert",
+ 'content' => "Hi developer,\n\nPlease investigate the following debugging message from the site:\n\n~details~",
+ 'from_addr' => 'noreply@example.com',
+ 'to_addr' => 'fixme@example.com' # not all templates need this field
+ ]
+ # ...
+];