WordPress.org

Make WordPress Core


Ignore:
Timestamp:
06/18/2015 07:00:09 PM (4 years ago)
Author:
jorbin
Message:

Add singular.php to template hierarchy

Singular is the only template context conditional that lacks a corresponding template. This allows some themes to simplify.

Fixes #22314.
Props chipbennett.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/template.php

    r32804 r32846  
    384384
    385385/**
     386 * Retrieve path of singular template in current or parent template.
     387 *
     388 * The template path is filterable via the 'singular_template' hook.
     389 *
     390 * @since 4.3.0
     391 *
     392 * @see get_query_template()
     393 *
     394 * @return string Full path to singular template file
     395 */
     396function get_singular_template() {
     397    return get_query_template( 'singular' );
     398}
     399
     400/**
    386401 * Retrieve path of attachment template in current or parent template.
    387402 *
Note: See TracChangeset for help on using the changeset viewer.