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

In this article

Filters the shortlink for a post.

Parameters

$shortlinkstring
Shortlink URL.
$idint
Post ID, or 0 for the current post.
$contextstring
The context for the link. One of 'post' or 'query',
$allow_slugsbool
Whether to allow post slugs in the shortlink. Not used by default.

Source

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

Changelog

VersionDescription
3.0.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.