/** Echo the settings update form.
     *
     * @param array $instance Current settings
     */
    function form($instance)
    {
        $instance = wp_parse_args((array) $instance, array('title' => '', 'include' => array(), 'order' => ''));
        // Empty fallback (default)
        if (empty($instance['include'])) {
            $instance['include'][] = 'home';
            $pages = get_pages();
            foreach ((array) $pages as $page) {
                $instance['include'][] = $page->ID;
            }
        }
        ?>

		<p><?php 
        _e('NOTE: Leave title blank if using this widget in the header', 'genesis');
        ?>
</p>
		<p>
			<label for="<?php 
        echo $this->get_field_id('title');
        ?>
"><?php 
        _e('Title', 'genesis');
        ?>
:</label>
			<input type="text" id="<?php 
        echo $this->get_field_id('title');
        ?>
" name="<?php 
        echo $this->get_field_name('title');
        ?>
" value="<?php 
        echo esc_attr($instance['title']);
        ?>
" class="widefat" />
		</p>

		<p><?php 
        _e('Choose the order by which you would like to display your pages', 'genesis');
        ?>
:</p>

		<p><select name="<?php 
        echo $this->get_field_name('order');
        ?>
">
			<?php 
        printf('<option value="menu_order" %s>%s</option>', selected('menu_order', $instance['order'], 0), __('Menu Order', 'genesis'));
        printf('<option value="ID" %s>%s</option>', selected('ID', $instance['order'], 0), __('ID', 'genesis'));
        printf('<option value="post_title" %s>%s</option>', selected('post_title', $instance['order'], 0), __('Title', 'genesis'));
        printf('<option value="post_date" %s>%s</option>', selected('post_date', $instance['order'], 0), __('Date Created', 'genesis'));
        printf('<option value="post_modified" %s>%s</option>', selected('post_modified', $instance['order'], 0), __('Date Modified', 'genesis'));
        printf('<option value="post_author" %s>%s</option>', selected('post_author', $instance['order'], 0), __('Author', 'genesis'));
        printf('<option value="post_name" %s>%s</option>', selected('post_name', $instance['order'], 0), __('Slug', 'genesis'));
        ?>
		</select></p>

		<p><?php 
        _e('Use the checklist below to choose which pages (and subpages) you want to include in your Navigation Menu', 'genesis');
        ?>
</p>

		<p>
		<ul class="genesis-pagechecklist">
		<?php 
        genesis_page_checklist($this->get_field_name('include'), $instance['include']);
        ?>
		</ul>
		</p>

	<?php 
    }
/**
 * @deprecated in 0.1.6
 *
 */
function sp_page_checklist($name = '', $selected = array())
{
    genesis_page_checklist($name, $selected);
}
    function form($instance)
    {
        $instance = wp_parse_args((array) $instance, array('title' => '', 'include' => array(), 'order' => ''));
        // Empty fallback (default)
        if (empty($instance['include'])) {
            $instance['include'][] = 'home';
            $pages = get_pages();
            foreach ((array) $pages as $page) {
                $instance['include'][] = $page->ID;
            }
        }
        ?>
		
		<p><?php 
        _e('NOTE: Leave title blank if using this widget in the header', 'genesis');
        ?>
</p>
		<p>
			<label for="<?php 
        echo $this->get_field_id('title');
        ?>
"><?php 
        _e('Title', 'genesis');
        ?>
:</label>
			<input type="text" id="<?php 
        echo $this->get_field_id('title');
        ?>
" name="<?php 
        echo $this->get_field_name('title');
        ?>
" value="<?php 
        echo esc_attr($instance['title']);
        ?>
" style="width:95%;" />
		</p>

		<p><?php 
        _e('Choose the order by which you would like to display your pages', 'genesis');
        ?>
:</p>
		
		<p><select name="<?php 
        echo $this->get_field_name('order');
        ?>
">
			<option style="padding-right:10px;" value="menu_order" <?php 
        selected('menu_order', $instance['order']);
        ?>
>Menu Order</option>
			<option style="padding-right:10px;" value="ID" <?php 
        selected('ID', $instance['order']);
        ?>
>ID</option>
			<option style="padding-right:10px;" value="post_title" <?php 
        selected('post_title', $instance['order']);
        ?>
>Title</option>
			<option style="padding-right:10px;" value="post_date" <?php 
        selected('post_date', $instance['order']);
        ?>
>Date Created</option>
			<option style="padding-right:10px;" value="post_modified" <?php 
        selected('post_modified', $instance['order']);
        ?>
>Date Modified</option>
			<option style="padding-right:10px;" value="post_author" <?php 
        selected('post_author', $instance['order']);
        ?>
>Author</option>
			<option style="padding-right:10px;" value="post_name" <?php 
        selected('post_name', $instance['order']);
        ?>
>Slug</option>
		</select></p>
	
		<p><?php 
        _e('Use the checklist below to choose which pages (and subpages) you want to include in your Navigation Menu', 'genesis');
        ?>
</p>
		
		<p>
		<ul class="pagechecklist" style="list-style-type: none; margin: 0; padding: 0;">
		<?php 
        genesis_page_checklist($this->get_field_name('include'), $instance['include']);
        ?>
		</ul>
		</p>
			
	<?php 
    }