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
[class*="undefined"], | |
[class*="null"] { | |
border: red 5px solid !important; | |
background: #0f0 !important; | |
color: #00f !important; | |
} | |
[class*="undefined"]::after, | |
[class*="null"]::after { | |
content: "YOU HAVE AN ERROR IN YOUR CODE" !important; |
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 | |
/** | |
* Plugin Name: Disable All Updates and External Connections | |
* Description: Plugin which disables core, plugin and theme updates and connections to wordpress.org This is quite useful in local development | |
* Version: 1.0.0 | |
* Author: Onni Hakala | |
* Author URI: https://github.com/onnimonni | |
* License: MIT License | |
*/ |
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
/* | |
* Få Polylang och ACF Options Page att fungera | |
* | |
* http://www.advancedcustomfields.com/resources/multilingual-custom-fields/ (Längst ned på sidan) | |
*/ | |
add_filter('acf/settings/default_language', function( $language ) { | |
if ( function_exists( 'pll_current_language' ) ) { |
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 | |
/** | |
* Plugin Name: Remove accents from files on upload | |
* Plugin URI: https://gist.github.com/onnimonni/d58bdcff44f8208a15c7 | |
* Description: Sanitize accents from Cyrillic, German, French, Polish, Spanish, Hungarian, Czech, Greek, Swedish during upload. Also fix OS-X NFD filenames. | |
* Version: 1.0 | |
* Author: Onni Hakala | |
* Author URI: http://github.com/onnimonni | |
* License: GPLv3 | |
*/ |
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(){ | |
'use strict'; | |
// Twitter overwrites console.log; this restores it | |
console.log = Object.getPrototypeOf(console).log; | |
let $container = $('.stream-items'); | |
let $items = $container.children('.stream-item'); | |
console.log(`Number of items at the beginning: ${$items.length}`); |
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
var oldJQueryEventTrigger = jQuery.event.trigger; | |
jQuery.event.trigger = function( event, data, elem, onlyHandlers ) { | |
console.log( event, data, elem, onlyHandlers ); | |
oldJQueryEventTrigger( event, data, elem, onlyHandlers ); | |
} |
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 | |
$order = new WC_Order( $order_id ); | |
foreach ( $order->get_items() as $item_key => $item ) { | |
$product = $order->get_product_from_item( $item ); | |
$sku = $product->get_sku(); | |
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
# | |
# Working with branches | |
# | |
# Get the current branch name (not so useful in itself, but used in | |
# other aliases) | |
branch-name = "!git rev-parse --abbrev-ref HEAD" | |
# Push the current branch to the remote "origin", and set it to track | |
# the upstream branch | |
publish = "!git push -u origin $(git branch-name)" |
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
/* | |
* This work is free. You can redistribute it and/or modify it under the | |
* terms of the Do What The Fuck You Want To Public License, Version 2, | |
* as published by Sam Hocevar. See the COPYING file for more details. | |
*/ | |
/* | |
* Easing Functions - inspired from http://gizma.com/easing/ | |
* only considering the t value for the range [0, 1] => [0, 1] | |
*/ | |
EasingFunctions = { |
NewerOlder