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 a constant to use with html emails | |
define("HTML_EMAIL_HEADERS", array('Content-Type: text/html; charset=UTF-8')); | |
// @email - Email address of the reciever | |
// @subject - Subject of the email | |
// @heading - Heading to place inside of the woocommerce template | |
// @message - Body content (can be HTML) | |
function send_email_woocommerce_style($email, $subject, $heading, $message) { |
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
# 1. Install brew --> http://brew.sh/ | |
# 2. run the following commands in your Terminal | |
brew tap homebrew/dupes | |
brew tap homebrew/versions | |
brew tap homebrew/homebrew-php | |
brew install --with-openssl curl | |
brew install --with-homebrew-curl --with-apache php71 | |
brew install php71-mcrypt php71-imagick | |
# 3. Follow these instructions to make Apache and php-cli use the newer php executable and make the change persist after reboot. | |
brew info php71 |
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(document) { | |
// Object to store new query params, | |
// the current ones will be replaced, | |
// new ones will be added to the url | |
var newParams = { | |
'recall-ui': '', | |
'lambda-return-code': '', | |
'recall-outcome': '', | |
'recall-outcome-detail': '', |
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(err, html) { | |
let outputFolder = path.resolve('output'); | |
// Check if folder does not exist | |
if ( !fs.existsSync(outputFolder) ) { | |
// Create folder | |
fs.mkdirSync(outputFolder); | |
} | |
// Write html output to file |
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
// Create express server | |
const app = express(); | |
// Create nunjucks fileloader instance for the views folder | |
const nunjucksFileLoader = new nunjucks.FileSystemLoader(path.resolve('/path/to/views/folder'), { | |
noCache: true, | |
}); | |
// Create a nunjucks instance to be used for the view engine | |
// This instance can be used to add filters and globals |
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
{# Import macros for global use in all views #} | |
{% set components = {} %} | |
{% for component in macroFilePaths %} | |
{% import component as temp %}{% set macro = _.assign(components, temp) %} | |
{% endfor %} | |
{# end #} |
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
{% macro button(text='', url=false, start=false, disabled=false) %} | |
{% set disabledCode = 'disabled="disabled" aria-disabled="true"' %} | |
{% if url %} | |
<a class="button {{ 'button-start' if start }}" href="{{ url }}" role="button">{{ text }}</a> | |
{% else %} | |
<input class="button" type="submit" value="{{ text }}" {{ disabledCode if disabled }}> | |
{% endif %} | |
{% endmacro %} |
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
@mixin ie-lte($version) { | |
@if & { | |
.lte-ie#{$version} & { | |
@content; | |
} | |
} @else { | |
.lte-ie#{$version} { | |
@content; | |
} | |
} |
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
<!DOCTYPE html> | |
<!--[if lte IE 8 ]><html class="lte-ie8" lang="en"><![endif]--> | |
<!--[if IE 9 ]><html class="ie9" lang="en"><![endif]--> | |
<!--[if (gt IE 9)|!(IE)]><!--><html class="" lang="en"><!--<![endif]--> |
OlderNewer