Ticket #21112: 21112.diff
File 21112.diff, 1007 bytes (added by , 12 years ago) |
---|
-
wp-includes/post.php
2821 2821 * Computes a unique slug for the post, when given the desired slug and some post details. 2822 2822 * 2823 2823 * @since 2.8.0 2824 * @uses $wpdb 2825 * @uses $wp_rewrite 2826 * @uses apply_filters() Calls 'pre_wp_unique_post_slug' with empty string and 2827 * all function arguments 2828 * @uses apply_filters() Calls 'wp_unique_post_slug' with resultant unique slug, 2829 * all function arguments, and the original slug 2824 2830 * 2825 2831 * @global wpdb $wpdb 2826 2832 * @global WP_Rewrite $wp_rewrite … … 2835 2841 if ( in_array( $post_status, array( 'draft', 'pending', 'auto-draft' ) ) ) 2836 2842 return $slug; 2837 2843 2844 $override_slug = apply_filters( 'pre_wp_unique_post_slug', '', $slug, $post_ID, $post_status, $post_type, $post_parent ); 2845 if ( $override_slug ) 2846 return $override_slug; 2847 2838 2848 global $wpdb, $wp_rewrite; 2839 2849 2840 2850 $original_slug = $slug;