diff --git src/wp-includes/post.php src/wp-includes/post.php
index 3d1227f..b2d21a7 100644
|
|
function wp_unique_post_slug( $slug, $post_ID, $post_status, $post_type, $post_p |
3685 | 3685 | |
3686 | 3686 | $original_slug = $slug; |
3687 | 3687 | |
| 3688 | if ( is_numeric( $slug ) ) { |
| 3689 | /** |
| 3690 | * Filter the prefix for numeric slugs. |
| 3691 | * |
| 3692 | * Prefixes numeric slugs so they do not collide with dates in some permalink structures. |
| 3693 | * The default prefix is the value of `$post_type` with a hyphen attached to the end. |
| 3694 | * For example, if the current post type is 'post', the default value will be 'post-'. |
| 3695 | * |
| 3696 | * @since 4.2.0 |
| 3697 | * |
| 3698 | * @param string $slug_prefix The numeric slug prefix. |
| 3699 | * @param string $slug The post slug. |
| 3700 | * @param int $post_ID Post ID. |
| 3701 | * @param string $post_status The post status. |
| 3702 | * @param string $post_type Post type. |
| 3703 | * @param int $post_parent Post parent ID |
| 3704 | * @param string $original_slug The original post slug. |
| 3705 | */ |
| 3706 | $slug_prefix = apply_filters( 'wp_unique_post_slug_numeric_slug_prefix', $post_type . '-', $slug, $post_ID, $post_status, $post_type, $post_parent, $original_slug ); |
| 3707 | |
| 3708 | $slug = $slug_prefix . $slug; |
| 3709 | } |
| 3710 | |
3688 | 3711 | $feeds = $wp_rewrite->feeds; |
3689 | 3712 | if ( ! is_array( $feeds ) ) |
3690 | 3713 | $feeds = array(); |