true, 'flex-width' => true, 'height' => HEADER_IMAGE_HEIGHT, 'width' => HEADER_IMAGE_WIDTH, ); add_theme_support( 'custom-header', $custom_header_args ); } endif; add_action( 'after_setup_theme', 'blaskan_setup' ); /** * Setup widths */ if ( ! function_exists( 'blaskan_setup_widths' ) ): function blaskan_setup_widths() { if ( BLASKAN_SIDEBARS == 'one_sidebar') { set_post_thumbnail_size( 830, 9999, true ); if ( ! isset( $content_width ) ) $content_width = 830; } else { set_post_thumbnail_size( 540, 9999, true ); if ( ! isset( $content_width ) ) $content_width = 540; } if ( ( is_active_sidebar( 'primary-sidebar' ) && is_active_sidebar( 'secondary-sidebar' ) ) || ( is_active_sidebar( 'primary-page-sidebar' ) && is_active_sidebar( 'secondary-page-sidebar' ) ) || ( BLASKAN_SIDEBARS == 'one_sidebar' && ( is_active_sidebar( 'primary-sidebar' ) || is_active_sidebar( 'primary-page-sidebar' ) ) ) ) { define( 'HEADER_IMAGE_WIDTH', 1120 ); } elseif ( ( is_active_sidebar( 'primary-sidebar' ) || is_active_sidebar( 'secondary-sidebar' ) ) || ( is_active_sidebar( 'primary-page-sidebar' ) || is_active_sidebar( 'secondary-page-sidebar' ) ) || ( BLASKAN_SIDEBARS == 'one_sidebar' && ( !is_active_sidebar( 'primary-sidebar' ) || !is_active_sidebar( 'primary-page-sidebar' ) ) ) ) { define( 'HEADER_IMAGE_WIDTH', 830 ); } else { define( 'HEADER_IMAGE_WIDTH', 540 ); } } endif; add_action( 'after_setup_theme', 'blaskan_setup_widths', 0 ); /** * Register menus */ if ( ! function_exists( 'blaskan_register_nav_menus' ) ): function blaskan_register_nav_menus() { register_nav_menus( array( 'primary' => __( 'Primary Navigation', 'blaskan' ), 'footer' => __( 'Footer Navigation', 'blaskan' ), ) ); } endif; add_action( 'after_setup_theme', 'blaskan_register_nav_menus' ); /** * JS init */ if ( ! function_exists( 'blaskan_js_init' ) ): function blaskan_js_init() { if ( !is_admin() ) { wp_enqueue_script( 'modernizr', get_template_directory_uri() . '/js/libs/modernizr.min.js' ); wp_enqueue_script( 'jquery' ); wp_enqueue_script( 'jquery-fitvids', get_template_directory_uri() . '/js/libs/jquery.fitvids.js' ); wp_enqueue_script( 'mobile-boilerplate-helper', get_template_directory_uri() . '/js/mylibs/helper.js' ); wp_enqueue_script( 'blaskan', get_template_directory_uri() . '/js/script.js' ); wp_localize_script( 'blaskan', 'objectL10n', array( 'blaskan_navigation_title' => __( '- Navigation -', 'blaskan' ) ) ); } } endif; add_action( 'init', 'blaskan_js_init' ); /** * Load League Gothic typeface */ if ( ! function_exists( 'blaskan_font_face' ) ): function blaskan_font_face() { if ( BLASKAN_TYPEFACE_TITLE == 'default' ) { echo " "; } } endif; add_action( 'wp_head', 'blaskan_font_face', 1 ); /** * CSS init */ if ( ! function_exists( 'blaskan_css_init' ) ): function blaskan_css_init() { if ( !is_admin() && !in_array( $GLOBALS['pagenow'], array( 'wp-login.php', 'wp-signup.php', 'wp-register.php' ) ) ) { wp_enqueue_style( 'blaskan-framework', get_template_directory_uri() . '/framework.css', array(), false, 'screen' ); wp_enqueue_style( 'blaskan-style', get_bloginfo('stylesheet_url'), array(), false, 'screen' ); } } endif; add_action( 'init', 'blaskan_css_init' ); /** * Register widget areas. All are empty by default. */ if ( ! function_exists( 'blaskan_widgets_init' ) ): function blaskan_widgets_init() { // Primary sidebar register_sidebar( array( 'name' => __( 'Primary Widget Area', 'blaskan' ), 'id' => 'primary-sidebar', 'description' => __( 'The primary sidebar', 'blaskan' ), 'before_widget' => '', 'before_title' => '
)", "", $content ); } add_filter( 'the_content', 'blaskan_remove_empty_read_more_span' ); /** * Remove more jump link * Credits: http://codex.wordpress.org/Customizing_the_Read_More#Link_Jumps_to_More_or_Top_of_Page */ function blaskan_remove_more_jump_link($link) { $offset = strpos($link, '#more-'); if ($offset) { $end = strpos($link, '"',$offset); } if ($end) { $link = substr_replace($link, '', $offset, $end-$offset); } return $link; } add_filter('the_content_more_link', 'blaskan_remove_more_jump_link'); /** * Use