comment_edit_redirect
Filters the URI the user is redirected to after editing a comment in the admin.
Использование
add_filter( 'comment_edit_redirect', 'wp_kama_comment_edit_redirect_filter', 10, 2 );
/**
* Function for `comment_edit_redirect` filter-hook.
*
* @param string $location The URI the user will be redirected to.
* @param int $comment_id The ID of the comment being edited.
*
* @return string
*/
function wp_kama_comment_edit_redirect_filter( $location, $comment_id ){
// filter...
return $location;
}
- $location(строка)
- The URI the user will be redirected to.
- $comment_id(int)
- The ID of the comment being edited.
Список изменений
| С версии 2.1.0 | Введена. |
Где вызывается хук
В файле: /wp-admin/comment.php
comment_edit_redirect
wp-admin/comment.php 377
$location = apply_filters( 'comment_edit_redirect', $location, $comment_id );