PATH:
home
/
lab2454c
/
adenbic.com
/
wp-content
/
plugins
/
TemplatemelaMetaBox
/
inc
/
fields
<?php // Prevent loading this file directly defined( 'ABSPATH' ) || exit; if ( ! class_exists( 'RWMB_Text_Field' ) ) { class RWMB_Text_Field extends RWMB_Field { /** * Get field HTML * * @param mixed $meta * @param array $field * * @return string */ static function html( $meta, $field ) { return sprintf( '<input type="text" class="rwmb-text" name="%s" id="%s" value="%s" placeholder="%s" size="%s" %s>%s', $field['field_name'], $field['id'], $meta, $field['placeholder'], $field['size'], !$field['datalist'] ? '' : "list='{$field['datalist']['id']}'", self::datalist_html($field) ); } /** * Normalize parameters for field * * @param array $field * * @return array */ static function normalize_field( $field ) { $field = wp_parse_args( $field, array( 'size' => 30, 'datalist' => false, 'placeholder' => '', ) ); return $field; } /** * Create datalist, if any * * @param array $field * * @return array */ static function datalist_html( $field ) { if( !$field['datalist'] ) return ''; $datalist = $field['datalist']; $html = sprintf( '<datalist id="%s">', $datalist['id'] ); foreach( $datalist['options'] as $option ) { $html.= sprintf('<option value="%s"></option>', $option); } $html .= '</datalist>'; return $html; } } }
[-] image-select.php
[edit]
[-] select-advanced.php
[edit]
[-] image-advanced.php
[edit]
[-] checkbox-list.php
[edit]
[-] slider.php
[edit]
[-] hidden.php
[edit]
[-] range.php
[edit]
[+]
..
[-] email.php
[edit]
[-] file-input.php
[edit]
[-] button.php
[edit]
[-] password.php
[edit]
[-] taxonomy-advanced.php
[edit]
[-] post.php
[edit]
[-] number.php
[edit]
[-] datetime.php
[edit]
[-] checkbox.php
[edit]
[-] thickbox-image.php
[edit]
[-] color.php
[edit]
[-] select.php
[edit]
[-] plupload-image.php
[edit]
[-] url.php
[edit]
[-] file.php
[edit]
[-] file-advanced.php
[edit]
[-] textarea.php
[edit]
[-] taxonomy.php
[edit]
[-] oembed.php
[edit]
[-] radio.php
[edit]
[-] time.php
[edit]
[-] fieldset-text.php
[edit]
[-] divider.php
[edit]
[-] date.php
[edit]
[-] map.php
[edit]
[-] text-list.php
[edit]
[-] wysiwyg.php
[edit]
[-] text.php
[edit]
[-] heading.php
[edit]
[-] image.php
[edit]