Skip to content

Instantly share code, notes, and snippets.

@knibals
Created April 25, 2013 10:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save knibals/5458748 to your computer and use it in GitHub Desktop.
Save knibals/5458748 to your computer and use it in GitHub Desktop.
Select a specific theme by IP address (may be useful when THEMERS work collaboratively with DEV people)
<?php
/**
* @file helpers.module
*/
/**
* Implements hook_custom_theme().
* Activer le theme uniquement pour le themer (par adresse IP)
*/
function themehelpers_custom_theme() {
if ($_SERVER['REMOTE_ADDR'] == '192.168.1.12' && arg('0') != 'admin') {
return 'kyziah';
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment