WordPress.org

Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #27425, comment 2


Ignore:
Timestamp:
03/27/2014 04:01:49 PM (7 years ago)
Author:
SergeyBiryukov
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #27425, comment 2

    initial v1  
    33function use_post_format_templates_27425( $template ) {
    44        if ( is_single() && has_post_format() ) {
    5                 $template = locate_template( 'single-' . get_post_format() . '.php' );
     5                $post_format_template = locate_template( 'single-' . get_post_format() . '.php' );
     6                if ( $post_format_template ) {
     7                        $template = $post_format_template;
     8                }
    69        }
    710