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
| form.pods-form .pods-field-template-tiles ul.pods-dfv-list.ui-sortable { | |
| background: #eee; | |
| margin: 0 0 5px 0; | |
| padding: 0px; | |
| border-radius: 4px; | |
| border:0; | |
| display: flex; | |
| flex-direction: row; | |
| flex-wrap: wrap; | |
| box-shadow:inset 0 0 4px #ccc; |
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
| -- 1) Create a temporary table to store rows to delete | |
| CREATE TEMPORARY TABLE `gf_spam_entries` AS | |
| SELECT `entry_id` | |
| FROM `wp_gf_entry_meta` | |
| WHERE ( | |
| LENGTH(meta_value) > 700 | |
| OR LOWER(`meta_value`) REGEXP '^(http|\\<a href)' | |
| OR `meta_value` REGEXP '[\\p{Cyrillic}]' | |
| OR `meta_value` REGEXP 'http.+\\.(ru|cz|de|jp|bz|bx|php|asp|xyz|ua|tk|icu|bit\\.ly)' | |
| OR LOWER(`meta_value`) REGEXP '([a-z0-9._%+-]+)@(.*\\.)?(ru|xy|xx|xv|cz|cc|de|xyz|bagat|[a-z]maill)' |
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 underline effect */ | |
| .animated-underlines a{ | |
| position: relative; | |
| } | |
| .animated-underlines a::after { | |
| content: ''; | |
| display: block; | |
| width: 100%; | |
| height: 1px; |
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 roundLargeNumber($number) { | |
| if ($number >= 1000000) { | |
| // If the number is in millions, round to 2 decimal points and append "M" suffix | |
| return number_format($number / 1000000, 2) . 'M'; | |
| } elseif ($number >= 1000) { | |
| // If the number is in thousands, round to 0 decimal points and append "K" suffix | |
| return number_format($number / 1000, 0) . 'K'; | |
| } else { | |
| // For smaller values, round to 2 decimal points without any suffix |
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( 'wpcf7mailsent', function( event ) { | |
| // GA4 event with recommended standard dimensions | |
| if ( 'detail' in event && typeof gtag !== 'undefined') { | |
| var form_id = event.detail.contactFormId; | |
| var form_name = ''; | |
| switch (form_id) { | |
| case 1 : form_name = 'Form 1'; break; // change form_name to match use case of each cf7 id | |
| case 8 : form_name = 'Form 8'; break; |
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 | |
| if ( !defined( 'ABSPATH' ) ) exit; | |
| /** Store URL params as WC session data to later pre-fill checkout fields | |
| * | |
| * reference: https://www.businessbloomer.com/woocommerce-populate-checkout-from-url/ | |
| * https://stackoverflow.com/questions/50356459/pre-fill-woocommerce-checkout-fields-with-url-variables-saved-in-session/50357363#50357363 | |
| */ | |
| add_action( 'template_redirect', 'PREFIX_wc_session__store_url_params' ); | |
| function PREFIX_wc_session__store_url_params() { |
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
| // remove any empty items in multidimensional array | |
| function multi_array_filter($arr){ | |
| if ( is_array($arr) ){ | |
| $arr = array_map('multi_array_filter', $arr); | |
| $arr = array_filter($arr); | |
| } | |
| return $arr; | |
| } |
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() { | |
| jQuery(document).on('fluentform_submission_success', function( event ) { | |
| if (typeof gtag !== 'undefined') { | |
| gtag('event', 'form_submit_success', { | |
| 'form_name': 'Contact Form', | |
| 'form_id': event.target.name | |
| }); | |
| } else { | |
| window.dataLayer = window.dataLayer || []; | |
| window.dataLayer.push({ |
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
| <script src="https://cdn.jsdelivr.net/npm/simple-parallax-js@5.6.2/dist/simpleParallax.min.js"></script> | |
| <script> | |
| var parallaxBg = document.querySelectorAll('.parallax-bg img'); | |
| new simpleParallax(parallaxBg, { | |
| customWrapper: '.elementor-widget-container', | |
| orientation: 'down', | |
| scale: 1.25, | |
| delay: 0.3, | |
| transition: 'cubic-bezier(0,0,0,1)', | |
| }); |