Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Show editorial comments on "Edit Comments"
<?php
/**
* Add editorial comments to the Edit Comments list view
*/
add_filter( 'comments_clauses', 'efx_add_editorial_comments' );
function efx_add_editorial_comments( $clauses ) {
global $pagenow;
if ( 'edit-comments.php' != $pagenow ) {
return;
}
$clauses['where'] = str_replace( "( comment_approved = '0' OR comment_approved = '1' )", "( comment_approved = '0' OR comment_approved = '1' OR comment_approved = 'editorial-comment' )", $clauses['where'] );
return $clauses;
}
/**
* Remove the action links from editorial comments in the Edit Comments list view
*/
add_filter( 'comment_row_actions', 'efx_filter_comment_row_actions', 10, 2 );
function efx_filter_comment_row_actions( $actions, $comment ) {
if ( 'editorial-comment' !== $comment->comment_type ) {
return $actions;
}
return array();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.