Merged in feature/81-dev-dev01 (pull request #5)

auto-patch  81-dev-dev01-2023-12-05T22_45_26

* auto-patch  81-dev-dev01-2023-12-05T22_45_26
This commit is contained in:
Tony Volpe
2023-12-05 23:05:59 +00:00
parent ba16964e7a
commit 725d3043d5
1463 changed files with 142461 additions and 89421 deletions

View File

@@ -177,9 +177,10 @@ class WP_Comments_List_Table extends WP_List_Table {
array_merge(
$args,
array(
'count' => true,
'offset' => 0,
'number' => 0,
'count' => true,
'offset' => 0,
'number' => 0,
'orderby' => 'none',
)
)
);
@@ -298,6 +299,7 @@ class WP_Comments_List_Table extends WP_List_Table {
'post_id' => $post_id ? $post_id : 0,
'user_id' => $current_user_id,
'count' => true,
'orderby' => 'none',
)
);
$link = add_query_arg( 'user_id', $current_user_id, $link );
@@ -518,8 +520,9 @@ class WP_Comments_List_Table extends WP_List_Table {
foreach ( $comment_types as $type => $label ) {
if ( get_comments(
array(
'number' => 1,
'type' => $type,
'count' => true,
'orderby' => 'none',
'type' => $type,
)
) ) {
printf(
@@ -651,6 +654,19 @@ class WP_Comments_List_Table extends WP_List_Table {
$this->user_can = current_user_can( 'edit_comment', $comment->comment_ID );
$edit_post_cap = $post ? 'edit_post' : 'edit_posts';
if (
current_user_can( $edit_post_cap, $comment->comment_post_ID ) ||
(
empty( $post->post_password ) &&
current_user_can( 'read_post', $comment->comment_post_ID )
)
) {
// The user has access to the post
} else {
return false;
}
echo "<tr id='comment-$comment->comment_ID' class='$the_comment_class'>";
$this->single_row_columns( $comment );
echo "</tr>\n";
@@ -685,7 +701,8 @@ class WP_Comments_List_Table extends WP_List_Table {
}
// Restores the more descriptive, specific name for use within this method.
$comment = $item;
$comment = $item;
$the_comment_status = wp_get_comment_status( $comment );
$output = '';
@@ -895,7 +912,8 @@ class WP_Comments_List_Table extends WP_List_Table {
if ( $this->user_can ) {
?>
<label class="label-covers-full-cell" for="cb-select-<?php echo $comment->comment_ID; ?>">
<input id="cb-select-<?php echo $comment->comment_ID; ?>" type="checkbox" name="delete_comments[]" value="<?php echo $comment->comment_ID; ?>" />
<label for="cb-select-<?php echo $comment->comment_ID; ?>">
<span class="screen-reader-text">
<?php
/* translators: Hidden accessibility text. */
@@ -903,7 +921,6 @@ class WP_Comments_List_Table extends WP_List_Table {
?>
</span>
</label>
<input id="cb-select-<?php echo $comment->comment_ID; ?>" type="checkbox" name="delete_comments[]" value="<?php echo $comment->comment_ID; ?>" />
<?php
}
}
@@ -1087,6 +1104,9 @@ class WP_Comments_List_Table extends WP_List_Table {
* @param string $column_name The custom column's name.
*/
public function column_default( $item, $column_name ) {
// Restores the more descriptive, specific name for use within this method.
$comment = $item;
/**
* Fires when the default column output is displayed for a single row.
*
@@ -1095,6 +1115,6 @@ class WP_Comments_List_Table extends WP_List_Table {
* @param string $column_name The custom column's name.
* @param string $comment_id The comment ID as a numeric string.
*/
do_action( 'manage_comments_custom_column', $column_name, $item->comment_ID );
do_action( 'manage_comments_custom_column', $column_name, $comment->comment_ID );
}
}