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 | |
function zawp_create_coupon_codes() { | |
if ( isset( $_GET['create_coupons'] ) ) { | |
$coupons = array( | |
array( | |
'coupon_name' => 'Agnieszka K - OCC - SML client code 100€ OFF', | |
'coupon_code' => 'AgnieszkaK100', | |
'amount' => '100', | |
'type' => 'flat', |
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
jQuery(document).ready(function($) { | |
$(document).on('keyup', function(e) { | |
if ( $('.lightbox').is(':visible') ) { | |
if ( e.which === 37 ) { | |
$('.gallery_prev').trigger('click'); | |
} else if ( e.which === 39 ) { | |
$('.gallery_next').trigger('click'); | |
} | |
} | |
}) |
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
/** | |
* Insert Parameter in URL | |
* | |
* Dynamically insert or update a parameter in the URL. | |
* | |
* @param {string} key parameter name | |
* @param {string} value parameter value | |
* @param {string} base set a custom URL base. | |
* @param {boolean} historyUpdate defines if it update the URL without reloading the page | |
*/ |
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 | |
/** | |
* Convert String to ID | |
* | |
* @param string $string | |
* @return string | |
*/ | |
function zawp_convert_to_id( $string ) { | |
// Lower case everything |
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
<div class="side-popup"> | |
<div class="side-popup__inner aos-init aos-animate" data-aos="fade-left" data-aos-easing="ease-out" data-aos-duration="1000" data-aos-delay="500"> | |
<h4>Some Heading Goes Here</h4> | |
<a href="#" class="side-popup__cta button button--primary" target="">CTA Button Text</a> | |
</div> | |
</div> |
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
// Usage: m-0 to m-7 | |
// Usage: p-0 to p-7 | |
// Usage: mb-0 to mb-7 | |
$sizeUnit: rem; | |
$marginKey: 'm'; | |
$paddingKey: 'p'; | |
$separator: '-'; | |
$sizes: ( | |
('0', 0), |
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
// Returns a function, that, as long as it continues to be invoked, will not | |
// be triggered. The function will be called after it stops being called for | |
// N milliseconds. If `immediate` is passed, trigger the function on the | |
// leading edge, instead of the trailing. | |
function debounce( func, wait, immediate ) { | |
var timeout; | |
return function () { | |
var context = this, | |
args = arguments; | |
var later = function () { |
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
/** | |
* Sort array of objects based on another array | |
*/ | |
function mapOrder (array, order, key) { | |
array.sort( function (a, b) { | |
var A = a[key], B = b[key]; | |
NewerOlder