WordPress.org

Make WordPress Core

Ticket #37655: 37655.patch

File 37655.patch, 568 bytes (added by withgjr, 5 years ago)
  • src/wp-includes/template.php

    diff --git src/wp-includes/template.php src/wp-includes/template.php
    index 14e7eba..380bb47 100644
    function get_category_template() { 
    174174
    175175        $templates = array();
    176176
    177   if ( ! empty( $category->slug ) ) {
    178     $decoded_slug = urldecode($category->slug);
    179                 $templates[] = "category-{$decoded_slug}.php";
     177        if ( ! empty( $category->slug ) ) {
     178                $templates[] = "category-{$category->slug}.php";
    180179                $templates[] = "category-{$category->term_id}.php";
    181180        }
    182181        $templates[] = 'category.php';