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

see #13265.


git-svn-id: https://develop.svn.wordpress.org/trunk@27470 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin
2014-03-08 04:18:30 +00:00
parent 4cf6fc1a99
commit 928a972fb5
5 changed files with 15 additions and 11 deletions
+1 -1
View File
@@ -705,7 +705,7 @@ function page_attributes_meta_box($post) {
<?php
} // end empty pages check
} // end hierarchical check.
if ( 'page' == $post->post_type && 0 != count( get_page_templates() ) ) {
if ( 'page' == $post->post_type && 0 != count( get_page_templates( $post ) ) ) {
$template = !empty($post->page_template) ? $post->page_template : false;
?>
<p><strong><?php _e('Template') ?></strong></p>