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; | |
| }); |
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( 'fluent_community/portal_vars', function( $vars ) { | |
| if ( isset( $vars['features'] ) ) { | |
| $vars['features']['has_survey_poll'] = false; | |
| } | |
| return $vars; | |
| }, 20 ); |
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).ready(function () { | |
| var timeDropdown = $('.evening'); | |
| var calendarInput = $(".datee"); | |
| var fp = flatpickr(calendarInput[0], { | |
| enableTime: true, | |
| dateFormat: "Y-m-d H:i", | |
| minDate: "today", | |
| time_24hr: true, | |
| onChange: function(selectedDates, dateStr, instance) { |
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() { | |
| // Wait for the page and all forms to load (especially if loaded via AJAX) | |
| function ready(fn) { | |
| if (document.readyState != 'loading'){ | |
| fn(); | |
| } else { | |
| document.addEventListener('DOMContentLoaded', fn); | |
| } | |
| } |
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 runAll(){ | |
| $('.footable tbody tr').click( function() { | |
| }).hover( function() { | |
| $(this).toggleClass('hover'); | |
| $(this).css('cursor', 'pointer'); | |
| }); | |
| $(document).on('click', '.footable tbody tr', function(e){ | |
| e.preventDefault(); | |
| var url = $(this).find('a').attr('href'); | |
| window.open(url, '_blank'); |
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('fluentform/submission_inserted', 'bypass_admin_approval_email', 20, 3); | |
| function bypass_admin_approval_email($entryId, $formData, $form) | |
| { | |
| if($form->id != 7) { | |
| return; | |
| } | |
| $email = isset($formData['email']) ? sanitize_email($formData['email']) : ''; | |
| if ($email && is_email($email)) { |
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
| // Auto serial number | |
| add_filter('ninja_table_rendering_table_vars', function($table_vars, $table_id, $tableArray){ | |
| $target_id = 1320; | |
| if ($tableArray['table_id'] != $target_id) { | |
| return $table_vars; | |
| } | |
| $counter_column = [ | |
| 'name' => 'serial', | |
| 'key' => 'serial', |
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('fluentform/file_type_options', function ($types) { | |
| $types[] = [ | |
| 'label' => __('3d files - DWG, STL, STEP, STP, SKP, MAX, FBX, 3DS, IGES, OBJ', 'fluentform'), | |
| 'value' => 'dwg|stp|stl|STEP|skp|max|fbx|3ds|iges|obj', | |
| ]; | |
| return $types; | |
| }); | |
| add_filter('upload_mimes', function ($mime_types) { | |
| $mime_types ['dwg'] = 'image/vnd.dwg'; |