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
<?php | |
//CUSTOM BLOCK RENDERING | |
function mytheme_block_render($module, $block_id) { | |
$block = block_load($module, $block_id); | |
$block_content = _block_render_blocks(array($block)); | |
$build = _block_get_renderable_array($block_content); | |
$block_rendered = drupal_render($build); | |
print $block_rendered; | |
} |
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
<?php | |
//DISABLE BLOCK CACHE | |
function mytheme_block_info_alter(&$blocks, $theme, $code_blocks) { | |
$blocks['addtoany']['addtoany_button']['cache'] = DRUPAL_NO_CACHE; | |
} |
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
//GETS ANY QUERYSTRING PARAMETER BY NAME | |
function getParameterByName(name) { | |
var match = RegExp('[?&]' + name + '=([^&]*)').exec(window.location.search); | |
return match && decodeURIComponent(match[1].replace(/\+/g, ' ')); | |
} |
NewerOlder