Index: wp-includes/post-template.php
===================================================================
--- wp-includes/post-template.php (revision 23386)
+++ wp-includes/post-template.php (working copy)
@@ -1301,7 +1301,7 @@
return false;
/* translators: revision date format, see http://php.net/date */
- $datef = _x( 'j F, Y @ G:i', 'revision date format');
+ $datef = _x( 'D, M jS, Y @ G:i a', 'revision date format');
/* translators: 1: date */
$autosavef = __( '%1$s [Autosave]' );
/* translators: 1: date */
@@ -1371,13 +1371,14 @@
}
/* translators: post revision: 1: when, 2: author name */
- $titlef = _x( '%1$s by %2$s', 'post revision' );
+ $titlef = _x( '%1$s
%2$s', 'post revision' );
if ( $parent )
array_unshift( $revisions, $post );
$rows = $right_checked = '';
$class = false;
+ $i=0;
$can_edit_post = current_user_can( 'edit_post', $post->ID );
foreach ( $revisions as $revision ) {
if ( !current_user_can( 'read_post', $revision->ID ) )
@@ -1385,9 +1386,15 @@
if ( 'revision' === $type && wp_is_post_autosave( $revision ) )
continue;
- $date = wp_post_revision_title( $revision );
+ $date = wp_post_revision_title( $revision, false );
$name = get_the_author_meta( 'display_name', $revision->post_author );
-
+ $editlink = '' . __( 'View' ) . ' ';
+ if (1>$i++) {
+ $revision_comment_field = ' ';
+ $revision_comment_field.='
';
+ } else {
+ $revision_comment_field='' . __( 'Edit Comment' ) . ' ';
+ }
if ( 'form-table' == $format ) {
if ( $left )
$left_checked = $left == $revision->ID ? ' checked="checked"' : '';
@@ -1398,20 +1405,23 @@
$class = $class ? '' : " class='alternate'";
if ( $post->ID != $revision->ID && $can_edit_post )
- $actions = 'ID|$revision->ID" ) . '">' . __( 'Restore' ) . ' ';
+ $actions = 'ID|$revision->ID" ) . '">' . __( 'Restore' ) . ' '.
+ ' · ' . $editlink .
+ ' · ' . __( 'Compare to' ) . ' ';
+
+
else
$actions = '';
+ $avatar = get_avatar( $revision->post_author, 24 );
$rows .= " \n";
- $rows .= "\t \n";
- $rows .= "\t \n";
- $rows .= "\t$date \n";
- $rows .= "\t$name \n";
- $rows .= "\t$actions \n";
+ $rows .= "\t$avatar $name \n";
+ $rows .= "\t$date $actions \n";
$rows .= " \n";
} else {
- $title = sprintf( $titlef, $date, $name );
- $rows .= "\t$title \n";
+ $avatar = get_avatar( $revision->post_author, 18 );
+ $title = sprintf( $titlef, $name, $date );
+ $rows .= "\t$avatar $title $revision_comment_field $editlink \n";
}
}
@@ -1432,16 +1442,10 @@
-
-
-
-
-
-
-
-
+
+
@@ -1455,9 +1459,12 @@
\n";
+ echo '';
+
+ echo '';
+ echo ''.__( 'Date/Time' ).' ' . __('Comment' ) .' ' . __('Action' ) . ' ';
echo $rows;
- echo "";
+ echo "
";
endif;
}
Index: wp-includes/wp-diff.php
===================================================================
--- wp-includes/wp-diff.php (revision 23386)
+++ wp-includes/wp-diff.php (working copy)
@@ -98,7 +98,7 @@
* @return string
*/
function addedLine( $line ) {
- return "+ {$line} ";
+ return "{$line}
" . __("Added") . "
";
}
/**
@@ -108,7 +108,7 @@
* @return string
*/
function deletedLine( $line ) {
- return "- {$line} ";
+ return "{$line}
" . __( "Removed" ) . "
";
}
/**
@@ -118,7 +118,7 @@
* @return string
*/
function contextLine( $line ) {
- return " {$line} ";
+ return "{$line}
";
}
/**
@@ -127,7 +127,7 @@
* @return string
*/
function emptyLine() {
- return ' ';
+ return ' ';
}
/**
@@ -142,8 +142,8 @@
$r = '';
foreach ($lines as $line) {
if ( $encode )
- $line = htmlspecialchars( $line );
- $r .= '' . $this->emptyLine() . $this->addedLine( $line ) . " \n";
+ $line = wp_kses_post( $line );
+ $r .= '' . $this->addedLine( $line ) . " \n";
}
return $r;
}
@@ -160,8 +160,8 @@
$r = '';
foreach ($lines as $line) {
if ( $encode )
- $line = htmlspecialchars( $line );
- $r .= '' . $this->deletedLine( $line ) . $this->emptyLine() . " \n";
+ $line = wp_kses_post( $line );
+ $r .= '' . $this->deletedLine( $line ) . " \n";
}
return $r;
}
@@ -178,9 +178,9 @@
$r = '';
foreach ($lines as $line) {
if ( $encode )
- $line = htmlspecialchars( $line );
+ $line = wp_kses_post( $line );
$r .= '' .
- $this->contextLine( $line ) . $this->contextLine( $line ) . " \n";
+ $this->contextLine( $line ) . $this->emptyLine() . "\n";
}
return $r;
}
@@ -248,14 +248,14 @@
if ( isset( $orig_diffs[$orig_rows[$row]] ) )
$orig_line = $orig_diffs[$orig_rows[$row]];
elseif ( isset( $orig[$orig_rows[$row]] ) )
- $orig_line = htmlspecialchars($orig[$orig_rows[$row]]);
+ $orig_line = wp_kses_post($orig[$orig_rows[$row]]);
else
$orig_line = '';
if ( isset( $final_diffs[$final_rows[$row]] ) )
$final_line = $final_diffs[$final_rows[$row]];
elseif ( isset( $final[$final_rows[$row]] ) )
- $final_line = htmlspecialchars($final[$final_rows[$row]]);
+ $final_line = wp_kses_post($final[$final_rows[$row]]);
else
$final_line = '';
@@ -264,7 +264,7 @@
} elseif ( $final_rows[$row] < 0 ) { // Final is blank. This is really a deleted row.
$r .= $this->_deleted( array($orig_line), false );
} else { // A true changed row.
- $r .= '' . $this->deletedLine( $orig_line ) . $this->addedLine( $final_line ) . " \n";
+ $r .= '' . $this->deletedLine( $orig_line ) . ' ' . $this->addedLine( $final_line ) . " \n";
}
}
Index: wp-includes/Text/Diff/Renderer/inline.php
===================================================================
--- wp-includes/Text/Diff/Renderer/inline.php (revision 23386)
+++ wp-includes/Text/Diff/Renderer/inline.php (working copy)
@@ -200,7 +200,7 @@
function _encode(&$string)
{
- $string = htmlspecialchars($string);
+ $string = wp_kses_post($string);
}
}
Index: wp-includes/pluggable.php
===================================================================
--- wp-includes/pluggable.php (revision 23386)
+++ wp-includes/pluggable.php (working copy)
@@ -1722,16 +1722,16 @@
return '';
$r = "\n";
- $r .= " ";
+ $r .= " ";
if ( $args['title'] || $args['title_left'] || $args['title_right'] )
$r .= "";
if ( $args['title'] )
- $r .= "$args[title] \n";
+ $r .= "$args[title] \n";
if ( $args['title_left'] || $args['title_right'] ) {
$r .= "\n";
- $r .= "\t$args[title_left] \n";
- $r .= "\t$args[title_right] \n";
+ $r .= "\t$args[title_left] \n";
+ $r .= "\t$args[title_right] \n";
$r .= " \n";
}
if ( $args['title'] || $args['title_left'] || $args['title_right'] )
Index: wp-admin/revision.php
===================================================================
--- wp-admin/revision.php (revision 23386)
+++ wp-admin/revision.php (working copy)
@@ -153,14 +153,20 @@
-