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
var wpcf7Submit = $('.wpcf7-submit'); | |
document.addEventListener( 'wpcf7submit', function( event ) { | |
wpcf7Submit.attr('disabled', 'disabled'); | |
}, false); | |
document.addEventListener( 'wpcf7mailsent', function( event ) { | |
wpcf7Submit.removeAttr('disabled'); | |
}, false); | |
document.addEventListener( 'wpcf7mailfailed', function( event ) { | |
wpcf7Submit.removeAttr('disabled'); |
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 get_most_popular_products($atts = array()) | |
{ | |
extract($atts); | |
$posts_per_page = !isset( $posts_per_page ) ? 10 : $posts_per_page; | |
$order = !isset( $order ) ? "DESC" : $order; | |
$post_status = !isset( $post_status ) ? "publish" : $post_status; | |
$post_type = !isset( $post_type ) ? "product" : $post_type; | |
$args = array( |
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 | |
$file = file_get_contents('/wp-content/themes/themename/analyzers.csv'); | |
$lines = explode(PHP_EOL, $file); | |
$array = array(); | |
foreach ($lines as $line) { | |
$l = str_getcsv($line); | |
$array[] = array( | |
'brand' => $l[1], | |
'model' => $l[0], | |
); |
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 | |
/*IS NOT WOOCOMMERCE*/ | |
if ( ! function_exists( 'is_ajax' ) ) { | |
/** | |
* is_ajax - Returns true when the page is loaded via ajax. | |
* @return bool | |
*/ | |
function is_ajax() { | |
return defined( 'DOING_AJAX' ); | |
} |
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
// Custom JS | |
var catConfig = { | |
hideControlOnEnd: true, | |
adaptiveHeight: true, | |
infiniteLoop: false, | |
useCSS: false, | |
prevText: '', | |
nextText: '', | |
pager: false, | |
speed: 350 |