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
Array | |
( | |
[0] => Array | |
( | |
[download_url] => http://wp-stats-v2.local/?download_file=11830&order=wc_order_fx1ehECxclOof&email=mrmolaei.ir%40gmail.com&key=404cab4a-2322-4c61-9d71-d4ff14f98db2 | |
[download_id] => 404cab4a-2322-4c61-9d71-d4ff14f98db2 | |
[product_id] => 11830 | |
[product_name] => Advanced Widgets - Up To 5 Sites | |
[product_url] => http://wp-stats-v2.local/add-ons/advanced-widgets/?attribute_pa_license=5-sites | |
[download_name] => Advanced Widgets |
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
// Include https://github.com/jquery/jquery-mousewheel | |
if (document.querySelector('.js-carousel')) { | |
const flickityElement = jQuery('.js-carousel').flickity({ | |
prevNextButtons: false, | |
pageDots: false, | |
contain: true, | |
freeScroll: true, | |
cellAlign: 'left', |
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 | |
// To avoid the complexity, I use two separate functions. | |
function hexToHsl($hex) | |
{ | |
// Convert hex to RGB | |
if (strlen($hex) == 7) { | |
$rgb = array_map('hexdec', str_split(ltrim($hex, '#'), 2)); | |
} else { | |
$hex = '#' . implode( "", array_map( function($digit) { |
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 | |
function hexToRgb( $hex ) | |
{ | |
// Convert hex to RGB | |
if (strlen($hex) == 7) { | |
$rgb = array_map('hexdec', str_split(ltrim($hex, '#'), 2)); | |
} else { | |
$hex = '#' . implode( "", array_map( function($digit) { | |
return str_repeat($digit, 2); |
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
.break-words { | |
width: min-intrinsic; | |
width: -moz-min-content; | |
width: min-content; | |
display: table-caption; | |
word-break: initial; | |
} | |
/* | |
Lorem ipsum dolor sit amet. |
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
// Check if the user clicked outside of an element | |
document.addEventListener('click', function (e) { | |
if (!e.target.closest('.element')) { | |
// code... | |
} | |
}) |