wpseek.com
Outil de recherche WordPress pour les développeurs et auteurs de thèmes



pre_wp_unique_post_slug › Les Filtres WordPress

Depuis5.1.0
Dépréciéen/a
› apply_filters( 'pre_wp_unique_post_slug', null, $slug, $post_id, $post_status, $post_type, $post_parent )
Paramètres: (6)
  • () override_slug Short-circuit return value.
    Requis: Oui
  • () slug The desired slug (post_name).
    Requis: Oui
  • () post_id Post ID.
    Requis: Oui
  • () post_status The post status.
    Requis: Oui
  • () post_type Post type.
    Requis: Oui
  • () post_parent Post parent ID.
    Requis: Oui
Défini(e) dans:
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.




Source

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