function get_city_field( $user_id = null, $role = null, $required = null, $readonly = null) { $field[‘name’] = ‘_city’; $field[‘label’] = ‘City’; $field[‘key’] = ‘city’; // // if( $user_id && in_array(‘exhibitor’, get_userdata( $user_id )->roles )){ // $field[‘label’] = ‘Gallery City’; //…Continue reading
function process_booth_id($_Cid){ $booth_dirty = get_field(‘booth_id’, $_Cid); if($booth_dirty === null || $booth_dirty === false || $booth_dirty === ” || $booth_dirty === ‘select’) return false; if(sanitize_title(trim($booth_dirty)) == ‘pending’) return ‘Pending’; $resp = []; $resp[‘full’] = $booth_dirty; $booth_dirty_arr = explode(‘_’, $booth_dirty); $resp[‘int’] =…Continue reading
function get_gallery_bdf_items($post_id){ $resp = array(); $sum = 0; $resp[‘gallery’] = get_userdata(get_post_field(‘post_author’, $post_id))->display_name; if (have_rows(‘booth_items’, $post_id)) while (have_rows(‘booth_items’, $post_id)) { the_row(); // var_dump(get_sub_field(‘price_tier’) == ‘complimentary’ || get_sub_field(‘price_tier’) == ‘included’); $id = get_sub_field(‘id’); if(get_sub_field(‘price_tier’) != ‘complimentary’ && get_sub_field(‘price_tier’) != ‘included’) { $resp[$id][]…Continue reading
function process_booth_status($_Cid){ $resp = []; $booth_data = process_booth_id($_Cid); if(!is_array($booth_data)) { $resp[‘status’] = ‘pending’; } if(is_array($booth_data) && !check_e_status(‘Booth Design Operations’, $_Cid)){ $resp[‘status’] = ‘build’; } if (is_array($booth_data) && check_e_status(‘Booth Design Operations’, $_Cid) && !check_e_status(‘Booth Design Curatorial’, $_Cid)) { $resp[‘status’] = ‘operations’;…Continue reading
// add_filter(‘acf/load_field/key=field_5b5e1e63ffa7d’, ‘process_booth_select_field’, 30); function process_booth_select_field($field) { global $post; if (!is_admin() || get_post_type($post->ID) != ‘application’) return $field; $s_id = get_field(‘show_relationship’, $post->ID)[0]; if (count($field) > 0) { $loop = get_posts(array( ‘post_status’ => array(‘private’), ‘post_type’ => array(‘application’), ‘posts_per_page’ => ‘-1’, ‘meta_query’ =>…Continue reading
function get_processed_booth_data($_Cid = null, $sq_ft = null) { // if(!get_field(‘booth_size’, $_Cid) || !get_field(‘booth_size’, $_Cid)) return; $currency = ‘$’; if($_Cid){ $s_id = get_field(‘show_relationship’, $_Cid)[0]; } else { global $post; $s_id = $post->post_parent; } if ($sq_ft !== null && $s_id !== null)…Continue reading
function get_processed_booth_data($_Cid = null, $sq_ft = null) { // if(!get_field(‘booth_size’, $_Cid) || !get_field(‘booth_size’, $_Cid)) return; $currency = ‘$’; if($_Cid){ $s_id = get_field(‘show_relationship’, $_Cid)[0]; } else { global $post; $s_id = $post->post_parent; } if ($sq_ft !== null && $s_id !== null)…Continue reading
add_filter(‘acf/load_field/name=booth_id’, ‘populate_booth_id_array’, 20, 1); function populate_booth_id_array($field) { global $post; if (!$post instanceof WP_Post || !is_admin()) return $field; $s_id = null; if (get_post_type($post->ID) == ‘show’) { $s_id = $post->ID; } elseif (get_post_type($post->ID) == ‘application’) { $s_id = get_field(‘show_relationship’, $post->ID)[0]; } else…Continue reading
add_filter(‘acf/load_field/name=booth_id’, ‘populate_booth_id_array’, 20, 1); function populate_booth_id_array($field) { global $post; if (!$post instanceof WP_Post || !is_admin()) return $field; $s_id = null; if (get_post_type($post->ID) == ‘show’) { $s_id = $post->ID; } elseif (get_post_type($post->ID) == ‘application’) { $s_id = get_field(‘show_relationship’, $post->ID)[0]; } else…Continue reading