'main_menu', 'theme_location' => 'main_menu', 'depth' => 2, 'fallback_cb' => 'bigblank_menu_fallback', 'container_id' => 'menu' )); } endif; if (!function_exists('bigblank_footer_menu')) : /** * Footer menu */ function bigblank_footer_menu() { wp_nav_menu(array( 'menu' => 'footer_menu', 'theme_location' => 'footer_menu', 'container' => 'nav', 'container_id' => 'footer-nav', 'depth' => 1, 'fallback_cb' => 'bigblank_footer_menu_fallback', )); } endif; if (!function_exists('bigblank_menu_fallback')) : /** * Default menu fallback */ function bigblank_menu_fallback() { $menus = wp_get_nav_menus(); if (!empty($menus)) { return wp_nav_menu(array( 'depth' => 2, 'container_id' => 'menu' )); } } endif; if (!function_exists('bigblank_footer_menu_fallback')) : /** * Footer menu fallback */ function bigblank_footer_menu_fallback() { $menus = wp_get_nav_menus(); if (!empty($menus)) { return wp_nav_menu(array( 'container' => 'nav', 'depth' => 1, 'container_id' => 'footer-nav' )); } } endif; if (!function_exists('bigblank_paging_nav')) : /** * Display navigation to next/previous set of posts when applicable. * * * @return void */ function bigblank_paging_nav() { // Don't print empty markup if there's only one page. if ($GLOBALS['wp_query']->max_num_pages < 2) { return; } $paged = get_query_var('paged') ? intval(get_query_var('paged')) : 1; $pagenum_link = html_entity_decode(get_pagenum_link()); $query_args = array(); $url_parts = explode('?', $pagenum_link); if (isset($url_parts[1])) { wp_parse_str($url_parts[1], $query_args); } $pagenum_link = remove_query_arg(array_keys($query_args), $pagenum_link); $pagenum_link = trailingslashit($pagenum_link) . '%_%'; $format = $GLOBALS['wp_rewrite']->using_index_permalinks() && !strpos($pagenum_link, 'index.php') ? 'index.php/' : ''; $format .= $GLOBALS['wp_rewrite']->using_permalinks() ? user_trailingslashit('page/%#%', 'paged') : '?paged=%#%'; // Set up paginated links. $links = paginate_links(array( 'base' => $pagenum_link, 'format' => $format, 'total' => $GLOBALS['wp_query']->max_num_pages, 'current' => $paged, 'mid_size' => 1, 'add_args' => array_map('urlencode', $query_args), 'prev_text' => __('← Previous', 'bigblank'), 'next_text' => __('Next →', 'bigblank'), )); if ($links) : ?> post_parent) : get_adjacent_post(false, '', true); $next = get_adjacent_post(false, '', false); $is_last_page = ''; if (!$next && !$previous) { return; } if (!$next) { $is_last_page = 'no-next'; } ?> ', esc_url(get_permalink()), esc_attr(get_the_date('c')), esc_html(get_the_date()), esc_url(get_author_posts_url(get_the_author_meta('ID'))), get_the_author()); } endif; /** * Find out if blog has more than one category. * * * @return boolean true if blog has more than 1 category */ function bigblank_categorized_blog() { if (false === ( $all_the_cool_cats = get_transient('bigblank_category_count') )) { // Create an array of all the categories that are attached to posts $all_the_cool_cats = get_categories(array( 'hide_empty' => 1, )); // Count the number of categories that are attached to the posts $all_the_cool_cats = count($all_the_cool_cats); set_transient('bigblank_category_count', $all_the_cool_cats); } if (1 !== (int) $all_the_cool_cats) { // This blog has more than 1 category so bigblank_categorized_blog should return true return true; } else { // This blog has only 1 category so bigblank_categorized_blog should return false return false; } } /** * Flush out the transients used in bigblank_categorized_blog. * * * @return void */ function bigblank_category_transient_flusher() { // Like, beat it. Dig? delete_transient('bigblank_category_count'); } add_action('edit_category', 'bigblank_category_transient_flusher'); add_action('save_post', 'bigblank_category_transient_flusher'); /** * Display an optional post thumbnail. * * Wraps the post thumbnail in an anchor element on index * views, or a div element when on single views. * * * @return void */ function bigblank_post_thumbnail() { if (post_password_required() || !has_post_thumbnail()) { return; } if (is_singular()) : ?>
post_content)): ?>

ID, 'bigblank_post_layout', true); ?>