18.10.2016 Views

Drupal 7 Module Development

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Theming a <strong>Module</strong><br />

}<br />

// Theme the username.<br />

$variables['name'] = theme('username', array(<br />

'account' => $variables['user']));<br />

And finally, we'll pass the $user object of the author and theme the username.<br />

All that's left is to order the variables the way we desire in our template file!<br />

However, since we've made the last change to our .module file, let's look at the<br />

finished product:<br />

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!