Skip to content

Commit 5012827

Browse files
Adding input error message and adding style class for required fields
1 parent 2e004c3 commit 5012827

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/wp-includes/class-wp-customize-control.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -646,9 +646,11 @@ protected function render_content() {
646646
<div class="new-content-item-wrapper">
647647
<label for="create-input-<?php echo esc_attr( $this->id ); ?>"><?php _e( 'New page title' ); ?></label>
648648
<div class="new-content-item">
649-
<input type="text" id="create-input-<?php echo esc_attr( $this->id ); ?>" class="create-item-input" >
649+
<input type="text" id="create-input-<?php echo esc_attr( $this->id ); ?>" class="create-item-input form-required">
650650
<button type="button" class="button add-content"><?php _e( 'Add' ); ?></button>
651651
</div>
652+
<span id="create-input-<?php echo esc_attr( $this->id ); ?>-error" class="create-item-error error-message" style="display: none;"><?php _e( 'Please enter a page title' ); ?></span>
653+
652654
</div>
653655
<?php endif; ?>
654656
<?php

0 commit comments

Comments
 (0)