X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/ff81ee6e8304a1982a3ec4f5b134764a29d502cf..refs/tags/wordpress-2.9:/wp-admin/edit-comments.php?mode=edit diff --git a/wp-admin/edit-comments.php b/wp-admin/edit-comments.php index e74ebb49..ee23b3e3 100644 --- a/wp-admin/edit-comments.php +++ b/wp-admin/edit-comments.php @@ -1,172 +1,461 @@ +wp_enqueue_script('admin-comments'); +enqueue_comment_hotkeys_js(); + +$post_id = isset($_REQUEST['p']) ? (int) $_REQUEST['p'] : 0; - + +if ( $post_id ) + $title = sprintf(__('Edit Comments on “%s”'), wp_html_excerpt(_draft_or_post_title($post_id), 50)); +else + $title = __('Edit Comments'); + +require_once('admin-header.php'); + +$mode = ( ! isset($_GET['mode']) || empty($_GET['mode']) ) ? 'detail' : esc_attr($_GET['mode']); + +$comment_status = isset($_REQUEST['comment_status']) ? $_REQUEST['comment_status'] : 'all'; +if ( !in_array($comment_status, array('all', 'moderated', 'approved', 'spam', 'trash')) ) + $comment_status = 'all'; + +$comment_type = !empty($_GET['comment_type']) ? esc_attr($_GET['comment_type']) : ''; + +$search_dirty = ( isset($_GET['s']) ) ? $_GET['s'] : ''; +$search = esc_attr( $search_dirty ); ?> +
" . sprintf(__('%s comments deleted.'), $i) . "
comment_author_email) { ?>| comment_author_url && 'http://' != $comment->comment_author_url ) { ?> | |
- - - -comment_post_ID) ) { - echo " | comment_ID."\">" . __('Edit Comment') . ""; - echo " | comment_post_ID."&comment=".$comment->comment_ID."\" onclick=\"return deleteSomething( 'comment', $comment->comment_ID, '" . sprintf(__("You are about to delete this comment by "%s".\\n"Cancel" to stop, "OK" to delete."), wp_specialchars( $comment->comment_author, 1 )) . "' );\">" . __('Delete Comment') . " — "; - } // end if any comments to show - // Get post title - if ( current_user_can('edit_post', $comment->comment_post_ID) ) { - $post_title = $wpdb->get_var("SELECT post_title FROM $wpdb->posts WHERE ID = $comment->comment_post_ID"); - $post_title = ('' == $post_title) ? "# $comment->comment_post_ID" : $post_title; - ?> - - |
-';
- 0 ) {
+ printf( _n( '%s comment approved', '%s comments approved', $approved ), $approved );
+ echo '
';
+ }
+ if ( $spammed > 0 ) {
+ printf( _n( '%s comment marked as spam.', '%s comments marked as spam.', $spammed ), $spammed );
+ $ids = isset($_GET['ids']) ? $_GET['ids'] : 0;
+ echo ' ' . __('Undo') . '
';
+ }
+ if ( $unspammed > 0 ) {
+ printf( _n( '%s comment restored from the spam', '%s comments restored from the spam', $unspammed ), $unspammed );
+ echo '
';
+ }
+ if ( $trashed > 0 ) {
+ printf( _n( '%s comment moved to the trash.', '%s comments moved to the trash.', $trashed ), $trashed );
+ $ids = isset($_GET['ids']) ? $_GET['ids'] : 0;
+ echo ' ' . __('Undo') . '
';
+ }
+ if ( $untrashed > 0 ) {
+ printf( _n( '%s comment restored from the trash', '%s comments restored from the trash', $untrashed ), $untrashed );
+ echo '
';
+ }
+ if ( $deleted > 0 ) {
+ printf( _n( '%s comment permanently deleted', '%s comments permanently deleted', $deleted ), $deleted );
+ echo '
';
+ }
- ?>
-
-
- - -* | -' . __('Name') . ' | -' . __('E-mail') . ' | -' . __('IP') . ' | -' . __('Comment Excerpt') . ' | -' . __('Actions') . ' | -||
---|---|---|---|---|---|---|---|
comment_post_ID) ) { ?> | -- | - | - | - | - | comment_post_ID) ) { - echo "" . __('Edit') . ""; } ?> | -comment_post_ID) ) { - echo "comment_post_ID."&comment=".$comment->comment_ID."\" onclick=\"return confirm('" . sprintf(__("You are about to delete this comment by \'%s\'\\n \'Cancel\' to stop, \'OK\' to delete."), $comment->comment_author) . "')\" class='delete'>" . __('Delete') . ""; } ?> | -
')" />
- + +