WordPress.org

Make WordPress Core

Ticket #40969: 40969.2.diff

File 40969.2.diff, 665 bytes (added by tferry, 13 months ago)
  • src/wp-includes/general-template.php

     
    131131 *
    132132 * @param string $slug The slug name for the generic template.
    133133 * @param string $name The name of the specialised template.
     134 * @return string The template filename if one is located.
    134135 */
    135136function get_template_part( $slug, $name = null ) {
    136137        /**
     
    154155
    155156        $templates[] = "{$slug}.php";
    156157
    157         locate_template( $templates, true, false );
     158        return locate_template( $templates, true, false );
    158159}
    159160
    160161/**