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_preprocess_entity(). | |
*/ | |
function module_name_profile_preprocess_entity(&$vars) { | |
switch ($vars['entity_type']) { | |
case 'profile2': | |
// Use different template | |
$vars['theme_hook_suggestions'][] = "profile2__profile__{$vars['view_mode']}"; |
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 | |
/** | |
* Returns TRUE if current page is correct. | |
* | |
* @return bool | |
*/ | |
function _is_correct_page() { | |
$result =& drupal_static(__FUNCTION__); | |
if (!isset($result)) { |
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_preprocess_html(). | |
*/ | |
function hook_preprocess_html(&$vars) { | |
$vars['theme_hook_suggestion'] = 'html__custompage'; | |
} |
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_theme_registry_alter(). | |
*/ | |
function hook_theme_registry_alter(&$registry) { | |
$path = drupal_get_path('module', 'my_module') . '/templates'; | |
$registry += drupal_find_theme_templates($registry, '.tpl.php', $path); | |
} |
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_libraries_info(). | |
*/ | |
function module_name_libraries_info() { | |
$libraries['jquery_easy_confirm_dialog'] = array( | |
'name' => 'Jquery easy confirm dialog plugin', | |
'vendor url' => 'http://www.projectshadowlight.org/jquery-easy-confirm-dialog/', | |
'download url' => 'http://github.com/wiggin/jQuery-Easy-Confirm-Dialog-plugin/raw/master/jquery.easy-confirm-dialog.js', | |
'version arguments' => array( |