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
/*-------------------------------------------------------------- | |
# Tools | |
--------------------------------------------------------------*/ | |
.animation {transition:all 300ms ease-in-out;} | |
.clickable { cursor:pointer; } | |
.fleft { float: left } | |
.fright { float: right } | |
.tleft { text-align: left } | |
.tright { text-align: right } | |
.centered {text-align: center} |
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
document.ParsleyConfig = { | |
excluded: 'input[type=button], input[type=submit], input[type=reset], input[type=hidden], [disabled], :hidden, .parsley-novalidate', | |
errorsWrapper: '<ul class="parsley-errors-list" role="alert"></ul>', | |
trigger: 'change focusout', | |
triggerAfterFailure: 'change focusout' | |
}; |
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 resizeTimer; | |
$(window).on('resize', function(e) { | |
clearTimeout(resizeTimer); | |
resizeTimer = setTimeout(function() { | |
console.log('i had resized') | |
}, 250); | |
}); |
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 | |
/** | |
* Displays mail template parts header and footer | |
*/ | |
add_action( 'wpcf7_before_send_mail', 'wpcf7_add_text_to_mail_body' ); | |
function wpcf7_add_text_to_mail_body($contact_form){ | |
// get mail property |
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'; | |
var $ = require('jquery'); | |
var Product = (function($) { | |
var plugin = {}; | |
var settings = { | |
stickyBasket: '[data-sticky-basket]', | |
quickLinks: '.product__quicklinks-list li a', |
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 like: | |
* <p data-readmore="fazit" data-readmore-maxlines="3">bla bla long text...</p> | |
* <div data-readmore-toggle="fazit" class="fs-smaller clickable clr-blue">...more</div> | |
* | |
* while `data-readmore` activates the functionality and `fazit` works as selector id for the toggle `data-readmore-toggle`. | |
* activator and toggle need to be in the same parent container! | |
*/ | |
'use strict'; |
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
// add in local config for fine debug display. | |
// use like php var_dump($var) >> wp_dump($var) | |
define( 'WP_DEBUG', true ); | |
function wp_dump($variable,$die=false){ | |
echo '<pre>'.print_r($variable, true).'</pre>'; | |
if($die) die(); | |
} |
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
{ | |
"rules": { | |
"color-no-invalid-hex": true, | |
"font-family-name-quotes": "always-where-recommended", | |
"font-family-no-duplicate-names": true, | |
"function-calc-no-unspaced-operator": true, | |
"function-comma-newline-after": "never-multi-line", | |
"function-comma-newline-before": "never-multi-line", | |
"function-comma-space-after": "always-single-line", | |
"function-comma-space-before": "never", |
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 | |
/** | |
* help rendering the richText Component saved object | |
* was needed when RichText saved as array. Since Gutenberg 4.5.1. RichText saves in string! | |
* | |
* no dynamic nice rendering provided https://github.com/WordPress/gutenberg/projects/14#card-11206239 | |
* | |
* @since x.x.x | |
* @param $arr object from the JS RichText Component |
OlderNewer