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($) { | |
| 'use strict'; | |
| /** | |
| * Developer note: | |
| * This code use the native "fetch" function to intercept AJAX calls | |
| * for the 'remoovehouuse' endpoint. When it detects a successful (HTTP 200) | |
| * response with `{"code":"success"}`, it automatically reloads all Listing Grids | |
| * that have the class ".formless-ajax.elementor-widget-jet-listing-grid". | |
| * Change the .formless-ajax if you want to use different class target |
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 | |
| add_filter( 'jet-form-builder/content-filters', function( $filters ) { | |
| // Define a custom filter class for formatting repeater field data | |
| class Separate_With_Spaces_JFB_Filter extends \Jet_Form_Builder\Classes\Filters\Base_Filter { | |
| // Unique ID for this filter | |
| public function get_id(): string { | |
| return 'separate_with_spaces'; |
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
| // place the code in the child theme functions.php or a custom code snippets plugin like Fluent Snippts etc.. | |
| // You need to add two key in your wp-config.php | |
| // first open your wp-config.php and define( 'OPENAI_API_KEY', 'My_Chatgpt_API'); | |
| // add a new line with your auth token: define( 'CUSTOM_API_TOKEN', 'My_auth_token'); | |
| // example token define( 'CUSTOM_API_TOKEN', 'a3f9c74d2b69a7e1bcd15e2e4fc98a6c4ed12e9985bcae439f6ad5db95f17c23'); | |
| // in the Custom api token you can enter anything | |
| // open your functions.php or fluentsnippets and paste the code which you can find below | |
| // open your jetformbuilder add a new webhook submission and paste your wesbite domain name like | |
| // https://mywebsite.com/wp-json/custom-webhooks/v1/chatgpt-handler?api_token=CUSTOM_API_TOKEN |
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 | |
| class Jet_Appointment_Add_Current_Link { | |
| private $query_var = 'jet_apb_add_current_to_calendar'; | |
| public function __construct() { | |
| add_action( 'plugins_loaded', array( $this, 'add_filters' ), 1000 ); | |
| } | |
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
| This jQuery script automatically populates the JetFormBuilder form date inputs with today's date in MM/DD/YYYY format and | |
| updates corresponding hidden fields to the DD/MM/YYYY format upon form submission. The script ensures that the dates are | |
| visible and considered 'selected' by the user, improving data accuracy and user experience without manual entry. It supports | |
| multiple date fields and can easily be configured to handle various date and hidden field IDs, making it ideal for ensuring | |
| consistent date formatting and handling across front-end displays and back-end processing. | |
| 1. Firstly, copy the custom HTML code and paste it into your snippet plugins. Create a new HTML snippet and save it as "footer". | |
| 2. Create a date field and a hidden field. Name both fields and change the IDs to your preferred IDs: | |
| { visible: 'YOUR DATE FIELD NAME/ID', hidden: 'YOUR HIDDEN FIELD NAME/ID' }, | |
| 3. Add the hidden field name to Jetformbuilder's post-submit action (content) to display the date format as DD/MM/YY. |
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 | |
| add_filter( 'jet-apb/public-actions/custom-action-page-content', 'jet_apb_custom_cancel_redirect', 10, 2 ); | |
| add_filter( 'jet-apb/public-actions/custom-action-page-content', 'jet_apb_custom_confirm_redirect', 10, 2 ); | |
| function jet_apb_custom_cancel_redirect( $custom, $action ) { | |
| $type = $action->get_action(); | |
| if ( $type === 'cancel' ) { |
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 | |
| add_filter( 'jet-form-builder/before-start-form', function ( $before_form_start, $form ) { | |
| $form->add_attribute( 'id', 'jet-form-' . $form->form_id ); | |
| return $before_form_start; | |
| }, 0, 2 ); |
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> | |
| document.addEventListener('jet-smart-filters/inited', function(initEvent) { | |
| jQuery(function($) { | |
| window.JetSmartFilters.events.subscribe('ajaxFilters/updated', function(provider, queryId) { | |
| setTimeout( function() { | |
| window.scrollTo({ | |
| top: 0, | |
| behavior: "smooth", | |
| }); | |
| }, 10 ); |
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 | |
| add_filter( 'jet-engine/data-tables/table-columns', function( $columns ) { | |
| foreach ( $columns as $i => $column ) { | |
| if ( empty( $column['name'] ) ) { | |
| continue; | |
| } | |
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 | |
| add_filter( 'jet-apb/time-slots/slots-html/slots-list', function( $slots, $format, $dataset, $date, $service, $provider ) { | |
| $duration = jet_apb()->calendar->get_schedule_settings( $provider, $service, null, 'default_slot' ); | |
| foreach ( $slots as $time => $slot ) { | |
| if ( $slot['to'] - $slot['from'] < $duration ) { | |
| unset( $slots[ $time ] ); | |
| } |
NewerOlder