'widget-area-left',
'id' => 'widget-area-left',
'description' => 'Widget Area for left sidebar',
'before_widget' => '
',
'after_widget' => '
',
'before_title' => '',
'after_title' => '
',
) );
register_sidebar( array (
'name' => 'widget-area-right',
'id' => 'widget-area-right',
'description' => 'Widget Area for right sidebar',
'before_widget' => '',
'after_widget' => '
',
'before_title' => '',
'after_title' => '
',
) );
}
}
//////////////////////////////////////////
// SinglePage Comment callback
function BirdTIPS_custom_comments( $comment, $args, $depth ) {
$GLOBALS['comment'] = $comment;
?>
id="li-comment-">
comment_type || 'trackback' == $comment->comment_type):
$url = get_comment_author_url();
$author = get_comment_author();
?>
comment_approved == '0' ) : ?>
$depth, 'max_depth' => $args['max_depth'] ) ) ); ?>
" conform WORDPRESS
}
//////////////////////////////////////////////////////
// Pagenation
function BirdTIPS_the_pagenation() {
global $wp_rewrite;
global $wp_query;
global $paged;
$paginate_base = get_pagenum_link(1);
if (strpos($paginate_base, '?') || ! $wp_rewrite->using_permalinks()) {
$paginate_format = '';
$paginate_base = add_query_arg('paged', '%#%');
} else {
$paginate_format = (substr($paginate_base, -1 ,1) == '/' ? '' : '/') .
user_trailingslashit('page/%#%/', 'paged');;
$paginate_base .= '%_%';
}
echo paginate_links( array(
'base' => $paginate_base,
'format' => $paginate_format,
'total' => $wp_query->max_num_pages,
'mid_size' => 3,
'current' => ($paged ? $paged : 1),
));
}
//////////////////////////////////////////////////////
// Search form
function BirdTIPS_search_form( $form ) {
$search_string = '';
if(is_search()){
$search_string = get_search_query();
}
$form = '';
return $form;
}
//////////////////////////////////////////
// Topic Path
function BirdTIPS_the_pankuzu_category() {
if(is_single()){
foreach((get_the_category()) as $cat) {
$html = '' .$cat->cat_name .'';
echo $html;
break;
}
}
elseif(is_archive()){
BirdTIPS_the_archivetitle();
}
}
//////////////////////////////////////////
// Archive PageTitle
function BirdTIPS_the_archivetitle() {
if(is_category()) {
printf(__('Archive for the ‘%s’ Category', 'BirdTIPS'), single_cat_title('', false));
}
elseif( is_tag() ) {
printf(__('Posts Tagged ‘%s’', 'BirdTIPS'), single_tag_title('', false) );
}
elseif (is_day()) {
printf(__('Archive for %s', 'BirdTIPS'), get_the_time(__('F jS, Y', 'BirdTIPS')));
}
elseif (is_month()) {
printf(__('Archive for %s', 'BirdTIPS'), get_the_time(__('F, Y', 'BirdTIPS')));
}
elseif (is_year()) {
printf(__('Archive for %s', 'BirdTIPS'), get_the_time(__('Y', 'BirdTIPS')));
}
elseif (is_author()) {
printf(__('Archive for %s', 'BirdTIPS'), get_query_var('author_name') );
}
elseif (isset($_GET['paged']) && !empty($_GET['paged'])) {
_e('Archives', 'BirdTIPS');
}
}
//////////////////////////////////////////////////////
// Date
function BirdTIPS_the_date() {
$html = '';
$posted = strtotime(get_post_time("Y-m-d"));
$html .= '' .date("j", $posted) .'';
$html .= '' .date("M.", $posted) .'';
$html .= '' .date("Y", $posted) .'';
echo $html;
}
//////////////////////////////////////////////////////
// Header Style
function BirdTIPS_header_style() {
?>
__( 'Primary Navigation', 'BirdTIPS' ),
) );
// This theme allows users to set a custom background
add_custom_background();
// Add a way for the custom header
define( 'HEADER_TEXTCOLOR', 'CCC' );
define( 'HEADER_IMAGE', '%s/images/headers/green.jpg' );
define( 'HEADER_IMAGE_WIDTH', apply_filters( 'my_header_image_width', 1075 ) );
define( 'HEADER_IMAGE_HEIGHT', apply_filters( 'my_header_image_height', 200 ) );
add_custom_image_header( 'BirdTIPS_header_style', 'BirdTIPS_admin_header_style' );
register_default_headers( array(
'green' => array(
'url' => '%s/images/headers/green.jpg',
'thumbnail_url' => '%s/images/headers/green-thumbnail.jpg',
'description' => 'Green'
),
'blue' => array(
'url' => '%s/images/headers/blue.jpg',
'thumbnail_url' => '%s/images/headers/blue-thumbnail.jpg',
'description' => 'Blue'
),
'yellow' => array(
'url' => '%s/images/headers/yellow.jpg',
'thumbnail_url' => '%s/images/headers/yellow-thumbnail.jpg',
'description' => 'Yellow'
),
'red' => array(
'url' => '%s/images/headers/red.jpg',
'thumbnail_url' => '%s/images/headers/red-thumbnail.jpg',
'description' => 'Red'
),
'white' => array(
'url' => '%s/images/headers/white.jpg',
'thumbnail_url' => '%s/images/headers/white-thumbnail.jpg',
'description' => 'White'
),
'orange' => array(
'url' => '%s/images/headers/orange.jpg',
'thumbnail_url' => '%s/images/headers/orange-thumbnail.jpg',
'description' => 'Orange'
),
'pink' => array(
'url' => '%s/images/headers/pink.jpg',
'thumbnail_url' => '%s/images/headers/pink-thumbnail.jpg',
'description' => 'Pink'
),
'purple' => array(
'url' => '%s/images/headers/purple.jpg',
'thumbnail_url' => '%s/images/headers/purple-thumbnail.jpg',
'description' => 'Purple'
),
) );
}
//////////////////////////////////////////////////////
// Action Hook
add_action( 'widgets_init', 'BirdTIPS_widgets_init' );
add_action( 'after_setup_theme', 'BirdTIPS_setup' );
add_filter( 'get_search_form', 'BirdTIPS_search_form' );
add_theme_support( 'automatic-feed-links' );