WordPress.org

Make WordPress Core

Ticket #16459: 16459.fix-link.diff

File 16459.fix-link.diff, 645 bytes (added by markjaquith, 3 years ago)

Fix for the faulty link with default permalinks

  • wp-includes/post.php

     
    51765176                return str_replace( "/{$term->slug}", '/' . $slugs[ str_replace( 'post-format-', '', $term->slug ) ], $link ); 
    51775177        } else { 
    51785178                $link = remove_query_arg( 'post_format', $link ); 
    5179                 return add_query_arg( 'post_format', str_replace( 'post-format-', '', $term->slug ), $link ); 
     5179                return add_query_arg( 'post_format', $slugs[ str_replace( 'post-format-', '', $term->slug ) ], $link ); 
    51805180        } 
    51815181} 
    51825182add_filter( 'term_link', '_post_format_link', 10, 3 );