'blackline-logo-size' ) ); register_nav_menu( 'primary', __( 'Navigation Menu', 'blackline' ) ); load_theme_textdomain( 'blackline', get_template_directory() . '/languages' ); } function blackline_widgets() { register_sidebar( array( 'name' => __( 'sidebar-left', 'blackline' ), 'id' => 'sidebar-left', ) ); register_sidebar( array( 'name' => __( 'sidebar-head', 'blackline' ), 'id' => 'sidebar-head', ) ); register_sidebar( array( 'name' => __( 'sidebar-footer1', 'blackline' ), 'id' => 'sidebar-footer1', ) ); register_sidebar( array( 'name' => __( 'sidebar-footer2', 'blackline' ), 'id' => 'sidebar-footer2', ) ); register_sidebar( array( 'name' => __( 'sidebar-footer3', 'blackline' ), 'id' => 'sidebar-footer3', ) ); } add_action( 'widgets_init', 'blackline_widgets' ); add_filter('loop_shop_per_page', create_function('$cols', 'return 12;')); add_filter('loop_shop_columns', 'blackline_loop_columns'); if (!function_exists('blackline_loop_columns')) { function blackline_loop_columns() { return 3; } } if ( ! function_exists( 'woocommerce_output_related_products' ) ) { function woocommerce_output_related_products() { $args = array( 'posts_per_page' => 3, 'columns' => 3, 'orderby' => 'rand' ); woocommerce_related_products( apply_filters( 'woocommerce_output_related_products_args', $args ) ); } } function blackline_frontend() { wp_enqueue_style( 'blackline-style', get_stylesheet_uri() ); } function blackline_wp_title( $title, $sep ) { global $paged, $page; if ( is_feed() ) return $title; $title .= get_bloginfo( 'name' ); $site_description = get_bloginfo( 'description', 'display' ); if ( $site_description && ( is_home() || is_front_page() ) ) $title = "$title $sep $site_description"; if ( $paged >= 3 || $page >= 3 ) $title = "$title $sep " . sprintf( __( 'Page %s', 'blackline' ), max( $paged, $page ) ); return $title; } add_filter( 'wp_title', 'blackline_wp_title', 10, 3 ); if ( is_singular() ) wp_enqueue_script( "comment-reply" ); add_filter( 'wp_tag_cloud', 'blackline_tag_cloud' ); function blackline_tag_cloud( $tags ){ return preg_replace( "~ style='font-size: (\d+)pt;'~", ' class="tag-cloud-size-\10"', $tags ); } add_filter('add_to_cart_fragments', 'blackline_fragment'); function blackline_fragment( $fragments ) { global $woocommerce; ob_start(); ?> cart->cart_contents_count, 'blackline'), $woocommerce->cart->cart_contents_count);?> cart->get_cart_total(); ?>