Created
July 16, 2014 19:50
-
-
Save iamcarrico/eedef182edfe5fd32c5d to your computer and use it in GitHub Desktop.
Silly way to add a redirect
This file contains 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
name = Your module name | |
description = Just adds that incredibly silly mobile redirect code. | |
core = 7.x | |
version = 7.x-1.0 |
This file contains 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 | |
/** | |
* Implements hook_page_build(). | |
*/ | |
function your_module_page_build() { | |
if (drupal_is_front_page()) { | |
drupal_add_js('http://example.com/example.js', 'external'); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment