get_shortlink

最后更新于:2021-11-26 23:17:06

apply_filters( ‘get_shortlink’, string $shortlink, int $id, string $context, bool $allow_slugs )

Filters the shortlink for a post.

参数

$shortlink

(string)
Shortlink URL.

$id

(int)
Post ID, or 0 for the current post.

$context

(string)
The context for the link. One of ‘post’ or ‘query’,

$allow_slugs

(bool)
Whether to allow post slugs in the shortlink. Not used by default.

源文件

文件: gc-includes/link-template.php

View on Trac