Filter hook 'pre_get_shortlink'
in WP Core File wp-includes/link-template.php at line 4135
Description
Filters whether to preempt generating a shortlink for the given post. Returning a value other than false from the filter will short-circuit the shortlink generation process, returning that value instead.
Occurrences
Filename |
Line Number |
wp-includes/link-template.php |
4135 |
Parameters
Type |
Name |
Description |
false|string |
$return |
Short-circuit return value. Either false or a URL string. |
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. |
PHP Doc
/**
* Filters whether to preempt generating a shortlink for the given post.
*
* Returning a value other than false from the filter will short-circuit
* the shortlink generation process, returning that value instead.
*
* @since 3.0.0
*
* @param false|string $return Short-circuit return value. Either false or a URL string.
* @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.
*/