__( 'Primary Navigation', 'admired' ), 'secondary' => __('Secondary Navigation - Top', 'admired'), ) ); // Post formats add_theme_support( 'post-formats', array( 'aside', 'link', 'gallery', 'status', 'quote', 'image' ) ); add_custom_background(); // Custom backgrounds add_theme_support( 'post-thumbnails' ); } endif; // admired_setup //Add Theme Options File $functions_path = TEMPLATEPATH . '/admin/'; require_once ($functions_path . 'admired-options.php'); require_once ($functions_path . 'admired-custom-header.php'); /* Register Assets */ if( ! function_exists( 'admired_register_assets') ): function admired_register_assets(){ $options = get_option('admired_theme_options'); /*---------------------------------------- # REGISTER SCRIPTS ----------------------------------------*/ /* Register Scripts */ if(!is_admin()) wp_enqueue_script('jquery'); /* Modernizr */ wp_register_script('modernizr', get_template_directory_uri() . '/js/modernizr-2.0.6.js', array(), '2.0.6' ); if( !is_admin() ){ wp_enqueue_script('modernizr'); } /* Superfish Scripts */ wp_register_script('admired-SFhoverIntent', get_template_directory_uri() . '/js/superfish/hoverIntent.js', array()); if ( empty( $options['admired_remove_superfish'] ) && !is_admin()) { wp_enqueue_script('admired-SFhoverIntent'); } wp_register_script('admired-SF', get_template_directory_uri() . '/js/superfish/superfish.js', array()); if ( empty( $options['admired_remove_superfish'] ) && !is_admin()) { wp_enqueue_script('admired-SF'); } } endif; add_action('init','admired_register_assets'); /** * Display pagination when applicable * * @since admired 1.0 */ if (!function_exists('admired_pagination')): function admired_pagination($pages = '', $range = 3) { /* handle pagination for post pages*/ $showitems = ($range * 2)+1; global $paged; if(empty($paged)) $paged = 1; if($pages == '') { global $wp_query; $pages = $wp_query->max_num_pages; if(!$pages) { $pages = 1; } } if(1 != $pages) { echo "
Page ".$paged." of ".$pages.""; if($paged > 2 && $paged > $range+1 && $showitems < $pages) echo "« First"; if($paged > 1 && $showitems < $pages) echo "‹ Previous"; for ($i=1; $i <= $pages; $i++) { if (1 != $pages &&( !($i >= $paged+$range+1 || $i <= $paged-$range-1) || $pages <= $showitems )) { echo ($paged == $i)? "".$i."":"".$i.""; } } if ($paged < $pages && $showitems < $pages) echo "Next ›"; if ($paged < $pages-1 && $paged+$range-1 < $pages && $showitems < $pages) echo "Last »"; echo "
\n"; } } // admired_pagination endif; // Display navigation to next/previous pages. function admired_content_nav( $nav_id ) { global $wp_query; if ( $wp_query->max_num_pages > 1 ) : ?> false)); if ( isset ($options['admired_remove_superfish'])) { echo $menu; } else { $ulpos = stripos($menu, '