WordPress.org

Make WordPress Core

Ticket #21774: 21774.diff

File 21774.diff, 2.1 KB (added by MikeHansenMe, 19 months ago)
  • wp-admin/includes/meta-boxes.php

     
    550550 * @param object $post 
    551551 */ 
    552552function page_attributes_meta_box($post) { 
     553        if ( 'page' == $post->post_type && 0 != count( get_page_templates() ) ) { 
     554                $template = !empty($post->page_template) ? $post->page_template : false; 
     555                ?> 
     556<p><strong><?php _e('Template') ?></strong></p> 
     557<label class="screen-reader-text" for="page_template"><?php _e('Page Template') ?></label><select name="page_template" id="page_template"> 
     558<option value='default'><?php _e('Default Template'); ?></option> 
     559<?php page_template_dropdown($template); ?> 
     560</select> 
     561<?php 
     562        } 
     563 
    553564        $post_type_object = get_post_type_object($post->post_type); 
    554565        if ( $post_type_object->hierarchical ) { 
    555566                $dropdown_args = array( 
     
    561572                        'sort_column'      => 'menu_order, post_title', 
    562573                        'echo'             => 0, 
    563574                ); 
    564  
    565575                $dropdown_args = apply_filters( 'page_attributes_dropdown_pages_args', $dropdown_args, $post ); 
    566576                $pages = wp_dropdown_pages( $dropdown_args ); 
    567577                if ( ! empty($pages) ) { 
     
    572582<?php 
    573583                } // end empty pages check 
    574584        } // end hierarchical check. 
    575         if ( 'page' == $post->post_type && 0 != count( get_page_templates() ) ) { 
    576                 $template = !empty($post->page_template) ? $post->page_template : false; 
    577                 ?> 
    578 <p><strong><?php _e('Template') ?></strong></p> 
    579 <label class="screen-reader-text" for="page_template"><?php _e('Page Template') ?></label><select name="page_template" id="page_template"> 
    580 <option value='default'><?php _e('Default Template'); ?></option> 
    581 <?php page_template_dropdown($template); ?> 
    582 </select> 
    583 <?php 
    584         } ?> 
     585         ?> 
    585586<p><strong><?php _e('Order') ?></strong></p> 
    586587<p><label class="screen-reader-text" for="menu_order"><?php _e('Order') ?></label><input name="menu_order" type="text" size="4" id="menu_order" value="<?php echo esc_attr($post->menu_order) ?>" /></p> 
    587588<p><?php if ( 'page' == $post->post_type ) _e( 'Need help? Use the Help tab in the upper right of your screen.' ); ?></p>