From 6cfec3b825adfb3c61a11093b1f76fa27a2e3a1f Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sun, 11 Aug 2024 21:08:06 +0000 Subject: [PATCH] Docs: Switch canonical location for the `comment_row_actions` filter. This aims to bring consistency with the other `*_row_actions` filters. Follow-up to [6705], [8217], [9103], [15491], [26138], [27669]. See #61608. git-svn-id: https://develop.svn.wordpress.org/trunk@58883 602fd350-edb4-49c9-b593-d223f7449a82 --- .../includes/class-wp-comments-list-table.php | 11 ++++++++++- src/wp-admin/includes/dashboard.php | 12 +----------- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/src/wp-admin/includes/class-wp-comments-list-table.php b/src/wp-admin/includes/class-wp-comments-list-table.php index 6c45a4eb7c..9b46512c24 100644 --- a/src/wp-admin/includes/class-wp-comments-list-table.php +++ b/src/wp-admin/includes/class-wp-comments-list-table.php @@ -847,7 +847,16 @@ class WP_Comments_List_Table extends WP_List_Table { ); } - /** This filter is documented in wp-admin/includes/dashboard.php */ + /** + * Filters the action links displayed for each comment in the Comments list table. + * + * @since 2.6.0 + * + * @param string[] $actions An array of comment actions. Default actions include: + * 'Approve', 'Unapprove', 'Edit', 'Reply', 'Spam', + * 'Delete', and 'Trash'. + * @param WP_Comment $comment The comment object. + */ $actions = apply_filters( 'comment_row_actions', array_filter( $actions ), $comment ); $always_visible = false; diff --git a/src/wp-admin/includes/dashboard.php b/src/wp-admin/includes/dashboard.php index 022a00174c..84514015e2 100644 --- a/src/wp-admin/includes/dashboard.php +++ b/src/wp-admin/includes/dashboard.php @@ -800,17 +800,7 @@ function _wp_dashboard_recent_comments_row( &$comment, $show_date = true ) { __( 'View' ) ); - /** - * Filters the action links displayed for each comment in the 'Recent Comments' - * dashboard widget. - * - * @since 2.6.0 - * - * @param string[] $actions An array of comment actions. Default actions include: - * 'Approve', 'Unapprove', 'Edit', 'Reply', 'Spam', - * 'Delete', and 'Trash'. - * @param WP_Comment $comment The comment object. - */ + /** This filter is documented in wp-admin/includes/class-wp-comments-list-table.php */ $actions = apply_filters( 'comment_row_actions', array_filter( $actions ), $comment ); $i = 0;