diff --git a/wp-includes/template-loader.php b/wp-includes/template-loader.php index 7bf3097d64..95216fe5e0 100644 --- a/wp-includes/template-loader.php +++ b/wp-includes/template-loader.php @@ -53,6 +53,7 @@ if ( defined('WP_USE_THEMES') && WP_USE_THEMES ) : remove_filter('the_content', 'prepend_attachment'); elseif ( is_single() && $template = get_single_template() ) : elseif ( is_page() && $template = get_page_template() ) : + elseif ( is_singular() && $template = get_singular_template() ) : elseif ( is_category() && $template = get_category_template() ) : elseif ( is_tag() && $template = get_tag_template() ) : elseif ( is_author() && $template = get_author_template() ) : diff --git a/wp-includes/template.php b/wp-includes/template.php index d070999132..32aed52b95 100644 --- a/wp-includes/template.php +++ b/wp-includes/template.php @@ -382,6 +382,21 @@ function get_single_template() { return get_query_template( 'single', $templates ); } +/** + * Retrieve path of singular template in current or parent template. + * + * The template path is filterable via the 'singular_template' hook. + * + * @since 4.3.0 + * + * @see get_query_template() + * + * @return string Full path to singular template file + */ +function get_singular_template() { + return get_query_template( 'singular' ); +} + /** * Retrieve path of attachment template in current or parent template. * diff --git a/wp-includes/version.php b/wp-includes/version.php index 2ee01ec3af..3decb36393 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.3-alpha-32845'; +$wp_version = '4.3-alpha-32846'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.