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-admin/includes/theme.php

    r27369 r27470  
    7979 * @since 1.5.0
    8080 *
     81 * @param WP_Post|null $post Optional. The post being edited, provided for context.
    8182 * @return array Key is the template name, value is the filename of the template
    8283 */
    83 function get_page_templates() {
    84     return array_flip( wp_get_theme()->get_page_templates() );
     84function get_page_templates( $post = null ) {
     85    return array_flip( wp_get_theme()->get_page_templates( $post ) );
    8586}
    8687
Note: See TracChangeset for help on using the changeset viewer.