| | |
| | | } |
| | | |
| | | $output .= static::buildHint($config); |
| | | $output .= static::buildCharacterLimit($config); |
| | | $output .= static::buildDescription($name, $config); |
| | | |
| | | $output .= '</div>'; |
| | |
| | | ); |
| | | } |
| | | |
| | | protected static function buildCharacterLimit(array $config): string |
| | | { |
| | | if (empty($config['data']['limit'])) { |
| | | return ''; |
| | | } |
| | | return sprintf( |
| | | '<span class="char-limit"><span class="current">0</span> / <span class="limit">%s</span></span>', |
| | | esc_html($config['data']['limit']) |
| | | ); |
| | | } |
| | | |
| | | protected static function buildLabel(string $name, array $config):string |
| | | { |
| | | if (!empty($config['label'])) { |