Created
January 12, 2014 19:09
-
-
Save mjordan/8389001 to your computer and use it in GitHub Desktop.
Example Drupal / Islandora preprocess function
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Preprocess function to format and sanitize output before | |
* sending it to the template. | |
* | |
* @param array &$variables | |
*/ | |
function template_preprocess_mymodule_hello(&$variables) { | |
$variables['title'] = check_plain($variables['title']); | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment