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
/** | |
* @file | |
* Fires Optimizely custom events when certain conditions are met. | |
* Knows which events to fire based on values in drupalSettings.optimizely_custom_events array which is populated in mb.module. | |
* | |
*/ | |
(function () { | |
Drupal.behaviors.optimizely_custom_events = { | |
attach: function () { |
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
// Load plugins | |
var | |
autoprefixer = require("autoprefixer"), // CSS vendor prefixes | |
cssnano = require("cssnano"), // Minify CSS | |
postcss = require("gulp-postcss"), // PostCSS | |
concat = require("gulp-concat"), // Combine files | |
gulp = require("gulp"), | |
gulpSass = require('gulp-sass')(require('sass')), // Compile Sass | |
inlineImage = require("gulp-inline-image"), // Allow for base64 icons via inline-image() | |
rename = require("gulp-rename"), // Rename files |
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
$entity_storage = \Drupal::entityTypeManager()->getStorage('paragraph'); | |
$query = \Drupal::entityQuery('paragraph') | |
->condition('type', "paragraph_type_machine_name") | |
->accessCheck(false); | |
$results = $query->execute(); | |
$hosted_paragraphs_found = []; |
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
/** | |
* Avalanche forecast Shortcode Callback | |
* | |
* @return string HTML containing the avalanche forecast image or an error message. | |
*/ | |
function shortcode_avalanche_forecast() { | |
// First check the cache. | |
if ( $cached_value = get_transient("avalanche_forecast") ) { | |
return $cached_value; | |
} |