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



get_shortlink ›

Since3.0.0
已弃用n/a
apply_filters( 'get_shortlink', $shortlink, $id, $context, $allow_slugs )
参数: (4)
  • (string) $shortlink Shortlink URL.
    Required: Yes
  • (int) $id Post ID, or 0 for the current post.
    Required: Yes
  • (string) $context The context for the link. One of 'post' or 'query',
    Required: Yes
  • (bool) $allow_slugs Whether to allow post slugs in the shortlink. Not used by default.
    Required: Yes
定义在:
文档:

Filters the shortlink for a post.





源码

return apply_filters( 'get_shortlink', $shortlink, $id, $context, $allow_slugs );