'000',
'flex-height' => true,
);
set_post_thumbnail_size( 150, 150, true );
add_image_size( 'large-feature', 600, 480, true );
add_image_size( 'small-feature', 500, 300 );
if ( ! isset( $content_width ) ) $content_width = 900;
}
endif;
add_action( 'after_setup_theme', 'kasa_setup' );
if ( ! function_exists( 'kasa_of_register_js' ) ) :
function kasa_of_register_js() {
if (!is_admin()) {
wp_enqueue_script('main', get_template_directory_uri() . '/js/main.js', array('jquery'),'1.0', true);
}
if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
wp_enqueue_script( 'comment-reply' );
}
}
endif;
add_action('wp_enqueue_scripts', 'kasa_of_register_js');
if ( ! function_exists( 'kasa_widgets_init' ) ) :
function kasa_widgets_init() {
register_sidebar(array(
'name' => __( 'Sidebar Widget Area', "kasa"),
'id' => 'sidebar-widget-area',
'description' => __( 'The sidebar widget area', "kasa"),
'before_widget' => '',
'before_title' => '
',
));
register_sidebar(array(
'name' => __( 'Footer Widget Area 1', "kasa"),
'id' => 'footer-widget-area-1',
'description' => __( 'The footer widget area 1', "kasa"),
'before_widget' => '',
'before_title' => ''
));
register_sidebar(array(
'name' => __( 'Footer Widget Area 2', "kasa"),
'id' => 'footer-widget-area-2',
'description' => __( 'The footer widget area 2', "kasa"),
'before_widget' => '',
'before_title' => ''
));
register_sidebar(array(
'name' => __( 'Footer Widget Area 3', "kasa"),
'id' => 'footer-widget-area-3',
'description' => __( 'The footer widget area 3', "kasa"),
'before_widget' => '',
'before_title' => ''
));
register_sidebar(array(
'name' => __( 'Footer Widget Area 4', "kasa"),
'id' => 'footer-widget-area-4',
'description' => __( 'The footer widget area 4', "kasa"),
'before_widget' => '',
'before_title' => ''
));
}
endif;
add_action( 'widgets_init', 'kasa_widgets_init' );
if ( ! function_exists( 'kasa_head_css' ) ) :
function kasa_head_css() {
$meta = '';
$output = '';
$options_styles = '';
$options_styles_import = '';
$script_head = '';
$fav_icon = of_get_option('fav_icon');
if ($fav_icon <> '') {
$meta .= "\n";
}
$web_clip = of_get_option('web_clip');
if ($web_clip <> '') {
$meta .= "\n";
}
$custom_css = of_get_option('custom_css_styles');
if ($custom_css <> '') {
$output .= $custom_css . "\n";
}
if ($meta <> '') {
echo $meta;
}
if ($output <> '') {
$output = "\n\n";
echo $output;
}
if($options_styles_import){
echo $options_styles_import;
}
if($options_styles){
echo '';
}
if ($script_head <> '') {
$script_head = "\n\n";
echo $script_head;
}
}
endif;
add_action('wp_head', 'kasa_head_css');
if ( ! function_exists( 'kasa_get_list_posts' ) ) :
function kasa_get_list_posts() {
global $wp_query;
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
$args = array(
'post_type' => 'post',
'orderby' => 'date',
'order' => 'DESC',
'paged' => $paged
);
$wp_query->query( $args );
return new WP_Query( $args );
}
endif;
if ( ! function_exists( 'kasa_paginate_page' ) ) :
function kasa_paginate_page() {
wp_link_pages( array( 'before' => '', 'link_before' => '','link_after' => '' ) );
}
endif;
if ( ! function_exists( 'kasa_credits' ) ) :
function kasa_credits() {
$text = 'Theme created by PWT. Powered by WordPress.org';
echo apply_filters( 'kasa_credits_text', $text );
}
endif;
add_action( 'kasa_display_credits', 'kasa_credits' );
?>