Asignar_membresia

$user_id = get_current_user_id(); if ($user_id == 0){ error_log( ‘Unable to get user id!’ ); return; } $id_familiar=($_GET[‘id_ben’]); global $wpdb; $results = $wpdb->get_results( “SELECT * FROM `Registro_Familiares` where id_registro_familiares=”.$id_familiar.” and id_usuario=”.$user_id ); ?> Correo electrónico Nunca compartiremos su correo electrónico con…Continue reading

Lista_grabaciones_beneficiario

$id_beneficiario=($_GET[‘id_usr’]); //$myData = file_get_contents(“https://kuidales.com/wp-json/kuidales/v1/be?cmd=interno&get=APICu&type=ben&id=”.$id_beneficiario); $myDataAudio = file_get_contents(“https://kuidales.com/wp-json/kuidales/v1/be?cmd=GetCalls&aid=1&fi=2024-10-02&ff=2024-10-03″); //$myObject = json_decode($myData); $myObjectdos = json_decode($myDataAudio); //$estatus = $myObject->status; $status = $myObjectdos->status; if($status==”sucsess”){ }else{ echo “Intentelo mas tarde, audio mal”; } //$myObjectMap = $myObject->data; $myObjectMapdos = $myObjectdos->data; ?> Nombre del agente Fecha Grabacion…Continue reading

MFP > Global Utilities

/** * Global Utilities * */ function get_city($s_id) { if (!$s_id) return; // if (function_exists(‘get_field_object’)) { if ($s_id && get_post_type($s_id) == ‘show’) { $post_id = $s_id; } elseif ($s_id && function_exists(‘get_field’) && get_field(‘show_relationship’, $s_id)) { $post_id = get_field(‘show_relationship’, $s_id)[0]; }…Continue reading

MFP > Shortcodes

//add_shortcode(‘show-at’, ‘show_at’); //function show_at($atts, $content) //{ // if (isset($atts[‘size’])) { // $class = ‘ class=” ‘ . $atts[‘size’] . ‘ “‘; // } else { // $class = ”; // }; // return ‘‘ . $content . ‘‘; //} add_shortcode(‘start-bold’,…Continue reading

MFP > CLASS > myfair_Show_Data

// this is the class definition class myfair_Show_Data { public function __construct() { $this->loadShows(); if (isset($this->showList) && is_array($this->showList) && count($this->showList) > 0) { $this->loadShowCustomData(); } } public function loadShows() { $loop = new WP_Query(array( ‘post_type’ => ‘show’, ‘post_parent’ => ‘0’,…Continue reading

MFP > Form Fields

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

0210 > process_booth_id

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

0260 > get_gallery_bdf_items

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

0230 > process_booth_status ???? get status for admin app

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

0220 > process_booth_select_field > DUPLICATEE? populate booth id select

// 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