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
window.addEventListener('elementor/frontend/init', function() { | |
var popupId = 13473; | |
function getReferrer() { | |
return document.referrer; | |
} | |
function isBot() { | |
var botList = ["Googlebot", "Bingbot", "Slurp", "DuckDuckBot", "Baiduspider", "YandexBot"]; | |
var userAgent = navigator.userAgent.toLowerCase(); |
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 | |
add_action( 'elementor/frontend/widget/before_render', function( $widget ) { | |
// Ensure the widget is the Nav Menu widget | |
if ( 'nav-menu' === $widget->get_name() ) { | |
// Get the widget settings | |
$widgetSettings = $widget->get_settings_for_display(); | |
$widgetId = $widgetSettings['_element_id']; | |
// Check if the widget ID is headerNavMenu |
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
This snippet filters the content of the Elementor Nav Menu Widget to | |
add the required markup for the animated toggle (3 spans). | |
function replaceMenuToggleContent($html) { | |
// Wrap the HTML with a root element to prevent unexpected restructuring | |
$dom = new DOMDocument(); | |
libxml_use_internal_errors(true); | |
$dom->loadHTML('<div>' . $html . '</div>', LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD); | |
libxml_clear_errors(); |
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
/* | |
The Collective Rising relies on Gravity Flow to automate the membership workflow. After a member applies, an admin from TCR | |
accepts/rejects the application. Accepted members must complete a form with information that will be used to create their profile | |
in the website, and they should be redirected to that form if they haven't finished it yet and try to navigate to their profile. | |
This code snippet, although short, required a lot of research on the methods Gravity Flow used to gather information of the user progress | |
in the workflow. | |
*/ | |
function redirect_to_profile_builder() { |
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_action( 'woocommerce_before_add_to_cart_quantity', function(){ | |
global $woocommerce, $product; | |
if ( $product->is_type( 'variable' ) ) { | |
?> | |
<script> | |
jQuery(function ($) { | |
$(document).ready(function () { | |
var price, | |
currency = '<?php echo get_woocommerce_currency_symbol(); ?>'; |
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
// Gulp components | |
const { | |
series, | |
src, | |
dest, | |
watch | |
} = require('gulp'); | |
// Dependencies |