WordPress Hooks Explorer

Listing all hooks extracted WordPress Core


Details about pre_get_shortlink

Back to home

Files

Filename Hook Type Line Number PHP Doc
wp-includes/link-template.php apply_filters 4045 /**
* 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.
*/

Hook Parameters

Parameter 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.