From 698b1f1e4aded8e421f7b8587167fb238fd6c492 Mon Sep 17 00:00:00 2001 From: markjaquith Date: Fri, 31 Oct 2008 18:05:25 +0000 Subject: [PATCH] Improvements to the Edit Comment screen git-svn-id: http://svn.automattic.com/wordpress/trunk@9436 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/css/colors-fresh.css | 4 +-- wp-admin/edit-form-comment.php | 60 ++++++++++++++++++-------------- wp-admin/wp-admin.css | 17 +++++++-- wp-includes/comment-template.php | 32 +++++++++++++++-- wp-includes/script-loader.php | 4 +-- 5 files changed, 80 insertions(+), 37 deletions(-) diff --git a/wp-admin/css/colors-fresh.css b/wp-admin/css/colors-fresh.css index 154feb6e7b..3f266e0fa0 100644 --- a/wp-admin/css/colors-fresh.css +++ b/wp-admin/css/colors-fresh.css @@ -889,9 +889,7 @@ abbr.required, } #timestampdiv input, -#emaildiv input, -#uridiv input, -.stuffbox #name { +#namediv input { border-color: #ddd; } diff --git a/wp-admin/edit-form-comment.php b/wp-admin/edit-form-comment.php index 6ef3cbc94e..889b5147ff 100644 --- a/wp-admin/edit-form-comment.php +++ b/wp-admin/edit-form-comment.php @@ -32,14 +32,13 @@ $url = attribute_escape( $comment->comment_author_url );
-

Save

+

Status

-



@@ -80,9 +79,40 @@ $date = date_i18n( $datef, strtotime( $comment->comment_date ) );
-

+

- + + + + + + + + + + + + + + + +
+
+ " . __('visit site') . ""; + printf( __( 'URL (%s):' ), apply_filters('get_comment_author_link', $link ) ); + } else { + _e( 'URL:' ); + } ?>
+
@@ -91,28 +121,6 @@ $date = date_i18n( $datef, strtotime( $comment->comment_date ) );
-
-

-
- -', '

'); ?> -
-
- -
-

-
- -" . __('Visit site') . ""; - - echo '

' . apply_filters('get_comment_author_link', $link) . '

'; -} ?> -
-
- diff --git a/wp-admin/wp-admin.css b/wp-admin/wp-admin.css index 88a219a032..3594eaf622 100644 --- a/wp-admin/wp-admin.css +++ b/wp-admin/wp-admin.css @@ -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; } diff --git a/wp-includes/comment-template.php b/wp-includes/comment-template.php index 1e85685f53..f95d6fdc80 100644 --- a/wp-includes/comment-template.php +++ b/wp-includes/comment-template.php @@ -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 "$display"; - echo $after; + $return = $before; + $return .= "$display"; + $return .= $after; + return $return; + } else { + return ''; } } diff --git a/wp-includes/script-loader.php b/wp-includes/script-loader.php index d49ec6d086..b05e82264b 100644 --- a/wp-includes/script-loader.php +++ b/wp-includes/script-loader.php @@ -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' );