IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
2700 | 2700 | $needs_suffix = false; |
2701 | 2701 | } |
2702 | 2702 | |
| 2703 | /** |
| 2704 | * Filters pre term slug. |
| 2705 | * |
| 2706 | * @since 4.6.0 |
| 2707 | * |
| 2708 | * @param string|bool $pre Unique slug for the post, based on $post_name (with a -1, -2, etc. suffix) |
| 2709 | * @param string $slug Unique term slug. |
| 2710 | * @param WP_Term $term Term object. |
| 2711 | */ |
| 2712 | $pre = apply_filters( 'pre_unique_term_slug', false, $slug, $term ); |
| 2713 | if ( false !== $pre ) { |
| 2714 | return $pre; |
| 2715 | } |
| 2716 | |
2703 | 2717 | /* |
2704 | 2718 | * If the taxonomy supports hierarchy and the term has a parent, make the slug unique |
2705 | 2719 | * by incorporating parent slugs. |
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
3696 | 3696 | if ( in_array( $post_status, array( 'draft', 'pending', 'auto-draft' ) ) || ( 'inherit' == $post_status && 'revision' == $post_type ) ) |
3697 | 3697 | return $slug; |
3698 | 3698 | |
| 3699 | /** |
| 3700 | * Filters pre post slug. |
| 3701 | * |
| 3702 | * @since 4.6.0 |
| 3703 | * |
| 3704 | * @param string|bool $pre Unique slug for the post, based on $post_name (with a -1, -2, etc. suffix) |
| 3705 | * @param string $slug The desired slug (post_name). |
| 3706 | * @param int $post_ID Post ID. |
| 3707 | * @param string $post_status No uniqueness checks are made if the post is still draft or pending. |
| 3708 | * @param string $post_type Post type. |
| 3709 | * @param int $post_parent Post parent ID. |
| 3710 | */ |
| 3711 | $pre = apply_filters( 'pre_unique_post_slug', false, $slug, $post_ID, $post_status, $post_type, $post_parent ); |
| 3712 | if ( false !== $pre ) { |
| 3713 | return $pre; |
| 3714 | } |
| 3715 | |
3699 | 3716 | global $wpdb, $wp_rewrite; |
3700 | 3717 | |
3701 | 3718 | $original_slug = $slug; |