Filter hook 'get_shortlink'

in WP Core File wp-includes/link-template.php at line 4177

Description

Filters the shortlink for a post.

Occurrences

Filename Line Number
wp-includes/link-template.php 4177

Parameters

Type Name Description
string $shortlink Shortlink URL.
int $id Post ID, or 0 for the current post.
string $context The context for the link. One of 'post' or 'query',
bool $allow_slugs Whether to allow post slugs in the shortlink. Not used by default.

PHP Doc

/**
	 * Filters the shortlink for a post.
	 *
	 * @since 3.0.0
	 *
	 * @param string $shortlink   Shortlink URL.
	 * @param int    $id          Post ID, or 0 for the current post.
	 * @param string $context     The context for the link. One of 'post' or 'query',
	 * @param bool   $allow_slugs Whether to allow post slugs in the shortlink. Not used by default.
	 */