name = 'qtranslate_text'; $this->label = __("Text",'acf'); $this->category = __("qTranslate",'acf'); $this->defaults = array( 'default_value' => '', 'maxlength' => '', 'placeholder' => '', 'prepend' => '', 'append' => '', 'readonly' => 0, 'disabled' => 0, ); acf_field::__construct(); } function render_field($field) { if (!acf_qtranslate_enabled()) { acf_field_text::render_field($field); return; } global $q_config; $languages = qtrans_getSortedLanguages(true); $values = qtrans_split($field['value'], $quicktags = true); // vars $o = array( 'type', 'id', 'class', 'name', 'value', 'placeholder' ); $s = array( 'readonly', 'disabled' ); $e = ''; // maxlength if( $field['maxlength'] !== "" ) { $o[] = 'maxlength'; } // populate atts $atts = array(); foreach( $o as $k ) { $atts[ $k ] = $field[ $k ]; } // special atts foreach( $s as $k ) { if( $field[ $k ] ) { $atts[ $k ] = $k; } } // render $e .= '