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'; |
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
| $(".ff-name-address-wrapper.fluent-address.ff_map_autocomplete input").on('input', function() { | |
| $(".fluent-address :input:not(:focus)").prop("disabled", this.value.length); | |
| }); |
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 desc = Array.from(document.querySelectorAll('td.link')); | |
| desc.forEach((cell) => { | |
| let cellVal = cell.innerText.split(' '); | |
| cellVal.find((val)=>{ | |
| if(val.includes('@')){ | |
| let replaceText = cell.innerHTML.replace(val, `<a href="mailto:${val}">${val}</a>`); | |
| cell.innerHTML = replaceText; | |
| }else if(val.includes('http')){ | |
| let replaceText = cell.innerHTML.replace(val, `<a href="${val}">${val}</a>`); |
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('ninja_table_rendering_table_vars',function($table_vars, $table_id, $tableArray){ | |
| $target_id = [2607,2608];//add all tables ID here | |
| $tableId = 0; | |
| foreach($target_id as $id){ | |
| if($table_id == $id){ | |
| $tableId = $id; | |
| } | |
| } |
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($){ | |
| //Shuffle all rows, while keeping the first column | |
| //Requires: Shuffle | |
| $.fn.shuffleRows = function(){ | |
| return this.each(function(){ | |
| var main = $(/table/i.test(this.tagName) ? this.tBodies[0] : this); | |
| var firstElem = [], counter=0; | |
| main.children().each(function(){ | |
| firstElem.push(this.firstChild); | |
| }); |
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('ninja_tables_get_public_data', function ($data, $tableId) { | |
| if ($tableId == 3156) { | |
| for($i = 0; $i < count($data); $i++){ | |
| $val = $data[$i]['player_ranking']; | |
| $arr = []; | |
| $icon = '[nt_icon icon="star" color="orange"]'; | |
| for($j = 1; $j<= $val; $j++){ | |
| array_push($arr, $icon); |