Make WordPress Core


Ignore:
Timestamp:
03/08/2014 04:18:30 AM (11 years ago)
Author:
nacin
Message:

Rename the new page_templates filter to theme_page_templates, and pass it a post object for proper context.

see #13265.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/post.php

    r27423 r27470  
    29492949    if ( !empty($page_template) && 'page' == $data['post_type'] ) {
    29502950        $post->page_template = $page_template;
    2951         $page_templates = wp_get_theme()->get_page_templates();
     2951        $page_templates = wp_get_theme()->get_page_templates( $post );
    29522952        if ( 'default' != $page_template && ! isset( $page_templates[ $page_template ] ) ) {
    29532953            if ( $wp_error )
Note: See TracChangeset for help on using the changeset viewer.