isMobile(); $bwt_kiss_options = bwt_kiss_get_options(); if ($bwt_kiss_is_smartphone) add_filter('stylesheet_uri','bwt_kiss_stylesheet_uri'); require(dirname(__FILE__) . '/inc/define.php'); load_theme_textdomain('bwt_kiss',get_template_directory() . '/languages'); $locale = get_locale(); $locale_file = get_template_directory() . "/languages/$locale.php"; if (is_readable($locale_file)) require_once($locale_file); add_editor_style(); register_nav_menu('primary',__('Primary Menu','bwt_kiss')); add_theme_support('automatic-feed-links'); add_theme_support('post-formats',array('gallery'/*,'aside','link','status','quote','image'*/)); add_theme_support('post-thumbnails'); set_post_thumbnail_size(BWT_KISS_THUMBNAIL_WIDTH,BWT_KISS_THUMBNAIL_HEIGHT,true); add_image_size('pic-large',BWT_KISS_IMAGE_LARGE_WIDTH ,BWT_KISS_IMAGE_LARGE_HEIGHT ,true); add_image_size('pic-large',BWT_KISS_IMAGE_MEDIUM_WIDTH,BWT_KISS_IMAGE_MEDIUM_HEIGHT,true); add_image_size('pic-small',BWT_KISS_IMAGE_SMALL_WIDTH ,BWT_KISS_IMAGE_SMALL_HEIGHT ); add_image_size('pic-icon' ,BWT_KISS_IMAGE_ICON_WIDTH ,BWT_KISS_IMAGE_ICON_HEIGHT ); // Mobile thumbnails. add_theme_support('custom-header',array('random-default' => true)); if (is_admin()) require_once(get_template_directory() . '/options/btw_kiss_admin.php'); } require(dirname(__FILE__) . '/inc/option_styles.php'); require(dirname(__FILE__) . '/inc/widget_post.php' ); function bwt_kiss_get_options() { include get_template_directory() . '/options/init_fields.php'; $bwt_options = array(); foreach ($options as $option) { if (($option['type'] == 'open') || ($option['type'] == 'close') || ($option['type'] == 'displayonly')) continue; $optval = get_option($option['id']); if ($optval === false) $bwt_options[$option['id']] = $option['std']; else $bwt_options[$option['id']] = $optval; } return $bwt_options; } function bwt_kiss_stylesheet_uri() { $stylesheet_dir_uri = get_stylesheet_directory_uri(); $stylesheet_uri = $stylesheet_dir_uri . "/style_mobile.css"; return $stylesheet_uri; } function bwt_kiss_admin_header_image() { ?>

onclick="return false;" href="">

>
' . __('Continue reading ','bwt_kiss') . ''; } function bwt_kiss_auto_excerpt_more($more) { return ' …' . bwt_kiss_continue_reading_link(); } function bwt_kiss_custom_excerpt_more($output) { if (has_excerpt() && !is_attachment()) { $output .= bwt_kiss_continue_reading_link(); } return $output; } add_filter('excerpt_length' ,'bwt_kiss_excerpt_length' ); add_filter('excerpt_more' ,'bwt_kiss_auto_excerpt_more' ); add_filter('get_the_excerpt','bwt_kiss_custom_excerpt_more'); // // Excerpt End // //----------------------------------------------------------------------------------------------------------------------------- function bwt_kiss_page_menu_args($args) { $args['show_home'] = true; return $args; } add_filter('wp_page_menu_args','bwt_kiss_page_menu_args'); function bwt_kiss_content_nav( $nav_id ) { global $wp_query; if ($wp_query->max_num_pages > 1) { ?> ]*?href=[\'"](.+?)[\'"]/is',get_the_content(),$matches)) return false; return esc_url_raw($matches[1]); } //----------------------------------------------------------------------------------------------------------------------------- // // Sidebars Begin // function bwt_kiss_register_sidebar($id,$name,$desc = '') { register_sidebar(array('id' => $id // Sidebar id - Must be all in lowercase, with no spaces. ,'name' => $name // Sidebar name. ,'description' => $desc // Text description of what/where the sidebar is. Shown(?) on widget management screen. ,'before_widget' => '' // HTML to place after every widget. ,'before_title' => '

' // HTML to place before every title. ,'after_title' => '

' // HTML to place after every title. )); } function bwt_kiss_widgets_init() { bwt_kiss_register_sidebar('sidebar-left' ,__('Left Sidebar' ,'bwt_kiss')); bwt_kiss_register_sidebar('sidebar-right' ,__('Right Sidebar' ,'bwt_kiss')); bwt_kiss_register_sidebar('sidebar-footer-one' ,__('Footer Area One' ,'bwt_kiss')); bwt_kiss_register_sidebar('sidebar-footer-two' ,__('Footer Area Two' ,'bwt_kiss')); bwt_kiss_register_sidebar('sidebar-footer-three',__('Footer Area Three','bwt_kiss')); bwt_kiss_register_sidebar('sidebar-footer-four' ,__('Footer Area Four' ,'bwt_kiss')); register_widget('bwt_kiss_widget_post'); } add_action('widgets_init','bwt_kiss_widgets_init'); // // Sidebars End // //----------------------------------------------------------------------------------------------------------------------------- function bwt_kiss_comment($comment,$args,$depth) { $GLOBALS['comment'] = $comment; switch ($comment->comment_type) : case 'pingback': case 'trackback': ?>
  • ',''); ?>

  • id="li-comment-">
    comment_parent) $avatar_size = 39; echo get_avatar($comment,$avatar_size); /* translators: 1: comment author, 2: date and time */ printf( __( '%1$s on %2$s said:', 'bwt_kiss' ), sprintf( '%s', get_comment_author_link() ), sprintf( '', esc_url( get_comment_link( $comment->comment_ID ) ), get_comment_time( 'c' ), /* translators: 1: date, 2: time */ sprintf( __( '%1$s at %2$s', 'bwt_kiss' ), get_comment_date(), get_comment_time() ) ) ); ?> ', '' ); ?>
    comment_approved == '0' ) : ?>
    __('Reply ','bwt_kiss'),'depth' => $depth,'max_depth' => $args['max_depth']))); ?>
    Posted on ' . '' . ' by ' . '' . '' ,'bwt_kiss'), esc_url (get_permalink()), esc_attr(get_the_time()), esc_attr(get_the_date('c')), esc_html(get_the_date()), esc_url (get_author_posts_url(get_the_author_meta('ID'))), sprintf (esc_attr__('View all posts by %s','bwt_kiss'),get_the_author()), esc_html(get_the_author()) ); } function bwt_kiss_body_classes($classes) { if (!is_multi_author()) { $classes[] = 'single-author'; } if (is_singular() && !is_home() && !is_page_template('showcase.php') && !is_page_template('sidebar-page.php')) { $classes[] = 'singular'; } return $classes; } add_filter('body_class','bwt_kiss_body_classes'); function bwt_kiss_credits() { $data = get_theme_data(get_template_directory() . '/style.css'); echo 'WordPress theme: ' . '' . $data['Name'] . ''; } function bwt_kiss_is_smartphone() { global $bwt_kiss_is_smartphone; return $bwt_kiss_is_smartphone; }