PATH:
home
/
lab2454c
/
adenbic.com
/
wp-content
/
plugins
/
TemplatemelaMetaBox
/
inc
/
fields
<?php // Prevent loading this file directly defined( 'ABSPATH' ) || exit; // Make sure "select" field is loaded require_once RWMB_FIELDS_DIR . 'select.php'; if ( !class_exists( 'RWMB_Select_Advanced_Field' ) ) { class RWMB_Select_Advanced_Field extends RWMB_Select_Field { /** * Enqueue scripts and styles * * @return void */ static function admin_enqueue_scripts() { wp_enqueue_style( 'select2', RWMB_CSS_URL . 'select2/select2.css', array(), '3.2' ); wp_enqueue_style( 'rwmb-select-advanced', RWMB_CSS_URL . 'select-advanced.css', array(), RWMB_VER ); wp_register_script( 'select2', RWMB_JS_URL . 'select2/select2.min.js', array(), '3.2', true ); wp_enqueue_script( 'rwmb-select-advanced', RWMB_JS_URL . 'select-advanced.js', array( 'select2' ), RWMB_VER, true ); } /** * Get field HTML * * @param mixed $meta * @param array $field * * @return string */ static function html( $meta, $field ) { $html = sprintf( '<select class="rwmb-select-advanced" name="%s" id="%s" size="%s"%s data-options="%s">', $field['field_name'], $field['id'], $field['size'], $field['multiple'] ? ' multiple="multiple"' : '', esc_attr( json_encode( $field['js_options'] ) ) ); $html .= self::options_html( $field, $meta ); $html .= '</select>'; return $html; } /** * Normalize parameters for field * * @param array $field * * @return array */ static function normalize_field( $field ) { $field = parent::normalize_field( $field ); $field = wp_parse_args( $field, array( 'js_options' => array(), ) ); $field['js_options'] = wp_parse_args( $field['js_options'], array( 'allowClear' => true, 'width' => 'resolve', 'placeholder' => $field['placeholder'], ) ); return $field; } } }
[-] 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]