WordPress.org

Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #22956


Ignore:
Timestamp:
12/16/2012 12:15:01 AM (5 years ago)
Author:
scribu
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #22956 – Description

    initial v1  
    11[21861] sought to improve the template loading behaviour when multiple post types are involved, but I don't think it was the right approach.
    22
    3 1. It creates backward-incompatible behaviour:
     3'''1. It creates backward-incompatible behaviour.'''
    44
    55Take a query of `'post_type' => array( 'serie', 'post' )`
     
    99In 3.5, it unexpectedly loads `archive-serie.php`.
    1010
    11 2. Which template gets loaded depends on the order of the post types, i.e. `'post_type' => array( 'serie', 'post' )` is different from `'post_type' => array( 'post', 'serie' )`.
     11'''2. The order of the post types becomes important.'''
     12
     13For example, `'post_type' => array( 'serie', 'post' )` can potentially load a different template from `'post_type' => array( 'post', 'serie' )`.
    1214
    1315Possible alternatives: