WordPress.org

Make WordPress Core

Ticket #21891: 21891.patch

File 21891.patch, 467 bytes (added by ethitter, 19 months ago)

Introduces the page_templates filter in WP_Theme::get_page_templates()

  • wp-includes/class-wp-theme.php

     
    948948                if ( $this->parent() ) 
    949949                        $page_templates += $this->parent()->get_page_templates(); 
    950950 
    951                 return $page_templates; 
     951                return apply_filters( 'page_templates', $page_templates, $this->get_stylesheet(), $this->get_template() ); 
    952952        } 
    953953 
    954954        /**