Make WordPress Core

Ticket #37043: 37043.2.patch

File 37043.2.patch, 2.0 KB (added by sebastian.pisula, 9 years ago)
  • wp-includes/taxonomy.php

    IDEA additional info:
    Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
    <+>UTF-8
     
    27002700                $needs_suffix = false;
    27012701        }
    27022702
     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
    27032717        /*
    27042718         * If the taxonomy supports hierarchy and the term has a parent, make the slug unique
    27052719         * by incorporating parent slugs.
  • 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;