pre_wp_unique_post_slug

pre_wp_unique_post_slug

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter
See hook in action

See hook in core

Displaying hooks found in version: wordpress-6.7.2

apply_filters('pre_wp_unique_post_slug') is found 1 times:

  • /wp-includes/post.php line 5350
    5346
    5347
    5348
    5349
    5350
    5351
    5352
    5353
    5354
    5355
    * @param string      $post_status   The post status.
     * @param string      $post_type     Post type.
     * @param int         $post_parent   Post parent ID.
     */
    $override_slug = apply_filters( 'pre_wp_unique_post_slug', null, $slug, $post_id, $post_status, $post_type, $post_parent );
    if ( null !== $override_slug ) {
        return $override_slug;
    }
     
    global $wpdb, $wp_rewrite;

See this hook used in plugins: