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
/* Unset jquery, add back in the upgraded version, compatible with Bootstrap */ | |
/* since this happens at the theme level, Drupal's admin theme can use the old version */ | |
function THEMENAME_js_alter(&$javascript) { | |
unset($javascript['misc/jquery.js']); | |
} | |
function THEMENAME_preprocess_page(&$variables,$hook) { | |
/* Unset jquery, add back in the upgraded version, compatible with Bootstrap */ | |
/* since this happens at the theme level, Drupal's admin theme can use the old version */ | |
drupal_add_js(drupal_get_path('theme', 'THEMENAME') . '/assets/js/vendor/jquery/1.7/jquery.min.js', array('group' => -200, 'weight' => -100)); |
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
global $user; | |
$cart = commerce_cart_order_load($user->uid); | |
if($cart) { | |
$line = commerce_line_item_load($cart->commerce_line_items['und'][0]['line_item_id']); | |
$product = commerce_product_load($line->commerce_product['und'][0]['product_id']); | |
$sku = $product->sku; | |
dpm($sku); | |
} |
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
function hook_block_configure($delta = '') { | |
$form['image'] = array( | |
'#title' => t('Image'), | |
'#type' => 'managed_file', | |
'#description' => t('The uploaded image will be displayed on this page using the image style choosen below.'), | |
'#upload_location' => 'public://header_blocks/', | |
); | |
} |
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
convert mysql from innodb to myisam |
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
<script> | |
$('.tooltip').children('.tooltip-tooltip').append('<span class="tooltip-pointer"></span>'); | |
$('.tooltip').hoverIntent(function() { | |
var body = $(this).children('.tooltip-tooltip'); | |
bodyHeight = -(body.height() - 20); | |
bodyWidth = -(body.width() / 2); | |
body.css('top', bodyHeight); | |
body.css('left', bodyWidth); | |
body.show(); | |
}, function() { |
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
.fluid-grid-2 { | |
list-style: none; | |
padding-left: 0; | |
*zoom: 1; | |
max-width: 58.75em; | |
margin-left: auto; | |
margin-right: auto; } | |
.fluid-grid-2:before, .fluid-grid-2:after { | |
content: " "; | |
display: table; } |
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
function qhr_menu_block_tweaks_menu_block_tree_alter(&$tree, &$config) { | |
foreach ($tree as $key => $item) { | |
if (isset($item['below'])) { | |
foreach($item['below'] as $id => $below) { | |
if (isset($below['link']['link_path']) && $below['link']['link_path'] === '<view>') { | |
$below['link']['hidden'] = true; | |
$tree[$key]['below'][$id] = $below; | |
} | |
} | |
} |
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
function qhr_menu_block_tweaks_menu_block_tree_alter(&$tree, &$config) { | |
foreach ($tree as $key => $item) { | |
if (isset($item['below'])) { | |
foreach($item['below'] as $id => $below) { | |
if (isset($below['link']['link_path']) && $below['link']['link_path'] === '<view>') { | |
$below['link']['hidden'] = true; | |
$tree[$key]['below'][$id] = $below; | |
} | |
} | |
} |
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 | |
/* @begin - Blocks */ | |
function liveschool_block_info() { | |
$blocks = array(); | |
$blocks['any_device'] = array( | |
'info' => t('Any Device, Anywhere.'), | |
'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
foreach($form['edit_delete'] as $index => $contents) { | |
if(is_numeric($index) && is_array($contents)) { | |
$form['edit_delete'][$index]['#value'] = 'X'; | |
} | |
} |
OlderNewer