Make WordPress Core

Ticket #13265: 13265.patch

File 13265.patch, 834 bytes (added by wpsmith, 12 years ago)

Filter moved to WP_Theme

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

     
    922922        public function get_page_templates() {
    923923                // If you screw up your current theme and we invalidate your parent, most things still work. Let it slide.
    924924                if ( $this->errors() && $this->errors()->get_error_codes() !== array( 'theme_parent_invalid' ) )
    925                         return array();
     925                        return apply_filters( 'page_templates', array() );
    926926
    927927                $page_templates = $this->cache_get( 'page_templates' );
    928928
     
    949949                if ( $this->parent() )
    950950                        $page_templates += $this->parent()->get_page_templates();
    951951
    952                 return $page_templates;
     952                return apply_filters( 'page_templates', $page_templates );
    953953        }
    954954
    955955        /**