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.
$returnfalse|string
$idint
$contextstring
'post' or 'query',$allow_slugsbool
$shortlink = apply_filters( 'pre_get_shortlink', false, $id, $context, $allow_slugs );
| Version | Description |
|---|---|
| 3.0.0 | Introduced. |
© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/pre_get_shortlink