'',
'logo_url'=>'',
'logo_desc'=>'',
'twitter_screen_name'=>'',
'js_code'=>'',
'404_message'=>'',
'theme_style'=>'-1',
'footer_text'=>'',
'over_style'=>'',
'box1_title'=>'',
'box2_title'=>'',
'box3_title'=>'',
'box1_link'=>'',
'box2_link'=>'',
'box3_link'=>'',
'box1_thumb'=>'',
'box2_thumb'=>'',
'box3_thumb'=>'',
'box1_hover'=>'',
'box2_hover'=>'',
'box3_hover'=>'',
'port_large_image_url'=>'',
'port_thumb_image_url'=>'',
'front_large_image_url'=>'',
'front_large_image_link'=>'',
'serv_small_image_url'=>'',
'post_thumb_image_url'=>'',
'featured_auto'=>0,
'featured_desc'=>0,
'custom_logo_check'=>0,
'disable_sort'=>0,
'tagline'=>0,
'rotate_speed'=>8000,
'slide_anim'=>300,
'fade_anim'=>200,
'thumb_post'=>'yes',
'information_box'=>'yes',
'mail_address'=>'',
'mail_subject'=>'',
'error_message'=>'',
'succes_message'=>'',
'favicon'=>0,
'contact_options'=>0,
'comments_post'=>'yes',
'comments_page'=>'yes',
'comments_thread'=>0,
'social_text'=>'Get social',
'related_posts_text'=>'Related posts',
'bar_title'=>'Latest news',
'related_posts'=>'yes',
'favicon_url'=>'',
'services_cat'=>'',
'blog_cat'=>'',
'blog1_cat'=>'',
'blog2_cat'=>'',
'index_cat'=>'',
'services_limit_posts'=>'10',
'index_limit_posts'=>'10',
'portfolio_limit_posts'=>'10',
'blog_limit_posts'=>'10',
'blog2_limit_posts'=>'10',
'blog1_limit_posts'=>'10'
);
if(!is_null($key)) return @$defaults[$key];
else return $defaults;
}
automatic_feed_links();
if(function_exists('register_sidebar'))
{
register_sidebar(array(
'name'=>'Sidebar',
'before_widget' => '
',
'after_widget' => '
',
'before_title' => '',
'after_title' => '
',
));
register_sidebar(array(
'name'=>'Services Sidebar',
'before_widget' => '',
'after_widget' => '
',
'before_title' => '',
'after_title' => '
',
));
register_sidebar(array(
'name'=>'Contact Sidebar',
'before_widget' => '',
'after_widget' => '
',
'before_title' => '',
'after_title' => '
',
));
register_sidebar(array(
'name'=>'Blog 2 col Sidebar',
'before_widget' => '',
'after_widget' => '
',
'before_title' => '',
'after_title' => '
',
));
register_sidebar(array(
'name'=>'Blog 3 col Sidebar Left',
'before_widget' => '',
'after_widget' => '
',
'before_title' => '',
'after_title' => '
',
));
register_sidebar(array(
'name'=>'Blog 3 col Sidebar Right',
'before_widget' => '',
'after_widget' => '
',
'before_title' => '',
'after_title' => '
',
));
}
/**
* Return an URL that can be used to load images through scale-image.php.
*
* Parameters are:
* @param string $img The URL or path of the image to load.
* @param int $w The desired width of the image.
* @param int $h The desired height of the image.
* @param bool $thumb If the image will be created as a thumbnail (it scales and crops it).
*/
function scaleImage($img, $w=null, $h=null, $thumb=false)
{
//Treat URL's diferently, don't make the path relative for them.
if(strpos($img, 'http://') === false)
{
//Create a relative path so we don't have the full server path in the url.
$pp = explode(DIRECTORY_SEPARATOR, $img);
$tp = explode(DIRECTORY_SEPARATOR, realpath(dirname(__FILE__).'/../../../'));
$pp = array_diff_assoc($pp, $tp);
$str = DIRECTORY_SEPARATOR.implode(DIRECTORY_SEPARATOR, $pp);
}
else
{
$str = $img;
}
return get_bloginfo('template_url').'/scale-image.php?src='.urlencode($str)."&w={$w}&h={$h}".($thumb?'&t=1':'');
}
/**
* Breadcrumb
*/
function get_breadcrumbs()
{
global $wp_query;
if ( !is_home() ){
// Start the DIV
echo '';
// Start the DIV
echo '';
// Start the UL
echo '
';
// Add the Home link
echo '- '. get_bloginfo('name') .'
';
if ( is_category() )
{
$catTitle = single_cat_title( "", false );
$cat = get_cat_ID( $catTitle );
echo "- » ". get_category_parents( $cat, TRUE, " » " ) ."
";
}
elseif ( is_archive() && !is_category() )
{
echo "- » Archives
";
}
elseif ( is_search() ) {
echo "- » Search Results
";
}
elseif ( is_404() )
{
echo "- » 404 Not Found
";
}
elseif ( is_single() )
{
$category = get_the_category();
$category_id = get_cat_ID( $category[0]->cat_name );
echo '- » '. get_category_parents( $category_id, TRUE, " » " );
echo the_title('','', FALSE) ."
";
}
elseif ( is_page() )
{
$post = $wp_query->get_queried_object();
if ( $post->post_parent == 0 ){
echo "- » ".the_title('','', FALSE)."
";
} else {
$title = the_title('','', FALSE);
$ancestors = array_reverse( get_post_ancestors( $post->ID ) );
array_push($ancestors, $post->ID);
foreach ( $ancestors as $ancestor ){
if( $ancestor != end($ancestors) ){
echo '- » '. strip_tags( apply_filters( 'single_post_title', get_the_title( $ancestor ) ) ) .'
';
} else {
echo '- » '. strip_tags( apply_filters( 'single_post_title', get_the_title( $ancestor ) ) ) .'
';
}
}
}
}
// End the UL
echo "
";
// End the DIV
echo '
';
}
}
/**
* Callback for comment formating.
*/
function com_format_comment($comment, $args, $depth)
{
$GLOBALS['comment'] = $comment;
$args['depth'] = $depth;
$nsize = 48;
$ssize = 24;
$post = get_post($comment->comment_post_ID);
$comment_author = $comment->user_id;
$post_author = $post->post_author;
$author_comment = $comment_author == $post_author;
$holder_extra_class = $author_comment?'author-comment':'';
switch($depth)
{
case 1:
?>
comment_ID, $comment->comment_post_ID); ?>