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 | |
| function set_parent_id($id){ | |
| $parent_id = get_field('parent_id', $id); | |
| $args = array( | |
| 'posts_per_page' =>1, | |
| 'post_type' => 'page', | |
| 'meta_query' => array( |
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('gform_validation', 'limit_file_upload_size'); | |
| function limit_file_upload_size( $validation_result ) { | |
| $form = $validation_result['form']; | |
| $total_file_size = 0; | |
| $num_files = 0; | |
| $max_file_size = 41943040; //40MB - https://convertlive.com/u/convert/megabytes/to/bytes | |
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 sortMyThings($things) { | |
| uasort($things, function($left, $right) { | |
| $l1 = strtoupper(clean($left['manufacturer'])); | |
| $r1 = strtoupper(clean($right['manufacturer'])); | |
| if (0 !== strcmp($l1, $r1)) return strcmp($l1, $r1) < 0? -1 : 1; | |
| $l2 = strtoupper(clean($left['brand'])); | |
| $r2 = strtoupper(clean($right['brand'])); |
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 | |
| $grouped = []; | |
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 | |
| function clean($string) { | |
| return str_replace('*', '', $string); | |
| } | |
| function sortMyThings($things) { | |
| uasort($things, function($left, $right) { | |
| $left = strtoupper(clean($left['name'])); | |
| $right = strtoupper(clean($right['name'])); |
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 resortbrands($a,$b){ | |
| $a = preg_replace('/(\*|\.){2,}/', '$1', $a); | |
| $b = preg_replace('/(\*|\.){2,}/', '$1', $b); | |
| return strcmp($a,$b); | |
| } | |
| uasort($package, 'resortbrands'); |
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 | |
| $output = ''; | |
| $fields = wcf_get_form_search_values($id); | |
| $settings = wcf_get_form_search_settings($id); | |
| $columns = $settings['columns_per_row'] != '' ? $settings['columns_per_row'] : 3; | |
| $template_loop = 'wcf-loop'; | |
| if ($settings['search_type'] == 'single') { | |
| if (!post_type_exists($settings['post_type'][0])) { | |
| return __('The post type: ' . $settings['post_type'] .' doesn\'t existing', WORDPRESS_CONTENT_FILTER_LANG); |
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 | |
| $output = array(); | |
| if(isset($med_sciences) && $med_sciences[0]=="Y"){ | |
| array_push($output , 'Medical Sciences'); | |
| } | |
| if(isset($food_ag) && $food_ag[0]=="Y"){ |
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
| foreach ($entries as $entry){ | |
| $xmlstr = <<<XML | |
| <?xml version='1.0' encoding='UTF-8'?> | |
| <complaints></complaints> | |
| XML; | |
| $complaints = new SimpleXMLElement($xmlstr); | |
NewerOlder