Ticket #21891: 21891.2.patch
| File 21891.2.patch, 765 bytes (added by , 14 years ago) |
|---|
-
wp-includes/class-wp-theme.php
948 948 if ( $this->parent() ) 949 949 $page_templates += $this->parent()->get_page_templates(); 950 950 951 // Allow specific templates to be removed by providing their keys (file paths relative to theme directory). 952 $templates_to_remove = apply_filters( 'page_templates_to_remove', array(), $this->get_stylesheet(), $this->get_template() ); 953 if ( is_array( $templates_to_remove ) ) { 954 foreach ( $templates_to_remove as $template_to_remove ) { 955 unset( $page_templates[ $template_to_remove ] ); 956 } 957 } 958 951 959 return $page_templates; 952 960 } 953 961