Fix notice in Page Templates when a Template is not set for the current page.
git-svn-id: http://svn.automattic.com/wordpress/trunk@13776 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
78841d8f5f
commit
48eb248a6d
|
@ -511,18 +511,20 @@ function post_revisions_meta_box($post) {
|
|||
*
|
||||
* @param object $post
|
||||
*/
|
||||
function page_attributes_meta_box($post){
|
||||
function page_attributes_meta_box($post) {
|
||||
?>
|
||||
<h5><?php _e('Parent') ?></h5>
|
||||
<label class="screen-reader-text" for="parent_id"><?php _e('Page Parent') ?></label>
|
||||
<?php wp_dropdown_pages(array('exclude_tree' => $post->ID, 'selected' => $post->post_parent, 'name' => 'parent_id', 'show_option_none' => __('Main Page (no parent)'), 'sort_column'=> 'menu_order, post_title')); ?>
|
||||
<p><?php _e('You can arrange your pages in hierarchies. For example, you could have an “About” page that has “Life Story” and “My Dog” pages under it. There are no limits to how deeply nested you can make pages.'); ?></p>
|
||||
<?php
|
||||
if ( 0 != count( get_page_templates() ) ) { ?>
|
||||
if ( 0 != count( get_page_templates() ) ) {
|
||||
$template = !empty($post->page_template) ? $post->page_template : false;
|
||||
?>
|
||||
<h5><?php _e('Template') ?></h5>
|
||||
<label class="screen-reader-text" for="page_template"><?php _e('Page Template') ?></label><select name="page_template" id="page_template">
|
||||
<option value='default'><?php _e('Default Template'); ?></option>
|
||||
<?php page_template_dropdown($post->page_template); ?>
|
||||
<?php page_template_dropdown($template); ?>
|
||||
</select>
|
||||
<p><?php _e('Some themes have custom templates you can use for certain pages that might have additional features or custom layouts. If so, you’ll see them above.'); ?></p>
|
||||
<?php
|
||||
|
|
Loading…
Reference in New Issue