Make WordPress Core

Changes between Version 6 and Version 7 of Ticket #13239, comment 103


Ignore:
Timestamp:
10/10/2016 12:20:29 PM (9 years ago)
Author:
tifosi
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #13239, comment 103

    v6 v7  
    3030<?php
    3131add_filter( 'template_locations', function( $locations ) {
    32     array_walk( $locations, function ( &$v, $s ) { $v .= $s; }, '/partials/' );
     32    array_walk( $locations, function ( &$v, $s ) { $v .= $s; }, '/partials' );
    3333    return $locations;
    3434}, 10, 1 );
     
    4242add_filter( 'locate_template', function( $location, $template_names ) {
    4343    if ( in_array( 'header.php', $template_names ) ) {
    44         $location = ( is_child_theme() ) ? get_stylesheet_directory() . '/partials' : get_template_directory() . '/partials';
     44        $location = ( is_child_theme() ) ? get_stylesheet_directory() : get_template_directory() . '/partials';
    4545    }
    4646    return $location;