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 | |
function MYMODULE_form_bean_form_alter(&$form, &$form_state) { | |
// Hide the revision checkbox. | |
$form['revision']['is_new_revision']['#type'] = 'hidden'; | |
// Make "Create new revision" off by default | |
$form['revision']['is_new_revision']['#default_value'] = 0; | |
// Hide the revision log field. |
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
$preset = new stdClass(); | |
$preset->disabled = FALSE; /* Edit this to true to make a default preset disabled initially */ | |
$preset->api_version = 1; | |
$preset->name = 'flexslider'; | |
$preset->title = 'FlexSlider'; | |
$preset->html = '<div class="flexslider"> | |
<ul class="slides"> | |
{% for item in data %} | |
<li> | |
<img src="{{item.image}}" /> |
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
$preset = new stdClass(); | |
$preset->disabled = FALSE; /* Edit this to true to make a default preset disabled initially */ | |
$preset->api_version = 1; | |
$preset->name = 'liquid_slider'; | |
$preset->title = 'Liquid Slider'; | |
$preset->html = '<div class="liquid-slider" id="slider-id"> | |
{% for item in data %} | |
<div> | |
<h2 class="title">{{item.title}}</h2> | |
{{item.description|raw}} |
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 | |
function famiana_helper_field_widget_image_image_form_alter(&$element, &$form_state, $context) { | |
foreach (element_children($element) as $item) { | |
$element[$item]['#process'][] = 'famiana_helper_image_field_widget_process'; | |
} | |
} | |
function famiana_helper_image_field_widget_process($element, &$form_state, $form){ |
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 | |
// Add header to prevent cache on page. | |
drupal_add_http_header('Cache-Control', 'no-store, no-cache, must-revalidate, no-transform, max-age=0, post-check=0, pre-check=0'); | |
drupal_add_http_header('Pragma', 'no-cache'); | |
?> |
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
/* | |
* -------------------------------------------------------------------- | |
* EDITOR CONFIGURATION | |
* -------------------------------------------------------------------- | |
* | |
* Create default configuration settings, to be used by all Wygwam fields. | |
* See http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.config.html | |
* | |
*/ | |
CKEDITOR.editorConfig = function( config ) |
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 template_process_html(). | |
*/ | |
// Remove Query Strings from CSS filenames (CacheBuster) | |
function MYTHEME_process_html(&$variables) { | |
$variables['styles'] = preg_replace('/\.css\?.*"/','.css"', $variables['styles']); | |
} |
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 | |
function illuminate_example_page(){ | |
$loader = ComposerAutoloaderInitComposerManager::getLoader(); | |
$loader->add("Drupal\\illuminate_example\\Example", drupal_get_path("module", "illuminate_example") . "/lib"); | |
return "OK"; | |
} | |
?> |
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
/*Reference: http://www.aglobalway.com/content/drupal-ckeditor-configuration-work-bootstrap-theme*/ | |
/* Bootstrap Styles */ | |
/* Typography */ | |
{ name : 'span.H1' , element : 'span', attributes: { 'class': 'h1' } }, | |
{ name : 'span.H2' , element : 'span', attributes: { 'class': 'h2' } }, | |
{ name : 'span.H3' , element : 'span', attributes: { 'class': 'h3' } }, | |
{ name : 'span.H4' , element : 'span', attributes: { 'class': 'h4' } }, | |
{ name : 'span.H5' , element : 'span', attributes: { 'class': 'h5' } }, | |
{ name : 'span.H6' , element : 'span', attributes: { 'class': 'h6' } }, |