Make WordPress Core

Ticket #37043: 37043.3.diff

File 37043.3.diff, 1.8 KB (added by barryceelen, 8 years ago)

Align @param tags according to coding standards

  • wp-includes/post.php

    diff --git wp-includes/post.php wp-includes/post.php
    index d033172..72f6dc3 100644
    function wp_unique_post_slug( $slug, $post_ID, $post_status, $post_type, $post_p 
    35723572        if ( in_array( $post_status, array( 'draft', 'pending', 'auto-draft' ) ) || ( 'inherit' == $post_status && 'revision' == $post_type ) )
    35733573                return $slug;
    35743574
     3575        /**
     3576         * Filters pre post slug.
     3577         *
     3578         * @since 4.6.0
     3579         *
     3580         * @param string|bool $pre         Unique slug for the post, based on $post_name (with a -1, -2, etc. suffix)
     3581         * @param string      $slug        The desired slug (post_name).
     3582         * @param int         $post_ID     Post ID.
     3583         * @param string      $post_status No uniqueness checks are made if the post is still draft or pending.
     3584         * @param string      $post_type   Post type.
     3585         * @param int         $post_parent Post parent ID.
     3586         */
     3587        $pre = apply_filters( 'pre_unique_post_slug', false, $slug, $post_ID, $post_status, $post_type, $post_parent );
     3588        if ( false !== $pre ) {
     3589                return $pre;
     3590        }
     3591
    35753592        global $wpdb, $wp_rewrite;
    35763593
    35773594        $original_slug = $slug;
  • wp-includes/taxonomy.php

    diff --git wp-includes/taxonomy.php wp-includes/taxonomy.php
    index 104a4af..4a0460f 100644
    function wp_unique_term_slug( $slug, $term ) { 
    27092709                $needs_suffix = false;
    27102710        }
    27112711
     2712        /**
     2713         * Filters pre term slug.
     2714         *
     2715         * @since 4.6.0
     2716         *
     2717         * @param string|bool $pre  Unique slug for the post, based on $post_name (with a -1, -2, etc. suffix)
     2718         * @param string      $slug Unique term slug.
     2719         * @param WP_Term     $term Term object.
     2720         */
     2721        $pre = apply_filters( 'pre_unique_term_slug', false, $slug, $term );
     2722        if ( false !== $pre ) {
     2723                return $pre;
     2724        }
     2725
    27122726        /*
    27132727         * If the taxonomy supports hierarchy and the term has a parent, make the slug unique
    27142728         * by incorporating parent slugs.