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)
  • () return Short-circuit return value. Either false or a URL string.
    Richiesto: Sì
  • () id Post ID, or 0 for the current post.
    Richiesto: Sì
  • () context The context for the link. One of 'post' or 'query',
    Richiesto: Sì
  • () allow_slugs Whether to allow post slugs in the shortlink.
    Richiesto: Sì
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 );