limitar_tamaño_tel

/** * Limit number range allowed for a Numbers field * Apply the class “wpf-num-limit” to the field to enable. * * @link https://wpforms.com/developers/how-to-limit-range-allowed-in-numbers-field/ */ function wpf_dev_num_limit() { ?>Continue reading

disable-field-wpforms

/** * Make standard form fields to make read-only * To apply, add CSS class ‘wpf-disable-field’ (no quotes) to field in form builder * * @link https://wpforms.com/developers/disable-a-form-field-to-prevent-user-input/ */ function wpf_dev_disable_field() { ?>Continue reading

Contar_Elementos_telefono

/* * Check the single line text field for profanity. * * @link https://wpforms.com/developers/wpforms_process_validate_text/ * * @param int $field_id Field ID. * @param array $field_submit Unsanitized field value submitted for the field. * @param array $form_data Form data and settings.…Continue reading

Modificar_Familiar

function wpf_snip_Modify_Familiar_process_complete( $fields, $entry, $form_data, $entry_id ) { // form #15755. if ( absint( $form_data[‘id’] ) !== 15755 ) { error_log(“Id form no encontrado”); return; } $user_id = get_current_user_id(); if ($user_id == 0){ error_log( ‘Unable to get user id!’ );…Continue reading

Agregar Miembro

function wpf_snip_StoreData_UserDB_process_complete( $fields, $entry, $form_data, $entry_id ) { // form #12330. if ( absint( $form_data[‘id’] ) !== 12330 ) { error_log(“Id form no encontrado”); error_log($form_data[‘id’]); return; } $user_id = get_current_user_id(); if ($user_id == 0){ error_log( ‘Unable to get user id!’…Continue reading

Agregar Familiar

function wpf_snip_StoreData_FamiliarUserDB_process_complete( $fields, $entry, $form_data, $entry_id ) { // form #12330. if ( absint( $form_data[‘id’] ) !== 12546 ) { error_log(“Id form no encontrado”); return; } $user_id = get_current_user_id(); if ($user_id == 0){ error_log( ‘************************************************************’ ); error_log( ‘No obtuvo el…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