Make WordPress Core

Changeset 9436


Ignore:
Timestamp:
10/31/2008 06:05:25 PM (17 years ago)
Author:
markjaquith
Message:

Improvements to the Edit Comment screen

Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/css/colors-fresh.css

    r9434 r9436  
    890890
    891891#timestampdiv input,
    892 #emaildiv input,
    893 #uridiv input,
    894 .stuffbox #name {
     892#namediv input {
    895893    border-color: #ddd;
    896894}
  • trunk/wp-admin/edit-form-comment.php

    r9434 r9436  
    3333<div id="side-info-column" class="inner-sidebar">
    3434<div id="submitdiv" class="stuffbox" >
    35 <h3><span class='hndle'>Save</span></h3>
     35<h3><span class='hndle'>Status</span></h3>
    3636<div class="inside">
    3737<div class="submitbox" id="submitcomment">
     
    4040<div id="misc-pub-block-1">
    4141<div class="misc-pub-section" id="comment-status-radio">
    42 <p><?php _e('Status:') ?></p>
    4342<label class="approved"><input type="radio"<?php checked( $comment->comment_approved, '1' ); ?> name="comment_status" value="1" /><?php _e('Approved') ?></label><br />
    4443<label class="waiting"><input type="radio"<?php checked( $comment->comment_approved, '0' ); ?> name="comment_status" value="0" /><?php _e('Awaiting Moderation') ?></label><br />
     
    8180
    8281<div id="namediv" class="stuffbox">
    83 <h3><label for="name"><?php _e('Name') ?></label></h3>
     82<h3><label for="name"><?php _e( 'Author' ) ?></label></h3>
    8483<div class="inside">
    85 <input type="text" name="newcomment_author" size="30" value="<?php echo attribute_escape( $comment->comment_author ); ?>" tabindex="1" id="name" />
     84<table class="form-table">
     85<tbody>
     86<tr valign="top">
     87    <td class="first"><?php _e( 'Name:' ); ?></td>
     88    <td><input type="text" name="newcomment_author" size="30" value="<?php echo attribute_escape( $comment->comment_author ); ?>" tabindex="1" id="name" /></td>
     89</tr>
     90<tr valign="top">
     91    <td class="first">
     92    <?php
     93        if ( $email ) {
     94            printf( __( 'E-mail (%s):' ), get_comment_author_email_link( __( 'send e-mail' ), '', '' ) );
     95        } else {
     96            _e( 'E-mail:' );
     97        }
     98?></td>
     99    <td><input type="text" name="newcomment_author_email" size="30" value="<?php echo $email; ?>" tabindex="2" id="email" /></td>
     100</tr>
     101<tr valign="top">
     102    <td class="first">
     103    <?php
     104        $url = get_comment_author_url();
     105        if ( ! empty( $url ) && 'http://' != $url ) {
     106            $link = "<a href='$url' rel='external nofollow' target='_blank'>" . __('visit site') . "</a>";
     107            printf( __( 'URL (%s):' ), apply_filters('get_comment_author_link', $link ) );
     108        } else {
     109            _e( 'URL:' );
     110        } ?></td>
     111    <td><input type="text" id="newcomment_author_url" name="newcomment_author_url" size="30" value="<?php echo $url; ?>" tabindex="3" /></td>
     112</tr>
     113</tbody>
     114</table>
     115<br />
    86116</div>
    87117</div>
     
    90120<?php the_editor($comment->comment_content, 'content', 'newcomment_author_url', false, 4); ?>
    91121<?php wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false ); ?>
    92 </div>
    93 
    94 <div id="emaildiv" class="stuffbox">
    95 <h3><label for="email"><?php _e('E-mail') ?></label></h3>
    96 <div class="inside">
    97 <input type="text" name="newcomment_author_email" size="30" value="<?php echo $email; ?>" tabindex="2" id="email" />
    98 <?php if ( $email )
    99     comment_author_email_link( __('Send Email'), '<p>', '</p>'); ?>
    100 </div>
    101 </div>
    102 
    103 <div id="uridiv" class="stuffbox">
    104 <h3><label for="newcomment_author_url"><?php _e('URL') ?></label></h3>
    105 <div class="inside">
    106 <input type="text" id="newcomment_author_url" name="newcomment_author_url" size="30" value="<?php echo $url; ?>" tabindex="3" />
    107 <?php if ( ! empty( $url ) && 'http://' != $url ) {
    108     $url = get_comment_author_url();
    109     $link = "<a href='$url' rel='external nofollow' target='_blank'>" . __('Visit site') . "</a>";
    110    
    111     echo '<p>' . apply_filters('get_comment_author_link', $link) . '</p>';
    112 } ?>
    113 </div>
    114122</div>
    115123
  • trunk/wp-admin/wp-admin.css

    r9434 r9436  
    406406}
    407407
    408 #emaildiv input,
    409 #uridiv input,
    410 .stuffbox #name {
     408#namediv table {
     409    width: 100%;
     410}
     411
     412#namediv td.first {
     413    width: 10px;
     414    white-space: nowrap;
     415}
     416
     417#namediv input {
    411418    width: 94%;
    412419    border-style: solid;
    413420    border-width: 1px;
     421}
     422
     423#namediv p {
     424    margin: 10px 0;
    414425}
    415426
  • trunk/wp-includes/comment-template.php

    r9424 r9436  
    8181 * @since 0.71
    8282 * @uses apply_filters() Calls 'comment_email' hook for the display of the comment author's email
     83 * @uses get_comment_author_email_link() For generating the link
    8384 * @global object $comment The current Comment row object
    8485 *
     
    8889 */
    8990function comment_author_email_link($linktext='', $before='', $after='') {
     91    if ( $link = get_comment_author_email_link( $linktext, $before, $after ) )
     92        echo $link;
     93}
     94
     95/**
     96 * Return the html email link to the author of the current comment.
     97 *
     98 * Care should be taken to protect the email address and assure that email
     99 * harvesters do not capture your commentors' email address. Most assume that
     100 * their email address will not appear in raw form on the blog. Doing so will
     101 * enable anyone, including those that people don't want to get the email
     102 * address and use it for their own means good and bad.
     103 *
     104 * @since 2.7
     105 * @uses apply_filters() Calls 'comment_email' hook for the display of the comment author's email
     106 * @global object $comment The current Comment row object
     107 *
     108 * @param string $linktext The text to display instead of the comment author's email address
     109 * @param string $before The text or HTML to display before the email link.
     110 * @param string $after The text or HTML to display after the email link.
     111 */
     112function get_comment_author_email_link($linktext='', $before='', $after='') {
    90113    global $comment;
    91114    $email = apply_filters('comment_email', $comment->comment_author_email);
    92115    if ((!empty($email)) && ($email != '@')) {
    93116    $display = ($linktext != '') ? $linktext : $email;
    94         echo $before;
    95         echo "<a href='mailto:$email'>$display</a>";
    96         echo $after;
     117        $return  = $before;
     118        $return .= "<a href='mailto:$email'>$display</a>";
     119        $return .= $after;
     120        return $return;
     121    } else {
     122        return '';
    97123    }
    98124}
  • trunk/wp-includes/script-loader.php

    r9430 r9436  
    329329    $rtl_styles = array( 'global', 'colors', 'dashboard', 'ie', 'install', 'login', 'media', 'theme-editor', 'upload', 'widgets', 'press-this', 'press-this-ie' );
    330330
    331     $styles->add( 'wp-admin', '/wp-admin/wp-admin.css', array(), '20081030b' );
     331    $styles->add( 'wp-admin', '/wp-admin/wp-admin.css', array(), '20081031' );
    332332    $styles->add_data( 'wp-admin', 'rtl', '/wp-admin/rtl.css' );
    333333
     
    336336
    337337    $styles->add( 'colors', true ); // Register "meta" stylesheet for admin colors
    338     $styles->add( 'colors-fresh', '/wp-admin/css/colors-fresh.css', array(), '20081030'); // for login.php.  Is there a better way?
     338    $styles->add( 'colors-fresh', '/wp-admin/css/colors-fresh.css', array(), '20081031'); // for login.php.  Is there a better way?
    339339    $styles->add_data( 'colors-fresh', 'rtl', true );
    340340
Note: See TracChangeset for help on using the changeset viewer.