Skip to content

Commit

Permalink
fix: add required attribute for various input field in dokan_post_inp…
Browse files Browse the repository at this point in the history
…ut_box function (#667)
  • Loading branch information
saimonh3 authored and sabbir1991 committed Sep 19, 2019
1 parent 153066f commit 7e07c73
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions includes/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -698,7 +698,7 @@ function dokan_post_input_box( $post_id, $meta_key, $attr = array(), $type = 'te
case 'textarea':
$rows = isset( $attr['rows'] ) ? absint( $attr['rows'] ) : 4;
?>
<textarea name="<?php echo esc_attr( $name ); ?>" id="<?php echo esc_attr( $name ); ?>" rows="<?php echo esc_attr( $rows ); ?>" class="<?php echo esc_attr( $class ); ?>" placeholder="<?php echo esc_attr( $placeholder ); ?>"><?php echo esc_textarea( $value ); ?></textarea>
<textarea <?php echo esc_attr( $required ); ?> name="<?php echo esc_attr( $name ); ?>" id="<?php echo esc_attr( $name ); ?>" rows="<?php echo esc_attr( $rows ); ?>" class="<?php echo esc_attr( $class ); ?>" placeholder="<?php echo esc_attr( $placeholder ); ?>"><?php echo esc_textarea( $value ); ?></textarea>
<?php
break;

Expand All @@ -709,7 +709,7 @@ function dokan_post_input_box( $post_id, $meta_key, $attr = array(), $type = 'te

<label class="<?php echo esc_attr( $class ); ?>" for="<?php echo esc_attr( $name ); ?>">
<input type="hidden" name="<?php echo esc_attr( $name ); ?>" value="no">
<input name="<?php echo esc_attr( $name ); ?>" id="<?php echo esc_attr( $name ); ?>" value="yes" type="checkbox"<?php checked( $value, 'yes' ); ?>>
<input <?php echo esc_attr( $required ); ?> name="<?php echo esc_attr( $name ); ?>" id="<?php echo esc_attr( $name ); ?>" value="yes" type="checkbox"<?php checked( $value, 'yes' ); ?>>
<?php echo esc_html( $label ); ?>
</label>

Expand Down

0 comments on commit 7e07c73

Please sign in to comment.