PATH:
home
/
letacommog
/
supportleta
/
wp-content
/
themes
/
easyweb
/
inc
/
meta-box
/
inc
/
fields
<?php /** * Fieldset text class. */ class RWMB_Fieldset_Text_Field extends RWMB_Text_Field { /** * Get field HTML * * @param mixed $meta * @param array $field * * @return string */ static function html( $meta, $field ) { $html = array(); $tpl = '<label>%s %s</label>'; foreach ( $field['options'] as $key => $label ) { $value = isset( $meta[$key] ) ? $meta[$key] : ''; $field['attributes']['name'] = $field['field_name'] . "[{$key}]"; $html[] = sprintf( $tpl, $label, parent::html( $value, $field ) ); } $out = '<fieldset><legend>' . $field['desc'] . '</legend>' . implode( ' ', $html ) . '</fieldset>'; return $out; } /** * Normalize parameters for field * * @param array $field * * @return array */ static function normalize( $field ) { $field = parent::normalize( $field ); $field['multiple'] = false; $field['attributes']['id'] = false; return $field; } /** * Output the field value * Display options in format Label: value in unordered list * * @param array $field Field parameters * @param array $args Additional arguments. Not used for these fields. * @param int|null $post_id Post ID. null for current post. Optional. * * @return mixed Field value */ static function the_value( $field, $args = array(), $post_id = null ) { $value = self::get_value( $field, $args, $post_id ); if ( ! $value ) return ''; $output = '<table>'; $output .= '<thead><tr>'; foreach ( $field['options'] as $label ) { $output .= "<th>$label</th>"; } $output .= '</tr></thead><tbody>'; foreach ( $value as $subvalue ) { $output .= '<tr>'; foreach ( $subvalue as $value ) { $output .= "<td>$value</td>"; } $output .= '</tr>'; } $output .= '</tbody></table>'; return $output; } }
[+]
..
[-] oembed.php
[edit]
[-] taxonomy-advanced.php
[edit]
[-] email.php
[edit]
[-] autocomplete.php
[edit]
[-] multiple-values.php
[edit]
[-] input-list.php
[edit]
[-] checkbox-list.php
[edit]
[-] button.php
[edit]
[-] object-choice.php
[edit]
[-] image-select.php
[edit]
[-] radio.php
[edit]
[-] fieldset-text.php
[edit]
[-] heading.php
[edit]
[-] hidden.php
[edit]
[-] user.php
[edit]
[-] time.php
[edit]
[-] file-upload.php
[edit]
[-] text-list.php
[edit]
[-] textarea.php
[edit]
[-] url.php
[edit]
[-] key-value.php
[edit]
[-] date.php
[edit]
[-] wysiwyg.php
[edit]
[-] password.php
[edit]
[-] text.php
[edit]
[-] file-advanced.php
[edit]
[-] post.php
[edit]
[-] map.php
[edit]
[-] select-advanced.php
[edit]
[-] plupload-image.php
[edit]
[-] file.php
[edit]
[-] image-upload.php
[edit]
[-] number.php
[edit]
[-] taxonomy.php
[edit]
[-] file-input.php
[edit]
[-] slider.php
[edit]
[-] thickbox-image.php
[edit]
[-] datetime.php
[edit]
[-] divider.php
[edit]
[-] color.php
[edit]
[-] custom-html.php
[edit]
[-] image-advanced.php
[edit]
[-] media.php
[edit]
[-] select-tree.php
[edit]
[-] choice.php
[edit]
[-] input.php
[edit]
[-] range.php
[edit]
[-] select.php
[edit]
[-] switcher.php
[edit]
[-] checkbox.php
[edit]
[-] image.php
[edit]