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() { ?>
' . __('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' => '',''); ?>