Changeset 38583 for trunk/src/wp-includes/template.php
- Timestamp:
- 09/09/2016 12:47:17 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/template.php
r38428 r38583 190 190 191 191 if ( ! empty( $category->slug ) ) { 192 193 $slug_decoded = urldecode( $category->slug ); 194 if ( $slug_decoded !== $category->slug ) { 195 $templates[] = "category-{$slug_decoded}.php"; 196 } 197 192 198 $templates[] = "category-{$category->slug}.php"; 193 199 $templates[] = "category-{$category->term_id}.php"; … … 220 226 221 227 if ( ! empty( $tag->slug ) ) { 228 229 $slug_decoded = urldecode( $tag->slug ); 230 if ( $slug_decoded !== $tag->slug ) { 231 $templates[] = "tag-{$slug_decoded}.php"; 232 } 233 222 234 $templates[] = "tag-{$tag->slug}.php"; 223 235 $templates[] = "tag-{$tag->term_id}.php"; … … 256 268 if ( ! empty( $term->slug ) ) { 257 269 $taxonomy = $term->taxonomy; 270 271 $slug_decoded = urldecode( $term->slug ); 272 if ( $slug_decoded !== $term->slug ) { 273 $templates[] = "taxonomy-$taxonomy-{$slug_decoded}.php"; 274 } 275 258 276 $templates[] = "taxonomy-$taxonomy-{$term->slug}.php"; 259 277 $templates[] = "taxonomy-$taxonomy.php"; … … 350 368 if ( $template && 0 === validate_file( $template ) ) 351 369 $templates[] = $template; 352 if ( $pagename ) 370 if ( $pagename ) { 371 $pagename_decoded = urldecode( $pagename ); 372 if ( $pagename_decoded !== $pagename ) { 373 $templates[] = "page-{$pagename_decoded}.php"; 374 } 353 375 $templates[] = "page-$pagename.php"; 376 } 354 377 if ( $id ) 355 378 $templates[] = "page-$id.php"; … … 410 433 411 434 if ( ! empty( $object->post_type ) ) { 435 436 $name_decoded = urldecode( $object->post_name ); 437 if ( $name_decoded !== $object->post_name ) { 438 $templates[] = "single-{$object->post_type}-{$name_decoded}.php"; 439 } 440 412 441 $templates[] = "single-{$object->post_type}-{$object->post_name}.php"; 413 442 $templates[] = "single-{$object->post_type}.php";
Note: See TracChangeset
for help on using the changeset viewer.