X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/7688c6ba71852cd89123b62b2d57683535e4702a..16b9f61a8ab25bd6c9fbfd0cea00c7bda22f6a71:/wp-admin/edit-comments.php?mode=edit;s=%3C%3Fphp%20comment_author_IP%28%29%20%3F%3E diff --git a/wp-admin/edit-comments.php b/wp-admin/edit-comments.php index ab1bdbce..ee23b3e3 100644 --- a/wp-admin/edit-comments.php +++ b/wp-admin/edit-comments.php @@ -1,203 +1,461 @@ +wp_enqueue_script('admin-comments'); +enqueue_comment_hotkeys_js(); - + +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 ); ?> +
';
+
+ if ( $approved > 0 ) {
+ printf( _n( '%s comment approved', '%s comments approved', $approved ), $approved );
+ echo '
';
}
- endforeach;
- echo '
';
- if ( !empty( $_POST['spam_button'] ) ) {
- printf(__ngettext('%s comment marked as spam', '%s comments marked as spam.', $i), $i);
- } else {
- printf(__ngettext('%s comment deleted.', '%s comments deleted.', $i), $i);
+ 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 '
';
+ }
+
+ echo '