<?php
/**
 * Sidebar
 *
 * @package passport
 * @subpackage passport
 * @since Passport v.1.0.
 * 
**/

    if( ( is_home()
        || is_page_template( 'template-masonry.php' ) 
        || is_page_template( 'template-medium-image.php' ) 
        || is_page_template( 'template-large-image.php' ) 
        ) ) {
		$dynamic_sidebar = PASSPORT_THEME_SLUG . '-sidebar';
    } elseif( is_page() ) {
		$dynamic_sidebar = PASSPORT_THEME_SLUG . '-sidebar-page';
	} elseif( is_single() ) {
		$dynamic_sidebar = PASSPORT_THEME_SLUG . '-sidebar-single';
	} else {
		$dynamic_sidebar = PASSPORT_THEME_SLUG . '-sidebar';
	}

	if ( is_active_sidebar( $dynamic_sidebar ) ) {
		dynamic_sidebar( $dynamic_sidebar );
	} 