wpseek.com
WordPress开发者和主题制作者的搜索引擎



{$adjacent}_post_link › WordPress过滤钩子

Since4.2.0
已弃用n/a
apply_filters( "{$adjacent}_post_link", $output, $format, $link, $post, $adjacent )
参数: (5)
  • (string) $output The adjacent post link.
    Required: Yes
  • (string) $format Link anchor format.
    Required: Yes
  • (string) $link Link permalink format.
    Required: Yes
  • (WP_Post|string) $post The adjacent post. Empty string if no corresponding post exists.
    Required: Yes
  • (string) $adjacent Whether the post is previous or next.
    Required: Yes
定义在:
文档:

Filters the adjacent post link.

The dynamic portion of the hook name, $adjacent, refers to the type of adjacency, 'next' or 'previous'.

Possible hook names include:

  • next_post_link
  • previous_post_link




源码

return apply_filters( "{$adjacent}_post_link", $output, $format, $link, $post, $adjacent );