(adjacent)_post_link хук-фильтр . WP 2.6.0
Filters the adjacent post link.
The dynamic portion of the hook name, $adjacent, refers to the type of adjacency, 'next' or 'previous'.
Использование
add_filter( '(adjacent)_post_link', 'filter_function_name_7196', 10, 5 ); function filter_function_name_7196( $output, $format, $link, $post, $adjacent ){ // filter... return $output; }
- $output(строка)
- The adjacent post link.
- $format(строка)
- Link anchor format.
- $link(строка)
- Link permalink format.
- $post(WP_Post)
- The adjacent post.
- $adjacent(строка)
- Whether the post is previous or next.
Список изменений
С версии 2.6.0 | Введена. |
С версии 4.2.0 | Added the $adjacent parameter. |
Где вызывается хук
(adjacent)_post_link
wp-includes/link-template.php 2208
return apply_filters( "{$adjacent}_post_link", $output, $format, $link, $post, $adjacent );
Где используется хук в ядре WordPress
wp-includes/link-template.php 1932
add_filter( 'get_edit_post_link', '__return_empty_string' );