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
'use strict'; | |
(function () { | |
Date.prototype.subDays = function(days) { | |
date = new Date(this.valueOf()) | |
date.setDate(date.getDate() - days) | |
return date | |
} | |
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
// case [[1,2,[3]],4] | |
// case [[1, 2],[3, 4, 5], [6, 7, 8, 9]]; | |
var array = [[1, 2],[3, 4, 5], [6, 7, 8, 9]]; | |
function flattenArray(value) { | |
const stack = [...value]; | |
const res = []; |
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 loadjscssfile(filename, filetype) { | |
if (filetype == "js") { //if filename is a external JavaScript file | |
var fileref = document.createElement('script') | |
fileref.setAttribute("type", "text/javascript") | |
fileref.setAttribute("src", filename) | |
} else if (filetype == "css") { //if filename is an external CSS file | |
var fileref = document.createElement("link") | |
fileref.setAttribute("rel", "stylesheet") | |
fileref.setAttribute("type", "text/css") |
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
UPDATE wp_options SET option_value = replace(option_value, 'Existing URL', 'New URL') WHERE option_name = 'home' OR option_name = 'siteurl'; | |
UPDATE wp_posts SET post_content = replace(post_content, 'Existing URL', 'New URL'); | |
UPDATE wp_postmeta SET meta_value = replace(meta_value,'Existing URL','New URL'); | |
UPDATE wp_usermeta SET meta_value = replace(meta_value, 'Existing URL','New URL'); | |
UPDATE wp_links SET link_url = replace(link_url, 'Existing URL','New URL'); |
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
{ | |
"id":4342845472823, | |
"title":"Sham", | |
"handle":"sham", | |
"description":"", | |
"published_at":"2019-11-09T21:49:00-05:00", | |
"created_at":"2019-11-09T22:06:26-05:00", | |
"vendor":"B2B Kassatex", | |
"type":"Bedding", | |
"tags":[ |
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 class="product-template__container page-width" | |
id="ProductSection-{{ section.id }}" | |
data-section-id="{{ section.id }}" | |
data-section-type="product" | |
data-enable-history-state="true" | |
data-ajax-enabled="{{ settings.enable_ajax }}" | |
> | |
{% assign products = product.metafields.global.grid-products | split: "," %} | |
{% assign variants = '' | split: '' %} |
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
{%- assign _section = section.settings -%} | |
{%- comment -%} Style of Section {%- endcomment -%} | |
{%- if _section.color != blank -%} | |
<style type="text/css"> | |
.section-image[data-section-id="{{ section.id }}"] .section__title, | |
.section-image[data-section-id="{{ section.id }}"] .section__subtitle, | |
.section-image[data-section-id="{{ section.id }}"] .btn--link | |
{ | |
color: {{ _section.color }}; |
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
/** | |
* The module dependencies. | |
*/ | |
const del = require('del'); | |
const path = require('path'); | |
const gulp = require('gulp'); | |
const sass = require('gulp-sass'); | |
const utils = require('./utils'); | |
const gulpif = require('gulp-if'); | |
const rename = require('gulp-rename'); |
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 { isTouchDevice } from './detect-touch-device'; | |
const $win = $(window); | |
const $doc = $(document); | |
const $navDropdownParent = $('.nav .has-dropdown'); | |
/** | |
* Show nav dropdowns for mobile devices | |
* @param { Object } $clickedElement DOM Element - clicked element | |
* @return { Void } |
OlderNewer