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

Filters the shortlink for a post.


Parameters

$shortlink

Shortlink URL.

$id

Post ID, or 0 for the current post.

$context

The context for the link. One of 'post' or 'query',

$allow_slugs

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


Source

File: wp-includes/link-template.php

View on GitHub



Changelog

Changelog
Version Description
WP-3.0.0 Introduced.