wpseek.com
Un motore di ricerca WordPress per sviluppatori e autori di temi



pre_get_shortlink › WordPress Filter Hooks

Da3.0.0
Deprecaton/a
apply_filters( 'pre_get_shortlink', false, $id, $context, $allow_slugs )
Parametri: (4)
  • (false|string) $return Short-circuit return value. Either false or a URL string.
    Richiesto:
  • (int) $id Post ID, or 0 for the current post.
    Richiesto:
  • (string) $context The context for the link. One of 'post' or 'query',
    Richiesto:
  • (bool) $allow_slugs Whether to allow post slugs in the shortlink.
    Richiesto:
Definito a:
Codex:

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.





Sorgenti

$shortlink = apply_filters( 'pre_get_shortlink', false, $id, $context, $allow_slugs );