<?php
/**
 * @version    $Id$
 * @package    IT_Sample_Theme
 * @author     InnoThemes Team <support@innothemes.com>
 * @copyright  Copyright (C) 2012 InnoThemes.com. All Rights Reserved.
 * @license    GNU/GPL v2 or later http://www.gnu.org/licenses/gpl-2.0.html
 *
 * Websites: http://www.innothemes.com
 */

// Define theme details
add_filter( 'it_theme_defines', 'it_theme_air_defines' );

function it_theme_air_defines( $definition ) {
	return array_merge(
		$definition,
		array(
			'theme_name'       => 'IT Air',
			'theme_id'         => 'it-air',
			'theme_textdomain' => 'it-air',
		)
	);
}

// Register additional sidebar
add_filter( 'it_theme_sidebar_register', 'it_air_sidebar_register' );

function it_air_sidebar_register( $sidebars ) {
	$sidebars[] = array(
		'id'            => 'right-home',
		'name'          => __( 'Right Home', IT_THEME_TEXTDOMAIN ),
		'description'   => __( 'This sidebar displays only in homepage', IT_THEME_TEXTDOMAIN ),
		'before_widget' => '<div id="%1$s" class="widget %2$s">',
		'after_widget'  => '</div>',
		'before_title'  => '<h3 class="widget-title">',
		'after_title'   => '</h3>',
	);

	return $sidebars;
}

// Allow shortcode in text widget
add_filter( 'widget_text', 'do_shortcode' );

// Remove dummy code from comment form
add_action( 'after_setup_theme', 'it_air_remove_code' );

function it_air_remove_code() {
	add_filter( 'comment_form_defaults', 'it_air_comments_form_defaults' );
}

function it_air_comments_form_defaults( $default ) {
	unset( $default[ 'comment_notes_after' ] );

	return $default;
}

// Register image size for thumbnails
add_image_size( 'homethumb', 160, 160, TRUE );
add_image_size( 'blogthumb', 100, 100, TRUE );
add_image_size( 'portthumb', 190, 160, TRUE );

// Define maximum allowed width for content
$content_width = 700;

// Initialize theme
include_once dirname( __FILE__ ) . '/libraries/init.php';
