wpseek.com
Bazujące na WordPress narzędzie wyszukiwania dla deweloperów i twórców motywów.



pre_get_shortlink › Filtr WordPress Hooks

Od3.0.0
Przestarzałyn/a
apply_filters( 'pre_get_shortlink', false, $id, $context, $allow_slugs )
Parametry: (4)
  • (false|string) $return Short-circuit return value. Either false or a URL string.
    Wymagane: Tak
  • (int) $id Post ID, or 0 for the current post.
    Wymagane: Tak
  • (string) $context The context for the link. One of 'post' or 'query',
    Wymagane: Tak
  • (bool) $allow_slugs Whether to allow post slugs in the shortlink.
    Wymagane: Tak
Zdefiniowane na:
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.





Źródło

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