[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
<ul class="sidebar-menu"> | |
<?php | |
$parent_terms = get_terms( 'product_cat', array( 'hide_empty' => false, 'parent' => 0 ) ); | |
foreach( $parent_terms as $parent_term ) { | |
// display top level term name | |
$child_terms = get_terms( 'product_cat', array( 'hide_empty' => false, 'parent' => $parent_term->term_id ) ); | |
?> | |
<li class="cat-item <?php if ($child_terms) { echo "have-children"; } ?>"><a href="<?php echo get_term_link($parent_term); ?>"><?php echo $parent_term->name; ?></a> | |
<?php if ($child_terms) : ?> | |
<ul class="children"> |
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 | |
if( have_rows('repeater_field') ): | |
$postCount = 1; | |
while( have_rows('repeater_field') ) : the_row(); ?> | |
<?php | |
$repeater_sub_field_1 = get_sub_field('repeater_sub_field_1'); | |
$repeater_sub_field_2 = get_sub_field('repeater_sub_field_2'); | |
$repeater_sub_field_3 = get_sub_field('repeater_sub_field_3'); |
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 wp_is_rtl( $locale = '' ) { | |
static $rtl_locales = array( | |
'ar' => 'Arabic', | |
'ary' => 'Moroccan Arabic', | |
'azb' => 'South Azerbaijani', | |
'fa_IR' => 'Persian', | |
'haz' => 'Hazaragi', | |
'he_IL' => 'Hebrew', | |
'ps' => 'Pashto', | |
'ug_CN' => 'Uighur', |
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 : { |
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
// 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
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
// 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 ) { |
OlderNewer