false,
'width' => 1000,
'height' => 364,
'flex-height' => true,
)
);
/* Custom background support */
add_theme_support( 'custom-background',
array( 'default-color' => '111111',
'default-image' => get_template_directory_uri() . '/img/zwartevilt.png',
)
);
}
add_action('after_setup_theme', 'blackoot_setup');
/* Adjust $content_width depending on the page being displayed */
function blackoot_content_width() {
global $content_width;
if ( is_page_template( 'page-full-width.php' ) )
$content_width = 920;
}
add_action( 'template_redirect', 'blackoot_content_width' );
/*
* Page title (for WordPress < 4.1 )
*/
if ( ! function_exists( '_wp_render_title_tag' ) ) :
function blackoot_render_title() {
?>
';
if ("" != get_adjacent_post( false, "", false ) ): // Is there a previous post?
echo '
',
next_post_link('%link', __('Next Post', 'blackoot-lite') . '' ),
'
';
endif;
if ("" != get_adjacent_post( false, "", true ) ): // Is there a next post?
echo '
',
previous_post_link('%link', '' . __('Previous Post', 'blackoot-lite') ),
'
';
endif;
echo '
';
endif;
}
/*
* Find whether post page needs comments pagination links (used in comments.php)
*/
function blackoot_page_has_comments_nav() {
global $wp_query;
return ($wp_query->max_num_comment_pages > 1);
}
function blackoot_page_has_next_comments_link() {
global $wp_query;
$max_cpage = $wp_query->max_num_comment_pages;
$cpage = get_query_var( 'cpage' );
return ( $max_cpage > $cpage );
}
function blackoot_page_has_previous_comments_link() {
$cpage = get_query_var( 'cpage' );
return ($cpage > 1);
}
/*
* Find whether attachement page needs navigation links (used in single.php)
*/
function blackoot_adjacent_image_link($prev = true) {
global $post;
$post = get_post($post);
$attachments = array_values(get_children("post_parent=$post->post_parent&post_type=attachment&post_mime_type=image&orderby=\"menu_order ASC, ID ASC\""));
foreach ( $attachments as $k => $attachment )
if ( $attachment->ID == $post->ID )
break;
$k = $prev ? $k - 1 : $k + 1;
if ( isset($attachments[$k]) )
return true;
else
return false;
}
/*
* Generate breadcrumbs
*/
function blackoot_breadcrumbs() {
global $post, $blackoot_options;
$sep = $blackoot_options['breadcrumbs_sep'];
if (!$sep) $sep = '/';
if (!is_front_page()):
echo '