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 | |
define('DRUPAL_ROOT', getcwd()); | |
require_once DRUPAL_ROOT . '/includes/bootstrap.inc'; | |
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL); | |
drupal_flush_all_caches(); | |
?> |
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
SELECT | |
CONCAT('TRUNCATE TABLE ', TABLE_SCHEMA, '.', TABLE_NAME, ';') AS table_name | |
FROM information_schema.TABLES | |
WHERE TABLE_SCHEMA = '{db_name}' | |
AND TABLE_NAME LIKE 'cache_%' | |
AND TABLE_TYPE = 'BASE 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
/** | |
* Implements hook_node_view(). | |
*/ | |
function HOOK_node_view($node, $view_mode, $langcode) { | |
if ($node->type == 'TYPE') { | |
$breadcrumb = array(); | |
$breadcrumb[] = l(t('Home'), '<front>'); | |
$breadcrumb[] = l(drupal_get_title(), current_path()); | |
drupal_set_breadcrumb($breadcrumb); | |
} |
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
/** | |
* Implements hook_views_pre_render(). | |
*/ | |
function HOOK_views_pre_render(&$view) { | |
if ($view->name == 'NAME') { | |
$breadcrumb = array(); | |
$breadcrumb[] = l(t('Home'), '<front>'); | |
$breadcrumb[] = l(drupal_get_title(), current_path()); | |
drupal_set_breadcrumb($breadcrumb); | |
} |
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
// ---- | |
// Sass (v3.2.14) | |
// Compass (v0.12.3) | |
// Breakpoint (v2.0.7) | |
// ---- | |
@import "breakpoint"; | |
@import "compass"; | |
// $breakpoint-no-queries: false; |
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
/** | |
* Implements hook_css_alter(). | |
*/ | |
function MY_THEME_css_alter(&$css) { | |
/* Remove some default Drupal css */ | |
$exclude = array( | |
'modules/aggregator/aggregator.css' => FALSE, | |
'modules/block/block.css' => FALSE, | |
'modules/book/book.css' => FALSE, |
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
/** | |
* Override or insert variables into the html template. | |
* | |
* @param $variables | |
* An array of variables to pass to the theme template. | |
* @param $hook | |
* The name of the template being rendered. This is usually "html", but can | |
* also be "maintenance_page" since zen_preprocess_maintenance_page() calls | |
* this function to have consistent variables. | |
*/ |
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
$('#div').css({'display':'block', 'opacity':'0'}) | |
.animate({'opacity':'1','height':'300px'}, 1500); |
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
input[type=text], textarea { | |
-webkit-transition: all 0.30s ease-in-out; | |
-moz-transition: all 0.30s ease-in-out; | |
-ms-transition: all 0.30s ease-in-out; | |
-o-transition: all 0.30s ease-in-out; | |
outline: none; | |
padding: 3px 0px 3px 3px; | |
margin: 5px 1px 3px 0px; | |
border: 1px solid #DDDDDD; | |
} |
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
/** | |
* Get a field from a node object. | |
* Sometimes the node has a language identifier on the field, sometimes it does | |
* not. | |
*/ | |
function _THEME_NAME_get_field($node, $field_name) { | |
if (isset($node->{$field_name}[0])) { | |
return $node->{$field_name}; | |
} | |
else { |