Make WordPress Core

Ticket #52144: 52144.patch

File 52144.patch, 503 bytes (added by akabarikalpesh, 4 years ago)

I just added "if ( ! in_array( $term->term_id, $term_ids ) ) {" in wp-includes/post.php file

  • src/wp-includes/post.php

     
    73447344                        $terms = get_object_term_cache( $post->ID, $taxonomy );
    73457345                        if ( false !== $terms ) {
    73467346                                foreach ( $terms as $term ) {
    7347                                         if ( ! isset( $term_ids[ $term->term_id ] ) ) {
     7347                                        if ( ! in_array( $term->term_id, $term_ids ) ) {
    73487348                                                $term_ids[] = $term->term_id;
    73497349                                        }
    73507350                                }