';
}
$items = $homelink . $items;
return $items;
}
add_filter('wp_list_pages', 'blackbird_nav_menu_items');
/* ----------------------------------------------------------------------------------- */
/* Breadcrumbs Plugin
/*----------------------------------------------------------------------------------- */
function blackbird_breadcrumbs() {
$delimiter = '»';
$home = __( 'Home', 'blackbird' ); // text for the 'Home' link
$before = ''; // tag before the current crumb
$after = ''; // tag after the current crumb
echo '
';
}
//* ----------------------------------------------------------------------------------- */
/* Function to call first uploaded image in functions file
/*----------------------------------------------------------------------------------- */
/**
* This function gets image width and height and
* Prints attached images from the post
*/
function blackbird_get_image($width, $height) {
$w = $width;
$h = $height;
global $post, $posts;
//This is required to set to Null
$img_source = '';
$id = '';
$permalink = get_permalink();
ob_start();
ob_end_clean();
$output = preg_match_all('//i', $post->post_content, $matches);
if (isset($matches [1] [0])) {
$img_source = $matches [1] [0];
}
if ($img_source) {
print "";
}
}
/* ----------------------------------------------------------------------------------- */
/* Attachment Page Design
/*----------------------------------------------------------------------------------- */
//For Attachment Page
/**
* Prints HTML with meta information for the current post (category, tags and permalink).
*
*/
function blackbird_posted_in() {
// Retrieves tag list of current post, separated by commas.
$tag_list = get_the_tag_list('', ', ');
if ($tag_list) {
$posted_in = __('This entry was posted in %1$s and tagged %2$s. Bookmark the permalink.', 'blackbird');
} elseif (is_object_in_taxonomy(get_post_type(), 'category')) {
$posted_in = __('This entry was posted in %1$s. Bookmark the permalink.', 'blackbird');
} else {
$posted_in = __('Bookmark the permalink.', 'blackbird');
}
// Prints the string, replacing the placeholders.
printf(
$posted_in, get_the_category_list(', '), $tag_list, get_permalink(), the_title_attribute('echo=0')
);
}
?>
__('Primary Widget Area', 'blackbird'),
'id' => 'primary-widget-area',
'description' => __('The primary widget area', 'blackbird'),
'before_widget' => '
',
'after_widget' => '
',
'before_title' => '
',
'after_title' => '
',
));
// Area 2, located below the Primary Widget Area in the sidebar. Empty by default.
register_sidebar(array(
'name' => __('Secondary Widget Area', 'blackbird'),
'id' => 'secondary-widget-area',
'description' => __('The secondary widget area', 'blackbird'),
'before_widget' => '
',
'after_widget' => '
',
'before_title' => '
',
'after_title' => '
',
));
// Area 3, located in the footer. Empty by default.
register_sidebar(array(
'name' => __('First Footer Widget Area', 'blackbird'),
'id' => 'first-footer-widget-area',
'description' => __('The first footer widget area', 'blackbird'),
'before_widget' => '',
'after_widget' => '',
'before_title' => '
',
'after_title' => '
',
));
// Area 4, located in the footer. Empty by default.
register_sidebar(array(
'name' => __('Second Footer Widget Area', 'blackbird'),
'id' => 'second-footer-widget-area',
'description' => __('The second footer widget area', 'blackbird'),
'before_widget' => '',
'after_widget' => '',
'before_title' => '
',
'after_title' => '
',
));
// Area 5, located in the footer. Empty by default.
register_sidebar(array(
'name' => __('Third Footer Widget Area', 'blackbird'),
'id' => 'third-footer-widget-area',
'description' => __('The third footer widget area', 'blackbird'),
'before_widget' => '',
'after_widget' => '',
'before_title' => '
',
'after_title' => '
',
));
}
/** Register sidebars by running blackbird_widgets_init() on the widgets_init hook. */
add_action('widgets_init', 'blackbird_widgets_init');
?>
max_num_pages;
if (!$pages) {
$pages = 1;
}
}
if (1 != $pages) {
echo "