wpseek.com
Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren



pre_wp_unique_post_slug › WordPress Filter Hooks

Seit5.1.0
Veraltetn/v
apply_filters( 'pre_wp_unique_post_slug', null, $slug, $post_id, $post_status, $post_type, $post_parent )
Parameter: (6)
  • () override_slug Short-circuit return value.
    Erforderlich: Ja
  • () slug The desired slug (post_name).
    Erforderlich: Ja
  • () post_id Post ID.
    Erforderlich: Ja
  • () post_status The post status.
    Erforderlich: Ja
  • () post_type Post type.
    Erforderlich: Ja
  • () post_parent Post parent ID.
    Erforderlich: Ja
Definiert in:
Codex:

Filters the post slug before it is generated to be unique.

Returning a non-null value will short-circuit the unique slug generation, returning the passed value instead.




Quellcode

$override_slug = apply_filters( 'pre_wp_unique_post_slug', null, $slug, $post_id, $post_status, $post_type, $post_parent );