<?php

/**
 * Returns the site map
 *
 * This function will return the site map
 * as a list 4 levels deep.
 *
 * @function add_sitemap()
 *
 * @uses wp_list_pages()
 *
 * @param N/A
 *
 * @return (string) the site map
 * 
 * @since 1.0.0 
 *
 */
function add_sitemap() {
	
    return '<ul id="site-map">' . wp_list_pages( array( 'title_li' => '', 'depth' => 4, 'echo' => false ) ) . '</ul>';
}
add_shortcode( 'sitemap', 'add_sitemap' );



/**
 * Returns an index page
 *
 * This function will return an index page
 * with a list of all child pages/posts 1
 * level deep.
 *
 * @function add_index_page()
 *
 * @uses wp_list_pages()
 *
 * @param N/A
 *
 * @return (string) an index list of child pages
 * 
 * @since 1.0.0 
 *
 */
function add_index_page() {
	
    return '<ul id="site-map">' . wp_list_pages( array( 'child_of' => get_the_ID(), 'title_li' => '', 'depth' => 1, 'echo' => false ) ) . '</ul>';
}
add_shortcode( 'index_page', 'add_index_page' );



/**
 * Returns the resources index page
 *
 * This function will return the resources
 * index page with a list of all child
 * pages/posts 1 level deep.
 *
 * @function add_resources_index_page()
 *
 * @uses wp_list_pages()
 *
 * @param N/A
 *
 * @return (string) an index list of resources child pages
 * 
 * @since 1.0.0 
 *
 */
function add_resources_index_page() {
	
    return '<ul id="resources-list">' . wp_list_pages( array( 'child_of' => get_the_ID(), 'title_li' => '', 'depth' => 1, 'echo' => false ) ) . '</ul>';
}
add_shortcode( 'resources_page', 'add_resources_index_page' );