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
const fs = require('fs'); | |
const fbiPath = 'Z:/'; | |
new Promise( ( resolve, reject ) => { | |
/* Read filenames in specified directory */ | |
fs.readdir( fbiPath, function( error, filenames ) { | |
if ( error ) return reject( error ); | |
/* Filter out only csv files with old to new date */ |
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
/* Move the product main description oustide of the tab */ | |
function move_product_description() { | |
global $woocommerce, $post; | |
if ( $post->post_content ) : ?> | |
<div itemprop="description" class="item-description"> | |
<?php $heading = apply_filters('woocommerce_product_description_heading', __('Product Description', 'woocommerce')); ?> | |
<!-- <h2><?php echo $heading; ?></h2> --> |
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
/* Override the single product gallery thumb sizes */ | |
add_filter( 'woocommerce_gallery_thumbnail_size', 'override_thumb_size', 10, 1 ); | |
function override_thumb_size( $size ) { | |
$size = [ 300, 300 ]; | |
return $size; | |
} |
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
/** | |
* Remove the "Place Order" button if the | |
* Product Variant is not available selling world wide | |
*/ | |
add_filter( 'woocommerce_order_button_html', 'disable_place_order_button_html' ); | |
function disable_place_order_button_html( $button ) { | |
/* Exit if the screen is Dashboard and not Checkout */ | |
if( is_admin() && ! is_checkout() ) | |
return $button; |
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
.dp-cookie { | |
display: none; | |
position: fixed; | |
z-index: 11; | |
bottom: 18px; | |
left: 50%; | |
transform: translateX(-50%); | |
background-color: #2e2e2b; | |
width: calc(100% - 50px); | |
max-width: 1500px; |
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
/** | |
* Add Instructions to Featured Image Box | |
*/ | |
function ration_add_featured_image_html( $html ) { | |
if( get_post_type() === 'tribe_venue' || get_post_type() === 'tribe_events' ) | |
$html .= '<p>Recommended dimension, 1920 x 1080.</p>'; | |
return $html; | |
} | |
add_filter( 'admin_post_thumbnail_html', 'ration_add_featured_image_html'); |
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
$( document ).ready( function() { | |
/** Features Recent Posts Search Functionality **/ | |
$( '#__search_recent' ).keyup( function( event ) { | |
var search = $( this ).val().toUpperCase(); | |
$( '#features_archive .__recent_post_sub_container' ).each( function( index, el ) { | |
if( $( 'a', el ).text().toUpperCase().indexOf( search ) > -1 ) { | |
$( el ).show(); | |
// $(".__recent_post_sub_container:nth-of-type(11)").addClass('hide-post'); | |
// $(".__recent_post_sub_container:nth-of-type(12)").addClass('hide-post'); | |
$(".__recent_post_sub_container:nth-of-type(11)").removeClass('hide-post-hidden'); |
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="__select_field"> | |
<div class="__select"> | |
<p class="__selected" data-selected="all-locations">All Locations</p> | |
<div class="__select--list"> | |
<div> | |
<p data-value="all-locations">All Locations</p> | |
<p data-value="location-1">Location 1</p> | |
<p data-value="location-2">Location 2</p> | |
<p data-value="location-3">Location 3</p> | |
<p data-value="location-4">Location 4</p> |
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
var titleHeight = debounce( () => { //active the function every 250ms to improve website performance | |
var maxTitleHeight = Math.max.apply( null, $( '.__tag .__details h3' ).map( function () { | |
return $( this ).height(); | |
} ).get() ); | |
if( window.innerWidth > 548 ) { | |
$( '.__tag .__details h3' ).height( maxTitleHeight ); | |
} else { | |
$( '.__tag .__details h3' ).height( 'auto' ); | |
} |
NewerOlder