get_shortlink

Advertisement

Summery Summery

Filters the shortlink for a post.

Syntax Syntax

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

Parameters 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 Source

File: wp-includes/link-template.php

Advertisement

Changelog Changelog

Changelog
Version Description
3.0.0 Introduced.

Advertisement

Leave a Reply