comment_row_actions хук-фильтрWP 2.6.0

Filters the action links displayed for each comment in the 'Recent Comments' dashboard widget.

Использование

add_filter( 'comment_row_actions', 'wp_kama_comment_row_actions_filter', 10, 2 );

/**
 * Function for `comment_row_actions` filter-hook.
 * 
 * @param string[]   $actions An array of comment actions.
 * @param WP_Comment $comment The comment object.
 *
 * @return string[]
 */
function wp_kama_comment_row_actions_filter( $actions, $comment ){

	// filter...
	return $actions;
}
$actions(string[])
An array of comment actions.
По умолчанию: actions include: 'Approve', 'Unapprove', 'Edit', 'Reply', 'Spam', 'Delete', and 'Trash'
$comment(WP_Comment)
The comment object.

Список изменений

С версии 2.6.0 Введена.

Где вызывается хук

_wp_dashboard_recent_comments_row()
comment_row_actions
WP_Comments_List_Table::handle_row_actions()
comment_row_actions
wp-admin/includes/dashboard.php 792
$actions = apply_filters( 'comment_row_actions', array_filter( $actions ), $comment );
wp-admin/includes/class-wp-comments-list-table.php 825
$actions = apply_filters( 'comment_row_actions', array_filter( $actions ), $comment );

Где используется хук в WordPress

Использование не найдено.