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_action('template_redirect', function () { | |
| if (!class_exists('\FluentCommunity\App\Services\Helper')) { | |
| return; | |
| } | |
| global $wp; | |
| $req = isset($wp->request) | |
| ? $wp->request | |
| : trim(parse_url($_SERVER['REQUEST_URI'] ?? '/', PHP_URL_PATH), '/'); |
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
| // Put this in: theme's functions.php OR a small custom plugin OR Code Snippets. | |
| add_action('fluent_community/after_header_menu', function ($context) { | |
| ?> | |
| <script> | |
| (function () { | |
| // Change this selector if your menu item key is different | |
| const MENU_ITEM_SELECTOR = '.fcom_menu_item_fcom_custom_teset a'; | |
| document.addEventListener('click', function (e) { | |
| const link = e.target.closest(MENU_ITEM_SELECTOR); |
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 | |
| /** | |
| * Handling the fluent form entry confirmation hook that is triggered on double optin confirmation | |
| * for forms that have that option enabled (this part is coded as webhook UI for fluent forms triggers | |
| * upon form submission, before the user as double opted in. This is the only way | |
| * to access the confirmation hook. | |
| * | |
| * This module will trigger 2 webhooks : | |
| * 1-to add the email to the encharge subscriber list | |
| * 2-to create or update a contact in one page CRM for the subcriber |
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
| let pickedSlot = ''; | |
| let pickedDurationNum = ''; | |
| function getDurationNumber() { | |
| const sel = document.querySelector('.fcal_multi_duration .fcal_duration.is_selected'); | |
| if (sel) { | |
| const txt = sel.textContent.replace(/\s+/g, ' ').trim(); // "45 Minutes" | |
| const m = txt.match(/\d+/); | |
| if (m) return m[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
| let pickedSlot = ''; //picked value from calendar | |
| document.addEventListener('click', function (e) { | |
| const spot = e.target.closest('.fcal_spot'); | |
| const next = e.target.closest('.ff-btn-next'); | |
| if (spot) { | |
| setTimeout(() => { | |
| const el = document.querySelector('.slot_time_range span'); |
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_action('fluent_community/portal_head', function () { | |
| wp_enqueue_script( | |
| 'my-ext-on-portal', | |
| 'https://cdn.example.com/sdk.min.js', | |
| [], | |
| null, | |
| false | |
| ); |
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 () { | |
| var FORM_ID = 47; //Your Form ID | |
| function q(form, sel) { return form.querySelector(sel); } | |
| function qa(form, sel) { return form.querySelectorAll(sel); } | |
| function getErrorStack(form) { | |
| return q(form, '#fluentform_' + FORM_ID + '_errors'); | |
| } |
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 Rowspanizer Plugin (Modified) v0.2 | |
| * https://github.com/marcosesperon/jquery.rowspanizer.js | |
| * | |
| * Copyright 2011, 2015 Marcos Esperón | |
| * Released under the MIT license | |
| * | |
| * https://github.com/jquery-boilerplate/boilerplate/ | |
| */ | |
| ;( function( $, window, document, undefined ) { |
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_action('fluent_community/portal_head', function() { | |
| ?> | |
| <style> | |
| .highlighted-day { | |
| background-color: yellow !important; | |
| color: blue !important; | |
| padding: 2px 4px; | |
| border-radius: 3px; | |
| font-weight: bold; | |
| } |
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 allow_svg_uploads($mimes) { | |
| $mimes['svg'] = 'image/svg+xml'; | |
| return $mimes; | |
| } | |
| add_filter('upload_mimes', 'allow_svg_uploads'); | |
| add_filter('fluent_community/support_attachment_types', function($types) { | |
| $types[] = 'image/svg+xml'; | |
| return $types; | |
| }); |
NewerOlder