Make WordPress Core

Changeset 1261


Ignore:
Timestamp:
05/10/2004 09:25:23 AM (21 years ago)
Author:
saxmatt
Message:

If name and email required, reflect that on the form.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-comments.php

    r1214 r1261  
    22    if ('wp-comments.php' == basename($_SERVER['SCRIPT_FILENAME']))
    33        die ('Please do not load this page directly. Thanks!');
     4    $req = get_settings('require_name_email');
    45    if (($withcomments) or ($single)) {
    56
     
    5354    <p>
    5455      <input type="text" name="author" id="author" class="textarea" value="<?php echo $comment_author; ?>" size="28" tabindex="1" />
    55        <label for="author"><?php _e("Name"); ?></label>
     56       <label for="author"><?php _e("Name"); ?></label> <?php if ($req) _e('(required)'); ?>
    5657    <input type="hidden" name="comment_post_ID" value="<?php echo $id; ?>" />
    5758    <input type="hidden" name="redirect_to" value="<?php echo htmlspecialchars($_SERVER["REQUEST_URI"]); ?>" />
     
    6061    <p>
    6162      <input type="text" name="email" id="email" value="<?php echo $comment_author_email; ?>" size="28" tabindex="2" />
    62        <label for="email"><?php _e("E-mail"); ?></label>
     63       <label for="email"><?php _e("E-mail"); ?></label> <?php if ($req) _e('(required)'); ?>
    6364    </p>
    6465
Note: See TracChangeset for help on using the changeset viewer.