'text', 'id' => 'cx-ui-input-id', 'name' => 'cx-ui-input-name', 'value' => '', 'placeholder' => '', 'label' => '', 'class' => '', 'required' => false, ); /** * Get required attribute. * * @since 1.0.0 * @return string */ public function get_required() { if ( $this->settings['required'] ) { return 'required="required"'; } return ''; } /** * Render html UI_Text. * * @since 1.0.0 */ public function render() { $html = ''; $class = implode( ' ', array( $this->settings['class'], ) ); $html .= '
'; if ( '' !== $this->settings['label'] ) { $html .= ' '; } $html .= 'get_required() . '>'; $html .= '
'; return $html; } } }