Changeset 38951 for trunk/src/wp-includes/template.php
- Timestamp:
- 10/26/2016 08:06:43 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/template.php
r38789 r38951 450 450 * The hierarchy for this template looks like: 451 451 * 452 * 1. single-{post_type}-{post_name}.php 453 * 2. single-{post_type}.php 454 * 3. single.php 455 * 456 * An example of this is: 457 * 458 * 1. single-post-hello-world.php 459 * 2. single-post.php 460 * 3. single.php 452 * 1. {Post Type Template}.php 453 * 2. single-{post_type}-{post_name}.php 454 * 3. single-{post_type}.php 455 * 4. single.php 456 * 457 * An example of this is: 458 * 459 * 1. templates/full-width.php 460 * 2. single-post-hello-world.php 461 * 3. single-post.php 462 * 4. single.php 461 463 * 462 464 * The template hierarchy is filterable via the {@see 'single_template_hierarchy'} hook. … … 467 469 * @since 4.7.0 The decoded form of `single-{post_type}-{post_name}.php` was added to the top of the 468 470 * template hierarchy when the post name contains multibyte characters. 471 * @since 4.7.0 {Post Type Template}.php was added to the top of the template hierarchy. 469 472 * 470 473 * @see get_query_template() … … 478 481 479 482 if ( ! empty( $object->post_type ) ) { 483 $template = get_page_template_slug( $object ); 484 if ( $template && 0 === validate_file( $template ) ) { 485 $templates[] = $template; 486 } 480 487 481 488 $name_decoded = urldecode( $object->post_name );
Note: See TracChangeset
for help on using the changeset viewer.