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
{% comment %} | |
Shopify Placeholder SVGs | |
Outputs every Shopify placeholder_svg_tag available. A simple reference to use during theme development. | |
https://shopify.dev/docs/api/liquid/filters/placeholder_svg_tag | |
{% endcomment %} | |
{%- liquid | |
assign outline_illustrations = 'product-1,product-2,product-3,product-4,product-5,product-6,collection-1,collection-2,collection-3,collection-4,collection-5,collection-6,lifestyle-1,lifestyle-2,image' | |
assign color_illustrations = 'product-apparel-1,product-apparel-2,product-apparel-3,product-apparel-4,collection-apparel-1,collection-apparel-2,collection-apparel-3,collection-apparel-4,hero-apparel-1,hero-apparel-2,hero-apparel-3,blog-apparel-1,blog-apparel-2,blog-apparel-3,detailed-apparel-1' |
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
{% comment %} | |
This file can be added as a snippet and add it anywhere you want to display | |
{% endcomment %} | |
<div id="pageheader"> | |
<div class="util-area"> | |
<div class="search-box"> | |
<form class="search-form" action="/search" method="get" _lpchecked="1"> | |
<i class="icon-mag"></i> | |
<input type="text" name="q" placeholder="Search" autocomplete="off"> | |
<input type="submit" value="→"> |
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
/** | |
* WP CLI custom command to export a form submsissions from Ninja Forms | |
* The to_csv function will create a 'reports' directory | |
* if it does not exist and create a datetime stamped csv | |
* | |
* ## OPTIONS | |
* | |
* <id> | |
* : The form id. | |
* <send_to_sftp> |
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
add_filter( 'ajax_query_attachments_args', 'filter_query_attachments_args' ); | |
function filter_query_attachments_args( $query ) { | |
// 1. Only users with access | |
if ( ! current_user_can( 'upload_files' ) ) { | |
wp_send_json_error(); | |
} | |
// 2. No manipulation for admins. | |
// After all they have access to all images. |
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
<script> | |
// (c) Copyright 2016 Caroline Schnapp. All Rights Reserved. Contact: [email protected] | |
// See https://docs.shopify.com/themes/customization/navigation/link-product-options-in-menus | |
// Modified by Jonathan Moore (Style Hatch) https://github.com/jonathanmoore | |
/* | |
Updated to work with sectioned themes | |
- Added required methods from the deprecated options_selection.js | |
- Triggers an initial variant change | |
- Hides sold out variants with only one option |
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 | |
$url = "https://wordpress.org/latest.zip"; // URL of what you wan to download | |
$zipFile = "wordpress.zip"; // Rename .zip file | |
$extractDir = "extracted"; // Name of the directory where files are extracted | |
$zipResource = fopen($zipFile, "w"); | |
// Get The Zip File From Server | |
$ch = curl_init(); | |
curl_setopt($ch, CURLOPT_URL, $url); | |
curl_setopt($ch, CURLOPT_FAILONERROR, true); |
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
http://apassant.net/2012/01/16/timeout-for-html5-localstorage/ | |
var hours = 24; // Reset when storage is more than 24hours | |
var now = new Date().getTime(); | |
var setupTime = localStorage.getItem('setupTime'); | |
if (setupTime == null) { | |
localStorage.setItem('setupTime', now) | |
} else { | |
if(now-setupTime > hours*60*60*1000) { | |
localStorage.clear() |
Here are the simple steps needed to create a deployment from your local GIT repository to a server based on this in-depth tutorial.
You are developing in a working-copy on your local machine, lets say on the master branch. Most of the time, people would push code to a remote server like github.com or gitlab.com and pull or export it to a production server. Or you use a service like deepl.io to act upon a Web-Hook that's triggered that service.
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
{% comment %} | |
Input | |
{% endcomment %}{% capture _content %}{{ content }}{% endcapture %}{% comment %} | |
Remove redundant closing tags | |
{% endcomment %}{% assign _endings = "html head body li dt dd p rt rp optgroup option colgroup caption thead tbody tfoot tr td th" | split: " " %}{% for _element in _endings %} | |
{% capture _end %}</{{ _element }}>{% endcapture %} |
NewerOlder