Un motore di ricerca WordPress per sviluppatori e autori di temi



pre_get_shortlink ›

Da3.0.0
Deprecaton/a
apply_filters( 'pre_get_shortlink', false, $id, $context, $allow_slugs )
Parametri: (4)
  • (bool|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.

Passing a truthy value to the filter will effectively short-circuit the shortlink-generation process, returning that value instead.





Sorgenti

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