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
/* | |
A simple little SCSS mixin for creating scrim gradients | |
Inspired by Andreas Larson - https://github.com/larsenwork | |
https://css-tricks.com/easing-linear-gradients/ | |
*/ | |
@mixin scrimGradient($startColor: $color-black, $direction: 'to bottom') { | |
$scrimCoordinates: ( |
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: mllegeorgesand@gmail.com | |
// 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
// Place this in wp-config | |
define( 'ACF_5_KEY', 'yourkeyhere' ); | |
// Set ACF 5 license key on theme activation. Stick in your functions.php or equivalent. | |
function auto_set_license_keys() { | |
if ( ! get_option( 'acf_pro_license' ) && defined( 'ACF_5_KEY' ) ) { | |
$save = array( | |
'key' => ACF_5_KEY, |
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
# This file lists the color values of the default dark theme. | |
# Each line starting with a # is a comment. | |
# To overwrite certain colors remove the leading # and change the color values. | |
# The "extends" line defines which color definitions to use if none is found here. | |
extends=deepgit-dark-theme.properties | |
# The "preferredEditorTheme" line determines what editor theme should be used by default ('light' or 'dark'). | |
preferredEditorTheme=dark |
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
javascript: (() => { let style = document.createElement("style"); style.innerHTML = ` .a3s table { width: 90% !important; } .a3s img { max-width: 90% !important; height: auto !important; } tr:has(.ast) { display: none !important; } `; document.head.appendChild(style);})(); |
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
function countCSSRules() { | |
var results = '', | |
log = ''; | |
if (!document.styleSheets) { | |
return; | |
} | |
for (var i = 0; i < document.styleSheets.length; i++) { | |
countSheet(document.styleSheets[i]); | |
} | |
function countSheet(sheet) { |
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
var rays = new Object({ | |
canvas: false, | |
context: false, | |
interval: false, | |
offset: 0, | |
init: function(id, colour1, colour2){ | |
this.canvas = document.getElementById(id); | |
this.context = this.canvas.getContext('2d'); | |
this.canvas.style.background = colour1; | |
this.context.fillStyle = colour2; |
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 | |
/** | |
* inject_class_column_count | |
* | |
* @param string $content The block content about to be appended. | |
* @param array $block The full block, including name and attributes | |
* @return $content; | |
*/ | |
function inject_class_column_count( $content, $block ) { | |
if ( ! is_block_type( $block, "core/columns" ) ) { |
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_filter("the_content", "the_content_filter"); | |
function the_content_filter($content) { | |
// array of custom shortcodes requiring the fix | |
$block = join("|",array("col","shortcode2","shortcode3")); | |
// opening tag |
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 | |
/** | |
* Restore CSV upload functionality for WordPress 4.9.9 and up | |
*/ | |
add_filter('wp_check_filetype_and_ext', function($values, $file, $filename, $mimes) { | |
if ( extension_loaded( 'fileinfo' ) ) { | |
// with the php-extension, a CSV file is issues type text/plain so we fix that back to | |
// text/csv by trusting the file extension. | |
$finfo = finfo_open( FILEINFO_MIME_TYPE ); | |
$real_mime = finfo_file( $finfo, $file ); |