Created
August 6, 2012 18:53
-
-
Save vkareh/3277520 to your computer and use it in GitHub Desktop.
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
/** | |
* Implements hook_theme(). | |
*/ | |
function HOOK_theme($existing, $type, $theme, $path) { | |
return array( | |
'h2' => array( | |
'variables' => array('text' => NULL, 'args' => NULL), | |
), | |
); | |
} | |
/** | |
* Theme H2 tags | |
*/ | |
function theme_h2($variables) { | |
return '<h2>' . t($variables['text'], $variables['args']) . '</h2>'; | |
} | |
// Call the function like this: | |
theme('h2', 'Summary by database for user @username', array('@username' => $databases['user']->name)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment