[13:58:28] Starting 'watch'...
[13:58:28] 'watch' errored after 22 ms
[13:58:28] Error: watch /.../resources/assets/images/ ENOSPC
at exports._errnoException (util.js:1023:11)
at FSWatcher.start (fs.js:1306:19)
at Object.fs.watch (fs.js:1331:11)
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
<IfModule mod_headers.c> | |
Header always set Strict-Transport-Security "max-age=31536000; includeSubDomains; preload" | |
</IfModule> |
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
/** | |
* ACF image | |
* | |
* @param array $image_array | |
* @param string $size | |
* @param string $css_class | |
* @return html | |
*/ | |
public static function acfImage( $image_array, $size = 'thumbnail', $css_class = '' ) | |
{ |
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
import 'swiper/css' | |
import 'swiper/css/navigation' | |
import Swiper, { Navigation, Pagination } from 'swiper'; | |
$(".swiper-container").each(function(index, element){ | |
$(this).addClass("swiper-container-" + index); | |
$(this).find(".swiper-button-prev").addClass("swiper-button-prev-" + index); | |
$(this).find(".swiper-button-next").addClass("swiper-button-next-" + index); | |
new Swiper(".swiper-container-" + index, { |
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
// Get CSS | |
$css = get_option( 'css' ); | |
// Remove comments | |
$buffer = preg_replace('!/\*[^*]*\*+([^/][^*]*\*+)*/!', '', $css); | |
// Remove space after colons | |
$buffer = str_replace(': ', ':', $buffer); | |
// Remove whitespace | |
$buffer = str_replace(array("\r\n", "\r", "\n", "\t", ' ', ' ', ' '), '', $buffer); | |
// Display CSS | |
if ( $buffer ) { |
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 PREFIX_lazy_load_images(image_selector) { | |
var lazyImages = [].slice.call(document.querySelectorAll(image_selector)); | |
if ("IntersectionObserver" in window && "IntersectionObserverEntry" in window && "intersectionRatio" in window.IntersectionObserverEntry.prototype) { | |
let lazyImageObserver = new IntersectionObserver(function(entries, observer) { | |
entries.forEach(function(entry) { | |
if (entry.isIntersecting) { | |
let lazyImage = entry.target; | |
lazyImage.src = lazyImage.dataset.src; |
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
// Change first letter of XML tag <Orders> to lowercase. | |
function custom_xml_root_element( $export_type ) { | |
return lcfirst( $export_type ); | |
} | |
add_filter( 'wc_customer_order_xml_export_suite_xml_root_element', 'custom_xml_root_element', 10, 1 ); | |
// Change <Order> tage name. | |
function custom_order_format_tag_name( $orders_format, $orders ) { | |
$orders_format = array( | |
'order' => $orders, |
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 $category = get_the_category(); ?> | |
<div class="col-md-6 filter <?php echo esc_attr( $category[0]->slug ); ?>"> | |
// Content | |
</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
jQuery(document).ready(function($){ | |
// Quick view ajax function on products page | |
$('.quick-view-link, .quick-view-button').on('click', function() { | |
var post_id = $(this).data('id'); | |
$.ajax({ | |
url : modal_ajax.url, | |
type : 'post', | |
data : { |
NewerOlder