page_attributes_meta_box

The timeline below displays how wordpress function page_attributes_meta_box has changed across different WordPress versions. If a version is not listed, refer to the next available version below.

WordPress Version: 6.4

//
// Page-related Meta Boxes.
//
/**
 * Displays page attributes form fields.
 *
 * @since 2.7.0
 *
 * @param WP_Post $post Current post object.
 */
function page_attributes_meta_box($post)
{
    if (is_post_type_hierarchical($post->post_type)) {
        $dropdown_args = array('post_type' => $post->post_type, 'exclude_tree' => $post->ID, 'selected' => $post->post_parent, 'name' => 'parent_id', 'show_option_none' => __('(no parent)'), 'sort_column' => 'menu_order, post_title', 'echo' => 0);
        /**
         * Filters the arguments used to generate a Pages drop-down element.
         *
         * @since 3.3.0
         *
         * @see wp_dropdown_pages()
         *
         * @param array   $dropdown_args Array of arguments used to generate the pages drop-down.
         * @param WP_Post $post          The current post.
         */
        $dropdown_args = apply_filters('page_attributes_dropdown_pages_args', $dropdown_args, $post);
        $pages = wp_dropdown_pages($dropdown_args);
        if (!empty($pages)) {
            ?>
<p class="post-attributes-label-wrapper parent-id-label-wrapper"><label class="post-attributes-label" for="parent_id"><?php 
            _e('Parent');
            ?></label></p>
			<?php 
            echo $pages;
            ?>
			<?php 
        }
        // End empty pages check.
    }
    // End hierarchical check.
    if (count(get_page_templates($post)) > 0 && (int) get_option('page_for_posts') !== $post->ID) {
        $template = (!empty($post->page_template)) ? $post->page_template : false;
        ?>
<p class="post-attributes-label-wrapper page-template-label-wrapper"><label class="post-attributes-label" for="page_template"><?php 
        _e('Template');
        ?></label>
		<?php 
        /**
         * Fires immediately after the label inside the 'Template' section
         * of the 'Page Attributes' meta box.
         *
         * @since 4.4.0
         *
         * @param string|false $template The template used for the current post.
         * @param WP_Post      $post     The current post.
         */
        do_action('page_attributes_meta_box_template', $template, $post);
        ?>
</p>
<select name="page_template" id="page_template">
		<?php 
        /**
         * Filters the title of the default page template displayed in the drop-down.
         *
         * @since 4.1.0
         *
         * @param string $label   The display value for the default page template title.
         * @param string $context Where the option label is displayed. Possible values
         *                        include 'meta-box' or 'quick-edit'.
         */
        $default_title = apply_filters('default_page_template_title', __('Default template'), 'meta-box');
        ?>
<option value="default"><?php 
        echo esc_html($default_title);
        ?></option>
		<?php 
        page_template_dropdown($template, $post->post_type);
        ?>
</select>
<?php 
    }
    ?>
	<?php 
    if (post_type_supports($post->post_type, 'page-attributes')) {
        ?>
<p class="post-attributes-label-wrapper menu-order-label-wrapper"><label class="post-attributes-label" for="menu_order"><?php 
        _e('Order');
        ?></label></p>
<input name="menu_order" type="text" size="4" id="menu_order" value="<?php 
        echo esc_attr($post->menu_order);
        ?>" />
		<?php 
        /**
         * Fires before the help hint text in the 'Page Attributes' meta box.
         *
         * @since 4.9.0
         *
         * @param WP_Post $post The current post.
         */
        do_action('page_attributes_misc_attributes', $post);
        ?>
		<?php 
        if ('page' === $post->post_type && get_current_screen()->get_help_tabs()) {
            ?>
<p class="post-attributes-help-text"><?php 
            _e('Need help? Use the Help tab above the screen title.');
            ?></p>
			<?php 
        }
    }
}

WordPress Version: 6.1

//
// Page-related Meta Boxes.
//
/**
 * Displays page attributes form fields.
 *
 * @since 2.7.0
 *
 * @param WP_Post $post Current post object.
 */
function page_attributes_meta_box($post)
{
    if (is_post_type_hierarchical($post->post_type)) {
        $dropdown_args = array('post_type' => $post->post_type, 'exclude_tree' => $post->ID, 'selected' => $post->post_parent, 'name' => 'parent_id', 'show_option_none' => __('(no parent)'), 'sort_column' => 'menu_order, post_title', 'echo' => 0);
        /**
         * Filters the arguments used to generate a Pages drop-down element.
         *
         * @since 3.3.0
         *
         * @see wp_dropdown_pages()
         *
         * @param array   $dropdown_args Array of arguments used to generate the pages drop-down.
         * @param WP_Post $post          The current post.
         */
        $dropdown_args = apply_filters('page_attributes_dropdown_pages_args', $dropdown_args, $post);
        $pages = wp_dropdown_pages($dropdown_args);
        if (!empty($pages)) {
            ?>
<p class="post-attributes-label-wrapper parent-id-label-wrapper"><label class="post-attributes-label" for="parent_id"><?php 
            _e('Parent');
            ?></label></p>
			<?php 
            echo $pages;
            ?>
			<?php 
        }
        // End empty pages check.
    }
    // End hierarchical check.
    if (count(get_page_templates($post)) > 0 && get_option('page_for_posts') != $post->ID) {
        $template = (!empty($post->page_template)) ? $post->page_template : false;
        ?>
<p class="post-attributes-label-wrapper page-template-label-wrapper"><label class="post-attributes-label" for="page_template"><?php 
        _e('Template');
        ?></label>
		<?php 
        /**
         * Fires immediately after the label inside the 'Template' section
         * of the 'Page Attributes' meta box.
         *
         * @since 4.4.0
         *
         * @param string|false $template The template used for the current post.
         * @param WP_Post      $post     The current post.
         */
        do_action('page_attributes_meta_box_template', $template, $post);
        ?>
</p>
<select name="page_template" id="page_template">
		<?php 
        /**
         * Filters the title of the default page template displayed in the drop-down.
         *
         * @since 4.1.0
         *
         * @param string $label   The display value for the default page template title.
         * @param string $context Where the option label is displayed. Possible values
         *                        include 'meta-box' or 'quick-edit'.
         */
        $default_title = apply_filters('default_page_template_title', __('Default template'), 'meta-box');
        ?>
<option value="default"><?php 
        echo esc_html($default_title);
        ?></option>
		<?php 
        page_template_dropdown($template, $post->post_type);
        ?>
</select>
<?php 
    }
    ?>
	<?php 
    if (post_type_supports($post->post_type, 'page-attributes')) {
        ?>
<p class="post-attributes-label-wrapper menu-order-label-wrapper"><label class="post-attributes-label" for="menu_order"><?php 
        _e('Order');
        ?></label></p>
<input name="menu_order" type="text" size="4" id="menu_order" value="<?php 
        echo esc_attr($post->menu_order);
        ?>" />
		<?php 
        /**
         * Fires before the help hint text in the 'Page Attributes' meta box.
         *
         * @since 4.9.0
         *
         * @param WP_Post $post The current post.
         */
        do_action('page_attributes_misc_attributes', $post);
        ?>
		<?php 
        if ('page' === $post->post_type && get_current_screen()->get_help_tabs()) {
            ?>
<p class="post-attributes-help-text"><?php 
            _e('Need help? Use the Help tab above the screen title.');
            ?></p>
			<?php 
        }
    }
}

WordPress Version: 5.9

//
// Page-related Meta Boxes.
//
/**
 * Display page attributes form fields.
 *
 * @since 2.7.0
 *
 * @param WP_Post $post
 */
function page_attributes_meta_box($post)
{
    if (is_post_type_hierarchical($post->post_type)) {
        $dropdown_args = array('post_type' => $post->post_type, 'exclude_tree' => $post->ID, 'selected' => $post->post_parent, 'name' => 'parent_id', 'show_option_none' => __('(no parent)'), 'sort_column' => 'menu_order, post_title', 'echo' => 0);
        /**
         * Filters the arguments used to generate a Pages drop-down element.
         *
         * @since 3.3.0
         *
         * @see wp_dropdown_pages()
         *
         * @param array   $dropdown_args Array of arguments used to generate the pages drop-down.
         * @param WP_Post $post          The current post.
         */
        $dropdown_args = apply_filters('page_attributes_dropdown_pages_args', $dropdown_args, $post);
        $pages = wp_dropdown_pages($dropdown_args);
        if (!empty($pages)) {
            ?>
<p class="post-attributes-label-wrapper parent-id-label-wrapper"><label class="post-attributes-label" for="parent_id"><?php 
            _e('Parent');
            ?></label></p>
			<?php 
            echo $pages;
            ?>
			<?php 
        }
        // End empty pages check.
    }
    // End hierarchical check.
    if (count(get_page_templates($post)) > 0 && get_option('page_for_posts') != $post->ID) {
        $template = (!empty($post->page_template)) ? $post->page_template : false;
        ?>
<p class="post-attributes-label-wrapper page-template-label-wrapper"><label class="post-attributes-label" for="page_template"><?php 
        _e('Template');
        ?></label>
		<?php 
        /**
         * Fires immediately after the label inside the 'Template' section
         * of the 'Page Attributes' meta box.
         *
         * @since 4.4.0
         *
         * @param string|false $template The template used for the current post.
         * @param WP_Post      $post     The current post.
         */
        do_action('page_attributes_meta_box_template', $template, $post);
        ?>
</p>
<select name="page_template" id="page_template">
		<?php 
        /**
         * Filters the title of the default page template displayed in the drop-down.
         *
         * @since 4.1.0
         *
         * @param string $label   The display value for the default page template title.
         * @param string $context Where the option label is displayed. Possible values
         *                        include 'meta-box' or 'quick-edit'.
         */
        $default_title = apply_filters('default_page_template_title', __('Default template'), 'meta-box');
        ?>
<option value="default"><?php 
        echo esc_html($default_title);
        ?></option>
		<?php 
        page_template_dropdown($template, $post->post_type);
        ?>
</select>
<?php 
    }
    ?>
	<?php 
    if (post_type_supports($post->post_type, 'page-attributes')) {
        ?>
<p class="post-attributes-label-wrapper menu-order-label-wrapper"><label class="post-attributes-label" for="menu_order"><?php 
        _e('Order');
        ?></label></p>
<input name="menu_order" type="text" size="4" id="menu_order" value="<?php 
        echo esc_attr($post->menu_order);
        ?>" />
		<?php 
        /**
         * Fires before the help hint text in the 'Page Attributes' meta box.
         *
         * @since 4.9.0
         *
         * @param WP_Post $post The current post.
         */
        do_action('page_attributes_misc_attributes', $post);
        ?>
		<?php 
        if ('page' === $post->post_type && get_current_screen()->get_help_tabs()) {
            ?>
<p class="post-attributes-help-text"><?php 
            _e('Need help? Use the Help tab above the screen title.');
            ?></p>
			<?php 
        }
    }
}

WordPress Version: 5.6

//
// Page-related Meta Boxes.
//
/**
 * Display page attributes form fields.
 *
 * @since 2.7.0
 *
 * @param WP_Post $post
 */
function page_attributes_meta_box($post)
{
    if (is_post_type_hierarchical($post->post_type)) {
        $dropdown_args = array('post_type' => $post->post_type, 'exclude_tree' => $post->ID, 'selected' => $post->post_parent, 'name' => 'parent_id', 'show_option_none' => __('(no parent)'), 'sort_column' => 'menu_order, post_title', 'echo' => 0);
        /**
         * Filters the arguments used to generate a Pages drop-down element.
         *
         * @since 3.3.0
         *
         * @see wp_dropdown_pages()
         *
         * @param array   $dropdown_args Array of arguments used to generate the pages drop-down.
         * @param WP_Post $post          The current post.
         */
        $dropdown_args = apply_filters('page_attributes_dropdown_pages_args', $dropdown_args, $post);
        $pages = wp_dropdown_pages($dropdown_args);
        if (!empty($pages)) {
            ?>
<p class="post-attributes-label-wrapper parent-id-label-wrapper"><label class="post-attributes-label" for="parent_id"><?php 
            _e('Parent');
            ?></label></p>
			<?php 
            echo $pages;
            ?>
			<?php 
        }
        // End empty pages check.
    }
    // End hierarchical check.
    if (count(get_page_templates($post)) > 0 && get_option('page_for_posts') != $post->ID) {
        $template = (!empty($post->page_template)) ? $post->page_template : false;
        ?>
<p class="post-attributes-label-wrapper page-template-label-wrapper"><label class="post-attributes-label" for="page_template"><?php 
        _e('Template');
        ?></label>
		<?php 
        /**
         * Fires immediately after the label inside the 'Template' section
         * of the 'Page Attributes' meta box.
         *
         * @since 4.4.0
         *
         * @param string  $template The template used for the current post.
         * @param WP_Post $post     The current post.
         */
        do_action('page_attributes_meta_box_template', $template, $post);
        ?>
</p>
<select name="page_template" id="page_template">
		<?php 
        /**
         * Filters the title of the default page template displayed in the drop-down.
         *
         * @since 4.1.0
         *
         * @param string $label   The display value for the default page template title.
         * @param string $context Where the option label is displayed. Possible values
         *                        include 'meta-box' or 'quick-edit'.
         */
        $default_title = apply_filters('default_page_template_title', __('Default template'), 'meta-box');
        ?>
<option value="default"><?php 
        echo esc_html($default_title);
        ?></option>
		<?php 
        page_template_dropdown($template, $post->post_type);
        ?>
</select>
<?php 
    }
    ?>
	<?php 
    if (post_type_supports($post->post_type, 'page-attributes')) {
        ?>
<p class="post-attributes-label-wrapper menu-order-label-wrapper"><label class="post-attributes-label" for="menu_order"><?php 
        _e('Order');
        ?></label></p>
<input name="menu_order" type="text" size="4" id="menu_order" value="<?php 
        echo esc_attr($post->menu_order);
        ?>" />
		<?php 
        /**
         * Fires before the help hint text in the 'Page Attributes' meta box.
         *
         * @since 4.9.0
         *
         * @param WP_Post $post The current post.
         */
        do_action('page_attributes_misc_attributes', $post);
        ?>
		<?php 
        if ('page' === $post->post_type && get_current_screen()->get_help_tabs()) {
            ?>
<p class="post-attributes-help-text"><?php 
            _e('Need help? Use the Help tab above the screen title.');
            ?></p>
			<?php 
        }
    }
}

WordPress Version: 5.5

//
// Page-related Meta Boxes.
//
/**
 * Display page attributes form fields.
 *
 * @since 2.7.0
 *
 * @param object $post
 */
function page_attributes_meta_box($post)
{
    if (is_post_type_hierarchical($post->post_type)) {
        $dropdown_args = array('post_type' => $post->post_type, 'exclude_tree' => $post->ID, 'selected' => $post->post_parent, 'name' => 'parent_id', 'show_option_none' => __('(no parent)'), 'sort_column' => 'menu_order, post_title', 'echo' => 0);
        /**
         * Filters the arguments used to generate a Pages drop-down element.
         *
         * @since 3.3.0
         *
         * @see wp_dropdown_pages()
         *
         * @param array   $dropdown_args Array of arguments used to generate the pages drop-down.
         * @param WP_Post $post          The current post.
         */
        $dropdown_args = apply_filters('page_attributes_dropdown_pages_args', $dropdown_args, $post);
        $pages = wp_dropdown_pages($dropdown_args);
        if (!empty($pages)) {
            ?>
<p class="post-attributes-label-wrapper parent-id-label-wrapper"><label class="post-attributes-label" for="parent_id"><?php 
            _e('Parent');
            ?></label></p>
			<?php 
            echo $pages;
            ?>
			<?php 
        }
        // End empty pages check.
    }
    // End hierarchical check.
    if (count(get_page_templates($post)) > 0 && get_option('page_for_posts') != $post->ID) {
        $template = (!empty($post->page_template)) ? $post->page_template : false;
        ?>
<p class="post-attributes-label-wrapper page-template-label-wrapper"><label class="post-attributes-label" for="page_template"><?php 
        _e('Template');
        ?></label>
		<?php 
        /**
         * Fires immediately after the label inside the 'Template' section
         * of the 'Page Attributes' meta box.
         *
         * @since 4.4.0
         *
         * @param string  $template The template used for the current post.
         * @param WP_Post $post     The current post.
         */
        do_action('page_attributes_meta_box_template', $template, $post);
        ?>
</p>
<select name="page_template" id="page_template">
		<?php 
        /**
         * Filters the title of the default page template displayed in the drop-down.
         *
         * @since 4.1.0
         *
         * @param string $label   The display value for the default page template title.
         * @param string $context Where the option label is displayed. Possible values
         *                        include 'meta-box' or 'quick-edit'.
         */
        $default_title = apply_filters('default_page_template_title', __('Default template'), 'meta-box');
        ?>
<option value="default"><?php 
        echo esc_html($default_title);
        ?></option>
		<?php 
        page_template_dropdown($template, $post->post_type);
        ?>
</select>
<?php 
    }
    ?>
	<?php 
    if (post_type_supports($post->post_type, 'page-attributes')) {
        ?>
<p class="post-attributes-label-wrapper menu-order-label-wrapper"><label class="post-attributes-label" for="menu_order"><?php 
        _e('Order');
        ?></label></p>
<input name="menu_order" type="text" size="4" id="menu_order" value="<?php 
        echo esc_attr($post->menu_order);
        ?>" />
		<?php 
        /**
         * Fires before the help hint text in the 'Page Attributes' meta box.
         *
         * @since 4.9.0
         *
         * @param WP_Post $post The current post.
         */
        do_action('page_attributes_misc_attributes', $post);
        ?>
		<?php 
        if ('page' === $post->post_type && get_current_screen()->get_help_tabs()) {
            ?>
<p class="post-attributes-help-text"><?php 
            _e('Need help? Use the Help tab above the screen title.');
            ?></p>
			<?php 
        }
    }
}

WordPress Version: 5.4

//
// Page-related Meta Boxes.
//
/**
 * Display page attributes form fields.
 *
 * @since 2.7.0
 *
 * @param object $post
 */
function page_attributes_meta_box($post)
{
    if (is_post_type_hierarchical($post->post_type)) {
        $dropdown_args = array('post_type' => $post->post_type, 'exclude_tree' => $post->ID, 'selected' => $post->post_parent, 'name' => 'parent_id', 'show_option_none' => __('(no parent)'), 'sort_column' => 'menu_order, post_title', 'echo' => 0);
        /**
         * Filters the arguments used to generate a Pages drop-down element.
         *
         * @since 3.3.0
         *
         * @see wp_dropdown_pages()
         *
         * @param array   $dropdown_args Array of arguments used to generate the pages drop-down.
         * @param WP_Post $post          The current post.
         */
        $dropdown_args = apply_filters('page_attributes_dropdown_pages_args', $dropdown_args, $post);
        $pages = wp_dropdown_pages($dropdown_args);
        if (!empty($pages)) {
            ?>
<p class="post-attributes-label-wrapper parent-id-label-wrapper"><label class="post-attributes-label" for="parent_id"><?php 
            _e('Parent');
            ?></label></p>
			<?php 
            echo $pages;
            ?>
			<?php 
        }
        // End empty pages check.
    }
    // End hierarchical check.
    if (count(get_page_templates($post)) > 0 && get_option('page_for_posts') != $post->ID) {
        $template = (!empty($post->page_template)) ? $post->page_template : false;
        ?>
<p class="post-attributes-label-wrapper page-template-label-wrapper"><label class="post-attributes-label" for="page_template"><?php 
        _e('Template');
        ?></label>
		<?php 
        /**
         * Fires immediately after the label inside the 'Template' section
         * of the 'Page Attributes' meta box.
         *
         * @since 4.4.0
         *
         * @param string  $template The template used for the current post.
         * @param WP_Post $post     The current post.
         */
        do_action('page_attributes_meta_box_template', $template, $post);
        ?>
</p>
<select name="page_template" id="page_template">
		<?php 
        /**
         * Filters the title of the default page template displayed in the drop-down.
         *
         * @since 4.1.0
         *
         * @param string $label   The display value for the default page template title.
         * @param string $context Where the option label is displayed. Possible values
         *                        include 'meta-box' or 'quick-edit'.
         */
        $default_title = apply_filters('default_page_template_title', __('Default Template'), 'meta-box');
        ?>
<option value="default"><?php 
        echo esc_html($default_title);
        ?></option>
		<?php 
        page_template_dropdown($template, $post->post_type);
        ?>
</select>
<?php 
    }
    ?>
	<?php 
    if (post_type_supports($post->post_type, 'page-attributes')) {
        ?>
<p class="post-attributes-label-wrapper menu-order-label-wrapper"><label class="post-attributes-label" for="menu_order"><?php 
        _e('Order');
        ?></label></p>
<input name="menu_order" type="text" size="4" id="menu_order" value="<?php 
        echo esc_attr($post->menu_order);
        ?>" />
		<?php 
        /**
         * Fires before the help hint text in the 'Page Attributes' meta box.
         *
         * @since 4.9.0
         *
         * @param WP_Post $post The current post.
         */
        do_action('page_attributes_misc_attributes', $post);
        ?>
		<?php 
        if ('page' == $post->post_type && get_current_screen()->get_help_tabs()) {
            ?>
<p class="post-attributes-help-text"><?php 
            _e('Need help? Use the Help tab above the screen title.');
            ?></p>
			<?php 
        }
    }
}

WordPress Version: 5.1

// -- Page related Meta Boxes
/**
 * Display page attributes form fields.
 *
 * @since 2.7.0
 *
 * @param object $post
 */
function page_attributes_meta_box($post)
{
    if (is_post_type_hierarchical($post->post_type)) {
        $dropdown_args = array('post_type' => $post->post_type, 'exclude_tree' => $post->ID, 'selected' => $post->post_parent, 'name' => 'parent_id', 'show_option_none' => __('(no parent)'), 'sort_column' => 'menu_order, post_title', 'echo' => 0);
        /**
         * Filters the arguments used to generate a Pages drop-down element.
         *
         * @since 3.3.0
         *
         * @see wp_dropdown_pages()
         *
         * @param array   $dropdown_args Array of arguments used to generate the pages drop-down.
         * @param WP_Post $post          The current post.
         */
        $dropdown_args = apply_filters('page_attributes_dropdown_pages_args', $dropdown_args, $post);
        $pages = wp_dropdown_pages($dropdown_args);
        if (!empty($pages)) {
            ?>
<p class="post-attributes-label-wrapper"><label class="post-attributes-label" for="parent_id"><?php 
            _e('Parent');
            ?></label></p>
			<?php 
            echo $pages;
            ?>
			<?php 
        }
        // end empty pages check
    }
    // end hierarchical check.
    if (count(get_page_templates($post)) > 0 && get_option('page_for_posts') != $post->ID) {
        $template = (!empty($post->page_template)) ? $post->page_template : false;
        ?>
<p class="post-attributes-label-wrapper"><label class="post-attributes-label" for="page_template"><?php 
        _e('Template');
        ?></label>
		<?php 
        /**
         * Fires immediately after the label inside the 'Template' section
         * of the 'Page Attributes' meta box.
         *
         * @since 4.4.0
         *
         * @param string  $template The template used for the current post.
         * @param WP_Post $post     The current post.
         */
        do_action('page_attributes_meta_box_template', $template, $post);
        ?>
</p>
<select name="page_template" id="page_template">
		<?php 
        /**
         * Filters the title of the default page template displayed in the drop-down.
         *
         * @since 4.1.0
         *
         * @param string $label   The display value for the default page template title.
         * @param string $context Where the option label is displayed. Possible values
         *                        include 'meta-box' or 'quick-edit'.
         */
        $default_title = apply_filters('default_page_template_title', __('Default Template'), 'meta-box');
        ?>
<option value="default"><?php 
        echo esc_html($default_title);
        ?></option>
		<?php 
        page_template_dropdown($template, $post->post_type);
        ?>
</select>
<?php 
    }
    ?>
	<?php 
    if (post_type_supports($post->post_type, 'page-attributes')) {
        ?>
<p class="post-attributes-label-wrapper"><label class="post-attributes-label" for="menu_order"><?php 
        _e('Order');
        ?></label></p>
<input name="menu_order" type="text" size="4" id="menu_order" value="<?php 
        echo esc_attr($post->menu_order);
        ?>" />
		<?php 
        /**
         * Fires before the help hint text in the 'Page Attributes' meta box.
         *
         * @since 4.9.0
         *
         * @param WP_Post $post The current post.
         */
        do_action('page_attributes_misc_attributes', $post);
        ?>
		<?php 
        if ('page' == $post->post_type && get_current_screen()->get_help_tabs()) {
            ?>
<p><?php 
            _e('Need help? Use the Help tab above the screen title.');
            ?></p>
			<?php 
        }
    }
}

WordPress Version: 9.1

// -- Page related Meta Boxes
/**
 * Display page attributes form fields.
 *
 * @since 2.7.0
 *
 * @param object $post
 */
function page_attributes_meta_box($post)
{
    if (is_post_type_hierarchical($post->post_type)) {
        $dropdown_args = array('post_type' => $post->post_type, 'exclude_tree' => $post->ID, 'selected' => $post->post_parent, 'name' => 'parent_id', 'show_option_none' => __('(no parent)'), 'sort_column' => 'menu_order, post_title', 'echo' => 0);
        /**
         * Filters the arguments used to generate a Pages drop-down element.
         *
         * @since 3.3.0
         *
         * @see wp_dropdown_pages()
         *
         * @param array   $dropdown_args Array of arguments used to generate the pages drop-down.
         * @param WP_Post $post          The current post.
         */
        $dropdown_args = apply_filters('page_attributes_dropdown_pages_args', $dropdown_args, $post);
        $pages = wp_dropdown_pages($dropdown_args);
        if (!empty($pages)) {
            ?>
<p class="post-attributes-label-wrapper"><label class="post-attributes-label" for="parent_id"><?php 
            _e('Parent');
            ?></label></p>
<?php 
            echo $pages;
        }
        // end empty pages check
    }
    // end hierarchical check.
    if (count(get_page_templates($post)) > 0 && get_option('page_for_posts') != $post->ID) {
        $template = (!empty($post->page_template)) ? $post->page_template : false;
        ?>
<p class="post-attributes-label-wrapper"><label class="post-attributes-label" for="page_template"><?php 
        _e('Template');
        ?></label><?php 
        /**
         * Fires immediately after the label inside the 'Template' section
         * of the 'Page Attributes' meta box.
         *
         * @since 4.4.0
         *
         * @param string  $template The template used for the current post.
         * @param WP_Post $post     The current post.
         */
        do_action('page_attributes_meta_box_template', $template, $post);
        ?></p>
<select name="page_template" id="page_template">
<?php 
        /**
         * Filters the title of the default page template displayed in the drop-down.
         *
         * @since 4.1.0
         *
         * @param string $label   The display value for the default page template title.
         * @param string $context Where the option label is displayed. Possible values
         *                        include 'meta-box' or 'quick-edit'.
         */
        $default_title = apply_filters('default_page_template_title', __('Default Template'), 'meta-box');
        ?>
<option value="default"><?php 
        echo esc_html($default_title);
        ?></option>
<?php 
        page_template_dropdown($template, $post->post_type);
        ?>
</select>
<?php 
    }
    if (post_type_supports($post->post_type, 'page-attributes')) {
        ?>
<p class="post-attributes-label-wrapper"><label class="post-attributes-label" for="menu_order"><?php 
        _e('Order');
        ?></label></p>
<input name="menu_order" type="text" size="4" id="menu_order" value="<?php 
        echo esc_attr($post->menu_order);
        ?>" />
<?php 
        /**
         * Fires before the help hint text in the 'Page Attributes' meta box.
         *
         * @since 4.9.0
         *
         * @param WP_Post $post The current post.
         */
        do_action('page_attributes_misc_attributes', $post);
        if ('page' == $post->post_type && get_current_screen()->get_help_tabs()) {
            ?>
<p><?php 
            _e('Need help? Use the Help tab above the screen title.');
            ?></p>
<?php 
        }
    }
}

WordPress Version: 4.9

// -- Page related Meta Boxes
/**
 * Display page attributes form fields.
 *
 * @since 2.7.0
 *
 * @param object $post
 */
function page_attributes_meta_box($post)
{
    if (is_post_type_hierarchical($post->post_type)) {
        $dropdown_args = array('post_type' => $post->post_type, 'exclude_tree' => $post->ID, 'selected' => $post->post_parent, 'name' => 'parent_id', 'show_option_none' => __('(no parent)'), 'sort_column' => 'menu_order, post_title', 'echo' => 0);
        /**
         * Filters the arguments used to generate a Pages drop-down element.
         *
         * @since 3.3.0
         *
         * @see wp_dropdown_pages()
         *
         * @param array   $dropdown_args Array of arguments used to generate the pages drop-down.
         * @param WP_Post $post          The current post.
         */
        $dropdown_args = apply_filters('page_attributes_dropdown_pages_args', $dropdown_args, $post);
        $pages = wp_dropdown_pages($dropdown_args);
        if (!empty($pages)) {
            ?>
<p class="post-attributes-label-wrapper"><label class="post-attributes-label" for="parent_id"><?php 
            _e('Parent');
            ?></label></p>
<?php 
            echo $pages;
        }
        // end empty pages check
    }
    // end hierarchical check.
    if (count(get_page_templates($post)) > 0 && get_option('page_for_posts') != $post->ID) {
        $template = (!empty($post->page_template)) ? $post->page_template : false;
        ?>
<p class="post-attributes-label-wrapper"><label class="post-attributes-label" for="page_template"><?php 
        _e('Template');
        ?></label><?php 
        /**
         * Fires immediately after the label inside the 'Template' section
         * of the 'Page Attributes' meta box.
         *
         * @since 4.4.0
         *
         * @param string  $template The template used for the current post.
         * @param WP_Post $post     The current post.
         */
        do_action('page_attributes_meta_box_template', $template, $post);
        ?></p>
<select name="page_template" id="page_template">
<?php 
        /**
         * Filters the title of the default page template displayed in the drop-down.
         *
         * @since 4.1.0
         *
         * @param string $label   The display value for the default page template title.
         * @param string $context Where the option label is displayed. Possible values
         *                        include 'meta-box' or 'quick-edit'.
         */
        $default_title = apply_filters('default_page_template_title', __('Default Template'), 'meta-box');
        ?>
<option value="default"><?php 
        echo esc_html($default_title);
        ?></option>
<?php 
        page_template_dropdown($template, $post->post_type);
        ?>
</select>
<?php 
    }
    if (post_type_supports($post->post_type, 'page-attributes')) {
        ?>
<p class="post-attributes-label-wrapper"><label class="post-attributes-label" for="menu_order"><?php 
        _e('Order');
        ?></label></p>
<input name="menu_order" type="text" size="4" id="menu_order" value="<?php 
        echo esc_attr($post->menu_order);
        ?>" />
<?php 
        /**
         * Fires before the help hint text in the 'Page Attributes' meta box.
         *
         * @since 4.8.0
         *
         * @param WP_Post $post The current post.
         */
        do_action('page_attributes_misc_attributes', $post);
        if ('page' == $post->post_type && get_current_screen()->get_help_tabs()) {
            ?>
<p><?php 
            _e('Need help? Use the Help tab above the screen title.');
            ?></p>
<?php 
        }
    }
}

WordPress Version: 4.7

// -- Page related Meta Boxes
/**
 * Display page attributes form fields.
 *
 * @since 2.7.0
 *
 * @param object $post
 */
function page_attributes_meta_box($post)
{
    if (is_post_type_hierarchical($post->post_type)) {
        $dropdown_args = array('post_type' => $post->post_type, 'exclude_tree' => $post->ID, 'selected' => $post->post_parent, 'name' => 'parent_id', 'show_option_none' => __('(no parent)'), 'sort_column' => 'menu_order, post_title', 'echo' => 0);
        /**
         * Filters the arguments used to generate a Pages drop-down element.
         *
         * @since 3.3.0
         *
         * @see wp_dropdown_pages()
         *
         * @param array   $dropdown_args Array of arguments used to generate the pages drop-down.
         * @param WP_Post $post          The current WP_Post object.
         */
        $dropdown_args = apply_filters('page_attributes_dropdown_pages_args', $dropdown_args, $post);
        $pages = wp_dropdown_pages($dropdown_args);
        if (!empty($pages)) {
            ?>
<p class="post-attributes-label-wrapper"><label class="post-attributes-label" for="parent_id"><?php 
            _e('Parent');
            ?></label></p>
<?php 
            echo $pages;
        }
        // end empty pages check
    }
    // end hierarchical check.
    if (count(get_page_templates($post)) > 0 && get_option('page_for_posts') != $post->ID) {
        $template = (!empty($post->page_template)) ? $post->page_template : false;
        ?>
<p class="post-attributes-label-wrapper"><label class="post-attributes-label" for="page_template"><?php 
        _e('Template');
        ?></label><?php 
        /**
         * Fires immediately after the label inside the 'Template' section
         * of the 'Page Attributes' meta box.
         *
         * @since 4.4.0
         *
         * @param string  $template The template used for the current post.
         * @param WP_Post $post     The current post.
         */
        do_action('page_attributes_meta_box_template', $template, $post);
        ?></p>
<select name="page_template" id="page_template">
<?php 
        /**
         * Filters the title of the default page template displayed in the drop-down.
         *
         * @since 4.1.0
         *
         * @param string $label   The display value for the default page template title.
         * @param string $context Where the option label is displayed. Possible values
         *                        include 'meta-box' or 'quick-edit'.
         */
        $default_title = apply_filters('default_page_template_title', __('Default Template'), 'meta-box');
        ?>
<option value="default"><?php 
        echo esc_html($default_title);
        ?></option>
<?php 
        page_template_dropdown($template, $post->post_type);
        ?>
</select>
<?php 
    }
    if (post_type_supports($post->post_type, 'page-attributes')) {
        ?>
<p class="post-attributes-label-wrapper"><label class="post-attributes-label" for="menu_order"><?php 
        _e('Order');
        ?></label></p>
<input name="menu_order" type="text" size="4" id="menu_order" value="<?php 
        echo esc_attr($post->menu_order);
        ?>" />
<?php 
        if ('page' == $post->post_type && get_current_screen()->get_help_tabs()) {
            ?>
<p><?php 
            _e('Need help? Use the Help tab above the screen title.');
            ?></p>
<?php 
        }
    }
}

WordPress Version: 4.6

// -- Page related Meta Boxes
/**
 * Display page attributes form fields.
 *
 * @since 2.7.0
 *
 * @param object $post
 */
function page_attributes_meta_box($post)
{
    $post_type_object = get_post_type_object($post->post_type);
    if ($post_type_object->hierarchical) {
        $dropdown_args = array('post_type' => $post->post_type, 'exclude_tree' => $post->ID, 'selected' => $post->post_parent, 'name' => 'parent_id', 'show_option_none' => __('(no parent)'), 'sort_column' => 'menu_order, post_title', 'echo' => 0);
        /**
         * Filters the arguments used to generate a Pages drop-down element.
         *
         * @since 3.3.0
         *
         * @see wp_dropdown_pages()
         *
         * @param array   $dropdown_args Array of arguments used to generate the pages drop-down.
         * @param WP_Post $post          The current WP_Post object.
         */
        $dropdown_args = apply_filters('page_attributes_dropdown_pages_args', $dropdown_args, $post);
        $pages = wp_dropdown_pages($dropdown_args);
        if (!empty($pages)) {
            ?>
<p><strong><?php 
            _e('Parent');
            ?></strong></p>
<label class="screen-reader-text" for="parent_id"><?php 
            _e('Parent');
            ?></label>
<?php 
            echo $pages;
        }
        // end empty pages check
    }
    // end hierarchical check.
    if ('page' == $post->post_type && 0 != count(get_page_templates($post)) && get_option('page_for_posts') != $post->ID) {
        $template = (!empty($post->page_template)) ? $post->page_template : false;
        ?>
<p><strong><?php 
        _e('Template');
        ?></strong><?php 
        /**
         * Fires immediately after the heading inside the 'Template' section
         * of the 'Page Attributes' meta box.
         *
         * @since 4.4.0
         *
         * @param string  $template The template used for the current post.
         * @param WP_Post $post     The current post.
         */
        do_action('page_attributes_meta_box_template', $template, $post);
        ?></p>
<label class="screen-reader-text" for="page_template"><?php 
        _e('Page Template');
        ?></label><select name="page_template" id="page_template">
<?php 
        /**
         * Filters the title of the default page template displayed in the drop-down.
         *
         * @since 4.1.0
         *
         * @param string $label   The display value for the default page template title.
         * @param string $context Where the option label is displayed. Possible values
         *                        include 'meta-box' or 'quick-edit'.
         */
        $default_title = apply_filters('default_page_template_title', __('Default Template'), 'meta-box');
        ?>
<option value="default"><?php 
        echo esc_html($default_title);
        ?></option>
<?php 
        page_template_dropdown($template);
        ?>
</select>
<?php 
    }
    ?>
<p><strong><?php 
    _e('Order');
    ?></strong></p>
<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>
<?php 
    if ('page' == $post->post_type && get_current_screen()->get_help_tabs()) {
        ?>
<p><?php 
        _e('Need help? Use the Help tab above the screen title.');
        ?></p>
<?php 
    }
}

WordPress Version: 4.4

// -- Page related Meta Boxes
/**
 * Display page attributes form fields.
 *
 * @since 2.7.0
 *
 * @param object $post
 */
function page_attributes_meta_box($post)
{
    $post_type_object = get_post_type_object($post->post_type);
    if ($post_type_object->hierarchical) {
        $dropdown_args = array('post_type' => $post->post_type, 'exclude_tree' => $post->ID, 'selected' => $post->post_parent, 'name' => 'parent_id', 'show_option_none' => __('(no parent)'), 'sort_column' => 'menu_order, post_title', 'echo' => 0);
        /**
         * Filter the arguments used to generate a Pages drop-down element.
         *
         * @since 3.3.0
         *
         * @see wp_dropdown_pages()
         *
         * @param array   $dropdown_args Array of arguments used to generate the pages drop-down.
         * @param WP_Post $post          The current WP_Post object.
         */
        $dropdown_args = apply_filters('page_attributes_dropdown_pages_args', $dropdown_args, $post);
        $pages = wp_dropdown_pages($dropdown_args);
        if (!empty($pages)) {
            ?>
<p><strong><?php 
            _e('Parent');
            ?></strong></p>
<label class="screen-reader-text" for="parent_id"><?php 
            _e('Parent');
            ?></label>
<?php 
            echo $pages;
        }
        // end empty pages check
    }
    // end hierarchical check.
    if ('page' == $post->post_type && 0 != count(get_page_templates($post)) && get_option('page_for_posts') != $post->ID) {
        $template = (!empty($post->page_template)) ? $post->page_template : false;
        ?>
<p><strong><?php 
        _e('Template');
        ?></strong><?php 
        /**
         * Fires immediately after the heading inside the 'Template' section
         * of the 'Page Attributes' meta box.
         *
         * @since 4.4.0
         *
         * @param string  $template The template used for the current post.
         * @param WP_Post $post     The current post.
         */
        do_action('page_attributes_meta_box_template', $template, $post);
        ?></p>
<label class="screen-reader-text" for="page_template"><?php 
        _e('Page Template');
        ?></label><select name="page_template" id="page_template">
<?php 
        /**
         * Filter the title of the default page template displayed in the drop-down.
         *
         * @since 4.1.0
         *
         * @param string $label   The display value for the default page template title.
         * @param string $context Where the option label is displayed. Possible values
         *                        include 'meta-box' or 'quick-edit'.
         */
        $default_title = apply_filters('default_page_template_title', __('Default Template'), 'meta-box');
        ?>
<option value="default"><?php 
        echo esc_html($default_title);
        ?></option>
<?php 
        page_template_dropdown($template);
        ?>
</select>
<?php 
    }
    ?>
<p><strong><?php 
    _e('Order');
    ?></strong></p>
<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>
<?php 
    if ('page' == $post->post_type && get_current_screen()->get_help_tabs()) {
        ?>
<p><?php 
        _e('Need help? Use the Help tab in the upper right of your screen.');
        ?></p>
<?php 
    }
}

WordPress Version: 4.2

// -- Page related Meta Boxes
/**
 * Display page attributes form fields.
 *
 * @since 2.7.0
 *
 * @param object $post
 */
function page_attributes_meta_box($post)
{
    $post_type_object = get_post_type_object($post->post_type);
    if ($post_type_object->hierarchical) {
        $dropdown_args = array('post_type' => $post->post_type, 'exclude_tree' => $post->ID, 'selected' => $post->post_parent, 'name' => 'parent_id', 'show_option_none' => __('(no parent)'), 'sort_column' => 'menu_order, post_title', 'echo' => 0);
        /**
         * Filter the arguments used to generate a Pages drop-down element.
         *
         * @since 3.3.0
         *
         * @see wp_dropdown_pages()
         *
         * @param array   $dropdown_args Array of arguments used to generate the pages drop-down.
         * @param WP_Post $post          The current WP_Post object.
         */
        $dropdown_args = apply_filters('page_attributes_dropdown_pages_args', $dropdown_args, $post);
        $pages = wp_dropdown_pages($dropdown_args);
        if (!empty($pages)) {
            ?>
<p><strong><?php 
            _e('Parent');
            ?></strong></p>
<label class="screen-reader-text" for="parent_id"><?php 
            _e('Parent');
            ?></label>
<?php 
            echo $pages;
        }
        // end empty pages check
    }
    // end hierarchical check.
    if ('page' == $post->post_type && 0 != count(get_page_templates($post)) && get_option('page_for_posts') != $post->ID) {
        $template = (!empty($post->page_template)) ? $post->page_template : false;
        ?>
<p><strong><?php 
        _e('Template');
        ?></strong></p>
<label class="screen-reader-text" for="page_template"><?php 
        _e('Page Template');
        ?></label><select name="page_template" id="page_template">
<?php 
        /**
         * Filter the title of the default page template displayed in the drop-down.
         *
         * @since 4.1.0
         *
         * @param string $label   The display value for the default page template title.
         * @param string $context Where the option label is displayed. Possible values
         *                        include 'meta-box' or 'quick-edit'.
         */
        $default_title = apply_filters('default_page_template_title', __('Default Template'), 'meta-box');
        ?>
<option value="default"><?php 
        echo esc_html($default_title);
        ?></option>
<?php 
        page_template_dropdown($template);
        ?>
</select>
<?php 
    }
    ?>
<p><strong><?php 
    _e('Order');
    ?></strong></p>
<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>
<?php 
    if ('page' == $post->post_type && get_current_screen()->get_help_tabs()) {
        ?>
<p><?php 
        _e('Need help? Use the Help tab in the upper right of your screen.');
        ?></p>
<?php 
    }
}

WordPress Version: 4.1

// -- Page related Meta Boxes
/**
 * Display page attributes form fields.
 *
 * @since 2.7.0
 *
 * @param object $post
 */
function page_attributes_meta_box($post)
{
    $post_type_object = get_post_type_object($post->post_type);
    if ($post_type_object->hierarchical) {
        $dropdown_args = array('post_type' => $post->post_type, 'exclude_tree' => $post->ID, 'selected' => $post->post_parent, 'name' => 'parent_id', 'show_option_none' => __('(no parent)'), 'sort_column' => 'menu_order, post_title', 'echo' => 0);
        /**
         * Filter the arguments used to generate a Pages drop-down element.
         *
         * @since 3.3.0
         *
         * @see wp_dropdown_pages()
         *
         * @param array   $dropdown_args Array of arguments used to generate the pages drop-down.
         * @param WP_Post $post          The current WP_Post object.
         */
        $dropdown_args = apply_filters('page_attributes_dropdown_pages_args', $dropdown_args, $post);
        $pages = wp_dropdown_pages($dropdown_args);
        if (!empty($pages)) {
            ?>
<p><strong><?php 
            _e('Parent');
            ?></strong></p>
<label class="screen-reader-text" for="parent_id"><?php 
            _e('Parent');
            ?></label>
<?php 
            echo $pages;
        }
        // end empty pages check
    }
    // end hierarchical check.
    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>
<label class="screen-reader-text" for="page_template"><?php 
        _e('Page Template');
        ?></label><select name="page_template" id="page_template">
<?php 
        /**
         * Filter the title of the default page template displayed in the drop-down.
         *
         * @since 4.1.0
         *
         * @param string $label   The display value for the default page template title.
         * @param string $context Where the option label is displayed. Possible values
         *                        include 'meta-box' or 'quick-edit'.
         */
        $default_title = apply_filters('default_page_template_title', __('Default Template'), 'meta-box');
        ?> 
<option value="default"><?php 
        echo esc_html($default_title);
        ?></option>
<?php 
        page_template_dropdown($template);
        ?>
</select>
<?php 
    }
    ?>
<p><strong><?php 
    _e('Order');
    ?></strong></p>
<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>
<p><?php 
    if ('page' == $post->post_type) {
        _e('Need help? Use the Help tab in the upper right of your screen.');
    }
    ?></p>
<?php 
}

WordPress Version: 3.9

// -- Page related Meta Boxes
/**
 * Display page attributes form fields.
 *
 * @since 2.7.0
 *
 * @param object $post
 */
function page_attributes_meta_box($post)
{
    $post_type_object = get_post_type_object($post->post_type);
    if ($post_type_object->hierarchical) {
        $dropdown_args = array('post_type' => $post->post_type, 'exclude_tree' => $post->ID, 'selected' => $post->post_parent, 'name' => 'parent_id', 'show_option_none' => __('(no parent)'), 'sort_column' => 'menu_order, post_title', 'echo' => 0);
        /**
         * Filter the arguments used to generate a Pages drop-down element.
         *
         * @since 3.3.0
         *
         * @see wp_dropdown_pages()
         *
         * @param array   $dropdown_args Array of arguments used to generate the pages drop-down.
         * @param WP_Post $post          The current WP_Post object.
         */
        $dropdown_args = apply_filters('page_attributes_dropdown_pages_args', $dropdown_args, $post);
        $pages = wp_dropdown_pages($dropdown_args);
        if (!empty($pages)) {
            ?>
<p><strong><?php 
            _e('Parent');
            ?></strong></p>
<label class="screen-reader-text" for="parent_id"><?php 
            _e('Parent');
            ?></label>
<?php 
            echo $pages;
        }
        // end empty pages check
    }
    // end hierarchical check.
    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>
<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($template);
        ?>
</select>
<?php 
    }
    ?>
<p><strong><?php 
    _e('Order');
    ?></strong></p>
<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>
<p><?php 
    if ('page' == $post->post_type) {
        _e('Need help? Use the Help tab in the upper right of your screen.');
    }
    ?></p>
<?php 
}

WordPress Version: 3.7

// -- Page related Meta Boxes
/**
 * Display page attributes form fields.
 *
 * @since 2.7.0
 *
 * @param object $post
 */
function page_attributes_meta_box($post)
{
    $post_type_object = get_post_type_object($post->post_type);
    if ($post_type_object->hierarchical) {
        $dropdown_args = array('post_type' => $post->post_type, 'exclude_tree' => $post->ID, 'selected' => $post->post_parent, 'name' => 'parent_id', 'show_option_none' => __('(no parent)'), 'sort_column' => 'menu_order, post_title', 'echo' => 0);
        $dropdown_args = apply_filters('page_attributes_dropdown_pages_args', $dropdown_args, $post);
        $pages = wp_dropdown_pages($dropdown_args);
        if (!empty($pages)) {
            ?>
<p><strong><?php 
            _e('Parent');
            ?></strong></p>
<label class="screen-reader-text" for="parent_id"><?php 
            _e('Parent');
            ?></label>
<?php 
            echo $pages;
        }
        // end empty pages check
    }
    // end hierarchical check.
    if ('page' == $post->post_type && 0 != count(get_page_templates())) {
        $template = (!empty($post->page_template)) ? $post->page_template : false;
        ?>
<p><strong><?php 
        _e('Template');
        ?></strong></p>
<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($template);
        ?>
</select>
<?php 
    }
    ?>
<p><strong><?php 
    _e('Order');
    ?></strong></p>
<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>
<p><?php 
    if ('page' == $post->post_type) {
        _e('Need help? Use the Help tab in the upper right of your screen.');
    }
    ?></p>
<?php 
}