Make WordPress Core

Ticket #37043: 37043.patch

File 37043.patch, 1.1 KB (added by sebastian.pisula, 9 years ago)
  • wp-includes/post.php

    IDEA additional info:
    Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
    <+>UTF-8
     
    36963696        if ( in_array( $post_status, array( 'draft', 'pending', 'auto-draft' ) ) || ( 'inherit' == $post_status && 'revision' == $post_type ) )
    36973697                return $slug;
    36983698
     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
    36993716        global $wpdb, $wp_rewrite;
    37003717
    37013718        $original_slug = $slug;