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

Filters the shortlink for a post.

Description Description

Parameters Parameters


(string) Shortlink URL.


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


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


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

Top ↑

Source Source

File: wp-includes/link-template.php

View on Trac

Top ↑

Changelog Changelog

Version Description
3.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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