wp-lists: catch the whole class, pending comments: silently accept approval of already approved comment. Props mdawaffe
git-svn-id: http://svn.automattic.com/wordpress/trunk@10057 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
9629712581
commit
164546b068
|
@ -2011,10 +2011,10 @@ function _wp_comment_row( $comment_id, $mode, $comment_status, $checkbox = true,
|
|||
$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>';
|
||||
if ( $comment_status ) { // not looking at all comments
|
||||
if ( 'approved' == $the_comment_status ) {
|
||||
$actions['unapprove'] = "<a href='$unapprove_url' class='delete:the-comment-list:comment-$comment->comment_ID:e7e7d3:action=dim-comment vim-u vim-destructive' title='" . __( 'Unapprove this comment' ) . "'>" . __( 'Unapprove' ) . '</a>';
|
||||
$actions['unapprove'] = "<a href='$unapprove_url' class='delete:the-comment-list:comment-$comment->comment_ID:e7e7d3:action=dim-comment&new=unapproved vim-u vim-destructive' title='" . __( 'Unapprove this comment' ) . "'>" . __( 'Unapprove' ) . '</a>';
|
||||
unset($actions['approve']);
|
||||
} else {
|
||||
$actions['approve'] = "<a href='$approve_url' class='delete:the-comment-list:comment-$comment->comment_ID:e7e7d3:action=dim-comment vim-a vim-destructive' title='" . __( 'Approve this comment' ) . "'>" . __( 'Approve' ) . '</a>';
|
||||
$actions['approve'] = "<a href='$approve_url' class='delete:the-comment-list:comment-$comment->comment_ID:e7e7d3:action=dim-comment&new=approved vim-a vim-destructive' title='" . __( 'Approve this comment' ) . "'>" . __( 'Approve' ) . '</a>';
|
||||
unset($actions['unapprove']);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@ var wpList = {
|
|||
var c = [], cl;
|
||||
try {
|
||||
cl = $(e).attr('class') || '';
|
||||
cl = cl.match(new RegExp(t+':[A-Za-z0-9:_=-]+'));
|
||||
cl = cl.match(new RegExp(t+':[\\S]+'));
|
||||
if ( cl ) { c = cl[0].split(':'); }
|
||||
} catch(r) {}
|
||||
return c;
|
||||
|
|
|
@ -77,7 +77,7 @@ function wp_default_scripts( &$scripts ) {
|
|||
|
||||
$scripts->add( 'autosave', '/wp-includes/js/autosave.js', array('schedule', 'wp-ajax-response'), '20081110' );
|
||||
|
||||
$scripts->add( 'wp-lists', '/wp-includes/js/wp-lists.js', array('wp-ajax-response'), '20080729' );
|
||||
$scripts->add( 'wp-lists', '/wp-includes/js/wp-lists.js', array('wp-ajax-response'), '20081204' );
|
||||
$scripts->localize( 'wp-lists', 'wpListL10n', array(
|
||||
'url' => admin_url('admin-ajax.php')
|
||||
) );
|
||||
|
|
Loading…
Reference in New Issue