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
| document.addEventListener('DOMContentLoaded', function () { | |
| ls_curr_slider[0].stopAuto(); | |
| }); | |
| // this is the target which is observed | |
| var target = document.querySelector('.lshowcase-logos'); | |
| // configure the intersection observer instance | |
| var intersectionObserverOptions = { | |
| root: null, |
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
| jQuery('.advq_question_container').first().find('input').each(function(){ | |
| var rule = JSON.parse( jQuery(this).attr('data-rule') ); | |
| var keys = Object.keys(thisrule); | |
| rule[keys[ keys.length * Math.random() << 0]] = Math.ceil( Math.random() * 1000 ).toString(); | |
| jQuery(this).attr('data-rule', JSON.stringify(rule)); | |
| }); |
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
| /** | |
| * Add custom fields to WooCommerce Products Query filter in Advisor Quiz | |
| * | |
| * @param [array] $fields array | |
| * @return [array] $fields with included acf fields | |
| */ | |
| function advq_add_woo_acf( $fields ) { | |
| // get acf groups for products | |
| $groups = acf_get_field_groups(array('post_type' => 'product')); |
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
| function iwm_callback() { | |
| // set aria label | |
| document.querySelector('.iwm_map_canvas svg').setAttribute('aria-label','This is an interactive map.'); | |
| } |
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
| $model['meta'] = [ | |
| 'my_metabox_01' => [ | |
| 'title' => 'Title', | |
| 'position' => 'normal', | |
| 'priority' => 'high', | |
| 'sections' => [ | |
| 'info' => [ | |
| 'title' => 'Title Info', | |
| 'desc' => 'description', | |
| 'icon' => 'dashicon', |
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
| jQuery(document).ready(function(){ | |
| var thishash = window.location.href.slice(window.location.href.indexOf('#') + 1); | |
| var menuitem = jQuery('ul#tts-isotope-filter-nav li:contains("'+decodeURI(thishash)+'")'); | |
| if(thishash.length && menuitem.length){ | |
| menuitem.click(); | |
| } | |
| }); |
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
| add_filter( 'tshowcase_table_content_order', 'mycustom_table_content_order' ); | |
| function mycustom_table_content_order( $tshowcase_fields ) { | |
| $ts_content_order = array( | |
| 1 => 'title', | |
| 2 => 'groups', | |
| 3 => 'taxonomy', | |
| 4 => 'ctaxonomy', | |
| 5 => 'dtaxonomy', | |
| 6 => 'position', |
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
| // Create Arrays to populate Query Builder with all available post types | |
| add_filter( 'advq_admin_build_quiz', 'advq_coupon_cpt' ); | |
| function advq_coupon_cpt( $queryfields ) { | |
| $fields = array(); | |
| $fields['label'] = 'Coupon'; | |
| // search |
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
| /* Rearrange fields order */ | |
| jQuery(document).ready(function(){ | |
| jQuery('.advq_askemail').insertBefore('.advq_askinfo_2'); | |
| }); | |
| /* Event triggered when we arrive at email form */ | |
| jQuery(".advq_quiz_wrap").on("advqEmailScreen", function() { | |
| jQuery(".advq-hide-at-results").hide(); | |
| jQuery(".advq-show-at-results").show(); | |
| }); |
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
| add_filter('advq_suggestion_title','advq_custom_after_suggestion_title' , 1); | |
| function advq_custom_after_suggestion_title( $title ){ | |
| global $post; | |
| $currency = get_woocommerce_currency_symbol(); | |
| $realprice = get_post_meta( $post->ID, '_regular_price', true); | |
| return $title. '<div>From ' . $currency . $realprice . '</div>'; | |
| } |