Changeset 10102
- Timestamp:
- 12/07/2008 07:10:47 AM (16 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/edit-comments.php
r10082 r10102 191 191 list($_comments, $total) = _wp_get_comment_list( $comment_status, $search_dirty, $start, $comments_per_page + 5, $post_id, $comment_type ); // Grab a few extra 192 192 193 $_comment_post_ids = array(); 194 foreach ( $_comments as $_c ) { 195 $_comment_post_ids[] = $_c->comment_post_ID; 196 } 197 $_comment_pending_count_temp = (array) get_pending_comments_num($_comment_post_ids); 198 foreach ( (array) $_comment_post_ids as $_cpid ) 199 $_comment_pending_count[$_cpid] = isset( $_comment_pending_count_temp[$_cpid] ) ? $_comment_pending_count_temp[$_cpid] : 0; 200 if ( empty($_comment_pending_count) ) 201 $_comment_pending_count = array(); 202 193 203 $comments = array_slice($_comments, 0, $comments_per_page); 194 204 $extra_comments = array_slice($_comments, $comments_per_page); -
trunk/wp-admin/includes/template.php
r10092 r10102 1945 1945 */ 1946 1946 function _wp_comment_row( $comment_id, $mode, $comment_status, $checkbox = true, $from_ajax = false ) { 1947 global $comment, $post ;1947 global $comment, $post, $_comment_pending_count; 1948 1948 $comment = get_comment( $comment_id ); 1949 1949 $post = get_post($comment->comment_post_ID); 1950 1950 $the_comment_status = wp_get_comment_status($comment->comment_ID); 1951 1952 if ( current_user_can( 'edit_post', $post->ID ) ) {1953 $post_link = "<a href='" . get_edit_post_link($post->ID) . "'>";1954 $post_link .= get_the_title($comment->comment_post_ID) . '</a>';1955 } else {1956 $post_link = get_the_title($comment->comment_post_ID);1957 }1958 1951 1959 1952 $author_url = get_comment_author_url(); … … 1972 1965 $ptime = mysql2date(__('Y/m/d \a\t g:i A'), $comment->comment_date ); 1973 1966 1974 $delete_url = clean_url( wp_nonce_url( "comment.php?action=deletecomment&p=$ comment->comment_post_ID&c=$comment->comment_ID", "delete-comment_$comment->comment_ID" ) );1975 $approve_url = clean_url( wp_nonce_url( "comment.php?action=approvecomment&p=$ comment->comment_post_ID&c=$comment->comment_ID", "approve-comment_$comment->comment_ID" ) );1976 $unapprove_url = clean_url( wp_nonce_url( "comment.php?action=unapprovecomment&p=$ comment->comment_post_ID&c=$comment->comment_ID", "unapprove-comment_$comment->comment_ID" ) );1977 $spam_url = clean_url( wp_nonce_url( "comment.php?action=deletecomment&dt=spam&p=$ comment->comment_post_ID&c=$comment->comment_ID", "delete-comment_$comment->comment_ID" ) );1967 $delete_url = clean_url( wp_nonce_url( "comment.php?action=deletecomment&p=$post->ID&c=$comment->comment_ID", "delete-comment_$comment->comment_ID" ) ); 1968 $approve_url = clean_url( wp_nonce_url( "comment.php?action=approvecomment&p=$post->ID&c=$comment->comment_ID", "approve-comment_$comment->comment_ID" ) ); 1969 $unapprove_url = clean_url( wp_nonce_url( "comment.php?action=unapprovecomment&p=$post->ID&c=$comment->comment_ID", "unapprove-comment_$comment->comment_ID" ) ); 1970 $spam_url = clean_url( wp_nonce_url( "comment.php?action=deletecomment&dt=spam&p=$post->ID&c=$comment->comment_ID", "delete-comment_$comment->comment_ID" ) ); 1978 1971 1979 1972 echo "<tr id='comment-$comment->comment_ID' class='$the_comment_status'>"; … … 1993 1986 if ( !$checkbox ) break; 1994 1987 echo '<th scope="row" class="check-column">'; 1995 if ( current_user_can('edit_post', $ comment->comment_post_ID) ) echo "<input type='checkbox' name='delete_comments[]' value='$comment->comment_ID' />";1988 if ( current_user_can('edit_post', $post->ID) ) echo "<input type='checkbox' name='delete_comments[]' value='$comment->comment_ID' />"; 1996 1989 echo '</th>'; 1997 1990 break; … … 2012 2005 $actions = array(); 2013 2006 2014 if ( current_user_can('edit_post', $ comment->comment_post_ID) ) {2007 if ( current_user_can('edit_post', $post->ID) ) { 2015 2008 $actions['approve'] = "<a href='$approve_url' class='dim:the-comment-list:comment-$comment->comment_ID:unapproved:e7e7d3:e7e7d3:new=approved vim-a' title='" . __( 'Approve this comment' ) . "'>" . __( 'Approve' ) . '</a>'; 2016 2009 $actions['unapprove'] = "<a href='$unapprove_url' class='dim:the-comment-list:comment-$comment->comment_ID:unapproved:e7e7d3:e7e7d3:new=unapproved vim-u' title='" . __( 'Unapprove this comment' ) . "'>" . __( 'Unapprove' ) . '</a>'; … … 2073 2066 case 'response': 2074 2067 if ( 'single' !== $mode ) { 2068 if ( isset( $_comment_pending_count[$post->ID] ) ) { 2069 $pending_comments = absint( $_comment_pending_count[$post->ID] ); 2070 } else { 2071 $_comment_pending_count_temp = (array) get_pending_comments_num( array( $post->ID ) ); 2072 $pending_comments = $_comment_pending_count[$post->ID] = $_comment_pending_count_temp[$post->ID]; 2073 } 2074 if ( current_user_can( 'edit_post', $post->ID ) ) { 2075 $post_link = "<a href='" . get_edit_post_link($post->ID) . "'>"; 2076 $post_link .= get_the_title($post->ID) . '</a>'; 2077 } else { 2078 $post_link = get_the_title($post->ID); 2079 } 2075 2080 echo "<td $attributes>\n"; 2076 echo ""$post_link" "; 2077 echo '<a href="edit-comments.php?p=' . $post->ID; 2078 if ( !empty($_GET['comment_type']) ) echo '&comment_type=' . htmlspecialchars( $_GET['comment_type'] ); 2079 echo '">' . sprintf ( __ngettext('(%s)', '(%s)', $post->comment_count), number_format_i18n($post->comment_count) ) . '</a> <a href="' . get_permalink($post->ID) . '">#</a><br />'; 2080 echo get_the_time(__('Y/m/d \a\t g:ia')); 2081 echo "“$post_link”<br />"; 2082 2083 echo '<span class="post-com-count-wrapper">'; 2084 $pending_phrase = sprintf( __('%s pending'), number_format( $pending_comments ) ); 2085 if ( $pending_comments ) 2086 echo '<strong>'; 2087 comments_number("<a href='edit-comments.php?p=$post->ID' title='$pending_phrase' class='post-com-count'><span class='comment-count'>" . __('0') . '</span></a>', "<a href='edit-comments.php?p=$post->ID' title='$pending_phrase' class='post-com-count'><span class='comment-count'>" . __('1') . '</span></a>', "<a href='edit-comments.php?p=$post->ID' title='$pending_phrase' class='post-com-count'><span class='comment-count'>" . __('%') . '</span></a>'); 2088 if ( $pending_comments ) 2089 echo '</strong>'; 2090 echo '</span> '; 2091 echo "<a href='" . get_permalink( $post->ID ) . "'>#</a>"; 2081 2092 echo '</td>'; 2082 2093 } -
trunk/wp-admin/wp-admin.css
r10089 r10102 1095 1095 } 1096 1096 1097 .column-response .post-com-count-wrapper { 1098 } 1099 1100 .column-response .post-com-count { 1101 float: left; 1102 margin-right: 5px; 1103 text-align: center; 1104 } 1105 1097 1106 /* end menu stuff */ 1098 1107 -
trunk/wp-includes/script-loader.php
r10101 r10102 303 303 $rtl_styles = array( 'global', 'colors', 'dashboard', 'ie', 'install', 'login', 'media', 'theme-editor', 'upload', 'widgets', 'press-this', 'plugin-install', 'farbtastic' ); 304 304 305 $styles->add( 'wp-admin', '/wp-admin/wp-admin.css', array(), '2008120 6' );305 $styles->add( 'wp-admin', '/wp-admin/wp-admin.css', array(), '20081207' ); 306 306 $styles->add_data( 'wp-admin', 'rtl', '/wp-admin/rtl.css' ); 307 307
Note: See TracChangeset
for help on using the changeset viewer.