Improvements to the Edit Comment screen
git-svn-id: http://svn.automattic.com/wordpress/trunk@9436 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
a9a114843b
commit
698b1f1e4a
|
@ -889,9 +889,7 @@ abbr.required,
|
|||
}
|
||||
|
||||
#timestampdiv input,
|
||||
#emaildiv input,
|
||||
#uridiv input,
|
||||
.stuffbox #name {
|
||||
#namediv input {
|
||||
border-color: #ddd;
|
||||
}
|
||||
|
||||
|
|
|
@ -32,14 +32,13 @@ $url = attribute_escape( $comment->comment_author_url );
|
|||
|
||||
<div id="side-info-column" class="inner-sidebar">
|
||||
<div id="submitdiv" class="stuffbox" >
|
||||
<h3><span class='hndle'>Save</span></h3>
|
||||
<h3><span class='hndle'>Status</span></h3>
|
||||
<div class="inside">
|
||||
<div class="submitbox" id="submitcomment">
|
||||
<div id="minor-publishing">
|
||||
<div id="misc-publishing-actions">
|
||||
<div id="misc-pub-block-1">
|
||||
<div class="misc-pub-section" id="comment-status-radio">
|
||||
<p><?php _e('Status:') ?></p>
|
||||
<label class="approved"><input type="radio"<?php checked( $comment->comment_approved, '1' ); ?> name="comment_status" value="1" /><?php _e('Approved') ?></label><br />
|
||||
<label class="waiting"><input type="radio"<?php checked( $comment->comment_approved, '0' ); ?> name="comment_status" value="0" /><?php _e('Awaiting Moderation') ?></label><br />
|
||||
<label class="spam"><input type="radio"<?php checked( $comment->comment_approved, 'spam' ); ?> name="comment_status" value="spam" /><?php _e('Spam') ?></label>
|
||||
|
@ -80,9 +79,40 @@ $date = date_i18n( $datef, strtotime( $comment->comment_date ) );
|
|||
<div id="post-body-content" class="has-sidebar-content">
|
||||
|
||||
<div id="namediv" class="stuffbox">
|
||||
<h3><label for="name"><?php _e('Name') ?></label></h3>
|
||||
<h3><label for="name"><?php _e( 'Author' ) ?></label></h3>
|
||||
<div class="inside">
|
||||
<input type="text" name="newcomment_author" size="30" value="<?php echo attribute_escape( $comment->comment_author ); ?>" tabindex="1" id="name" />
|
||||
<table class="form-table">
|
||||
<tbody>
|
||||
<tr valign="top">
|
||||
<td class="first"><?php _e( 'Name:' ); ?></td>
|
||||
<td><input type="text" name="newcomment_author" size="30" value="<?php echo attribute_escape( $comment->comment_author ); ?>" tabindex="1" id="name" /></td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td class="first">
|
||||
<?php
|
||||
if ( $email ) {
|
||||
printf( __( 'E-mail (%s):' ), get_comment_author_email_link( __( 'send e-mail' ), '', '' ) );
|
||||
} else {
|
||||
_e( 'E-mail:' );
|
||||
}
|
||||
?></td>
|
||||
<td><input type="text" name="newcomment_author_email" size="30" value="<?php echo $email; ?>" tabindex="2" id="email" /></td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td class="first">
|
||||
<?php
|
||||
$url = get_comment_author_url();
|
||||
if ( ! empty( $url ) && 'http://' != $url ) {
|
||||
$link = "<a href='$url' rel='external nofollow' target='_blank'>" . __('visit site') . "</a>";
|
||||
printf( __( 'URL (%s):' ), apply_filters('get_comment_author_link', $link ) );
|
||||
} else {
|
||||
_e( 'URL:' );
|
||||
} ?></td>
|
||||
<td><input type="text" id="newcomment_author_url" name="newcomment_author_url" size="30" value="<?php echo $url; ?>" tabindex="3" /></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<br />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -91,28 +121,6 @@ $date = date_i18n( $datef, strtotime( $comment->comment_date ) );
|
|||
<?php wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false ); ?>
|
||||
</div>
|
||||
|
||||
<div id="emaildiv" class="stuffbox">
|
||||
<h3><label for="email"><?php _e('E-mail') ?></label></h3>
|
||||
<div class="inside">
|
||||
<input type="text" name="newcomment_author_email" size="30" value="<?php echo $email; ?>" tabindex="2" id="email" />
|
||||
<?php if ( $email )
|
||||
comment_author_email_link( __('Send Email'), '<p>', '</p>'); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="uridiv" class="stuffbox">
|
||||
<h3><label for="newcomment_author_url"><?php _e('URL') ?></label></h3>
|
||||
<div class="inside">
|
||||
<input type="text" id="newcomment_author_url" name="newcomment_author_url" size="30" value="<?php echo $url; ?>" tabindex="3" />
|
||||
<?php if ( ! empty( $url ) && 'http://' != $url ) {
|
||||
$url = get_comment_author_url();
|
||||
$link = "<a href='$url' rel='external nofollow' target='_blank'>" . __('Visit site') . "</a>";
|
||||
|
||||
echo '<p>' . apply_filters('get_comment_author_link', $link) . '</p>';
|
||||
} ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php do_meta_boxes('comment', 'normal', $comment); ?>
|
||||
|
||||
<input type="hidden" name="c" value="<?php echo $comment->comment_ID ?>" />
|
||||
|
|
|
@ -405,14 +405,25 @@ textarea.all-options, input.all-options {
|
|||
padding: 0;
|
||||
}
|
||||
|
||||
#emaildiv input,
|
||||
#uridiv input,
|
||||
.stuffbox #name {
|
||||
#namediv table {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#namediv td.first {
|
||||
width: 10px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
#namediv input {
|
||||
width: 94%;
|
||||
border-style: solid;
|
||||
border-width: 1px;
|
||||
}
|
||||
|
||||
#namediv p {
|
||||
margin: 10px 0;
|
||||
}
|
||||
|
||||
#wpbody-content .metabox-holder {
|
||||
padding-top: 10px;
|
||||
}
|
||||
|
|
|
@ -80,6 +80,7 @@ function comment_author_email() {
|
|||
*
|
||||
* @since 0.71
|
||||
* @uses apply_filters() Calls 'comment_email' hook for the display of the comment author's email
|
||||
* @uses get_comment_author_email_link() For generating the link
|
||||
* @global object $comment The current Comment row object
|
||||
*
|
||||
* @param string $linktext The text to display instead of the comment author's email address
|
||||
|
@ -87,13 +88,38 @@ function comment_author_email() {
|
|||
* @param string $after The text or HTML to display after the email link.
|
||||
*/
|
||||
function comment_author_email_link($linktext='', $before='', $after='') {
|
||||
if ( $link = get_comment_author_email_link( $linktext, $before, $after ) )
|
||||
echo $link;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the html email link to the author of the current comment.
|
||||
*
|
||||
* Care should be taken to protect the email address and assure that email
|
||||
* harvesters do not capture your commentors' email address. Most assume that
|
||||
* their email address will not appear in raw form on the blog. Doing so will
|
||||
* enable anyone, including those that people don't want to get the email
|
||||
* address and use it for their own means good and bad.
|
||||
*
|
||||
* @since 2.7
|
||||
* @uses apply_filters() Calls 'comment_email' hook for the display of the comment author's email
|
||||
* @global object $comment The current Comment row object
|
||||
*
|
||||
* @param string $linktext The text to display instead of the comment author's email address
|
||||
* @param string $before The text or HTML to display before the email link.
|
||||
* @param string $after The text or HTML to display after the email link.
|
||||
*/
|
||||
function get_comment_author_email_link($linktext='', $before='', $after='') {
|
||||
global $comment;
|
||||
$email = apply_filters('comment_email', $comment->comment_author_email);
|
||||
if ((!empty($email)) && ($email != '@')) {
|
||||
$display = ($linktext != '') ? $linktext : $email;
|
||||
echo $before;
|
||||
echo "<a href='mailto:$email'>$display</a>";
|
||||
echo $after;
|
||||
$return = $before;
|
||||
$return .= "<a href='mailto:$email'>$display</a>";
|
||||
$return .= $after;
|
||||
return $return;
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -328,14 +328,14 @@ function wp_default_styles( &$styles ) {
|
|||
|
||||
$rtl_styles = array( 'global', 'colors', 'dashboard', 'ie', 'install', 'login', 'media', 'theme-editor', 'upload', 'widgets', 'press-this', 'press-this-ie' );
|
||||
|
||||
$styles->add( 'wp-admin', '/wp-admin/wp-admin.css', array(), '20081030b' );
|
||||
$styles->add( 'wp-admin', '/wp-admin/wp-admin.css', array(), '20081031' );
|
||||
$styles->add_data( 'wp-admin', 'rtl', '/wp-admin/rtl.css' );
|
||||
|
||||
$styles->add( 'ie', '/wp-admin/css/ie.css' );
|
||||
$styles->add_data( 'ie', 'conditional', 'gte IE 6' );
|
||||
|
||||
$styles->add( 'colors', true ); // Register "meta" stylesheet for admin colors
|
||||
$styles->add( 'colors-fresh', '/wp-admin/css/colors-fresh.css', array(), '20081030'); // for login.php. Is there a better way?
|
||||
$styles->add( 'colors-fresh', '/wp-admin/css/colors-fresh.css', array(), '20081031'); // for login.php. Is there a better way?
|
||||
$styles->add_data( 'colors-fresh', 'rtl', true );
|
||||
|
||||
$styles->add( 'global', '/wp-admin/css/global.css', array(), '20081030' );
|
||||
|
|
Loading…
Reference in New Issue