/** * Check if there is a saved value for the "Other" text field. If so, set it as the $other_val. * Intended for front-end use * * @since 2.0 * * @param array $field * @param boolean $other_opt * @param string $checked * @param array $args should include opt_key and field name * @return string $other_val */ public static function prepare_other_input($field, &$other_opt, &$checked, $args = array()) { _deprecated_function(__FUNCTION__, '2.0.6', 'FrmFieldsHelper::prepare_other_input'); $args['field'] = $field; return FrmFieldsHelper::prepare_other_input($args, $other_opt, $checked); }
} } if (isset($field['post_field']) && $field['post_field'] == 'post_category') { do_action('frm_after_checkbox', array('field' => $field, 'field_name' => $field_name, 'type' => $field['type'])); } else { if ($field['options']) { foreach ($field['options'] as $opt_key => $opt) { if (isset($atts) && isset($atts['opt']) && $atts['opt'] != $opt_key) { continue; } $field_val = apply_filters('frm_field_value_saved', $opt, $opt_key, $field); $opt = apply_filters('frm_field_label_seen', $opt, $opt_key, $field); $checked = FrmAppHelper::check_selected($checked_values, $field_val) ? ' checked="checked"' : ''; // Check if other opt, and get values for other field if needed $other_opt = false; $other_args = FrmFieldsHelper::prepare_other_input(compact('field', 'field_name', 'opt_key'), $other_opt, $checked); ?> <div class="<?php echo esc_attr(apply_filters('frm_checkbox_class', 'frm_checkbox', $field, $field_val)); ?> " id="<?php echo esc_attr(FrmFieldsHelper::get_checkbox_id($field, $opt_key)); ?> "><?php if (!isset($atts) || !isset($atts['label']) || $atts['label']) { ?> <label for="<?php echo esc_attr($html_id); ?> -<?php echo esc_attr($opt_key);