esc_html__('Blog Sidebar','business-one'), 'id' => 'blog-sidebar', 'description' => 'Located blog pages', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

' )); register_sidebar(array( 'name' => esc_html__('Shop Home Sidebar','business-one'), 'id' => 'shop-sidebar', 'description' => 'Located shop archive pages', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

' )); register_sidebar(array( 'name' => esc_html__('Footer Column 1','business-one'), 'id' => 'footer-1', 'description' => 'Footer Widget', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

' )); register_sidebar(array( 'name' => esc_html__('Footer Column 2','business-one'), 'id' => 'footer-2', 'description' => 'Footer Widget', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

' )); register_sidebar(array( 'name' => esc_html__('Footer Column 3','business-one'), 'id' => 'footer-3', 'description' => 'Footer Widget', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

' )); register_sidebar(array( 'name' => esc_html__('Footer Column 4','business-one'), 'id' => 'footer-4', 'description' => 'Footer Widget', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

' )); if(class_exists('businessone_WC_Widget_Cart')){ register_widget( 'businessone_WC_Widget_Cart' ); } } add_action('widgets_init','businessone_blog_widgets'); function businessone_set_widget_tags($args) { $args = array('smallest'=> 11, 'largest'=> 11); return $args; } add_filter('widget_tag_cloud_args','businessone_set_widget_tags'); function businessone_pagenavi(){ global $wp_query; $big = 999999999; echo paginate_links( array( 'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ), 'format' => '?paged=%#%', 'current' => max( 1, get_query_var('paged') ), 'total' => $wp_query->max_num_pages, 'prev_next' => true, 'prev_text' => '', 'next_text' => '' ) ); } function businessone_gallery_pagenavi(){ $gallery=new WP_Query(array( 'post_type' => 'gallery' )); global $gallery; $big = 999999999; echo paginate_links( array( 'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ), 'format' => '?paged=%#%', 'current' => max( 1, get_query_var('paged') ), 'total' => $gallery->max_num_pages, 'prev_next' => true, 'prev_text' => '', 'next_text' => '' ) ); } function businessone_excerpt_length( $length ) { return 110; } add_filter( 'excerpt_length', 'businessone_excerpt_length'); function businessone_excerpt_more($more) { return ' [...]'; } add_filter( 'excerpt_more', 'businessone_excerpt_more' ); add_filter( 'woocommerce_enqueue_styles', '__return_false' ); function businessone_override_checkout_fields( $fields ) { $fields['billing']['billing_first_name'] = array( 'label' => esc_html__('First Name','business-one'), 'placeholder' => esc_html__('First Name','business-one'), 'class' => array('p-form-control'), 'required' => true ); $fields['billing']['billing_last_name'] = array( 'label' => esc_html__('Last Name','business-one'), 'placeholder' => esc_html__('Last Name','business-one'), 'class' => array('p-form-control'), 'required' => true ); $fields['billing']['billing_company'] = array( 'label' => esc_html__('Company','business-one'), 'placeholder' => esc_html__('Company','business-one'), 'class' => array('p-form-control') ); $fields['billing']['billing_address_1'] = array( 'label' => esc_html__('Address 1','business-one'), 'placeholder' => esc_html__('Address 1','business-one'), 'class' => array('p-form-control'), 'required' => true ); $fields['billing']['billing_address_2'] = array( 'label' => esc_html__('Address 2','business-one'), 'placeholder' => esc_html__('Address 2','business-one'), 'class' => array('p-form-control') ); $fields['billing']['billing_city'] = array( 'label' => esc_html__('City','business-one'), 'placeholder' => esc_html__('City','business-one'), 'class' => array('p-form-control'), 'required' => true ); $fields['billing']['billing_country'] = array( 'label' => esc_html__('Country','business-one'), 'placeholder' => esc_html__('Country','business-one'), 'class' => array('p-form-control'), 'required' => true ); $fields['billing']['billing_email'] = array( 'label' => esc_html__('Email','business-one'), 'placeholder' => esc_html__('Email','business-one'), 'class' => array('p-form-control'), 'required' => true ); $fields['billing']['billing_phone'] = array( 'label' => esc_html__('Phone','business-one'), 'placeholder' => esc_html__('Phone','business-one'), 'class' => array('p-form-control') ); $fields['billing']['billing_postcode'] = array( 'label' => esc_html__('ZIP','business-one'), 'placeholder' => esc_html__('ZIP','business-one'), 'class' => array('p-form-control') ); $fields['order']['order_comments'] = array( 'label' => esc_html__('Message','business-one'), 'placeholder' => esc_html__('Your Message','business-one'), 'class' => array('p-form-control') ); return $fields; } add_filter( 'woocommerce_checkout_fields' , 'businessone_override_checkout_fields' ); if(class_exists('WC_Widget')){ class businessone_WC_Widget_Cart extends WC_Widget { public function widget( $args, $instance ) { extract( $args ); $title = apply_filters('widget_title', empty( $instance['title'] ) ? esc_html__( 'Cart', 'business-one' ) : $instance['title'], $instance, $this->id_base ); $hide_if_empty = empty( $instance['hide_if_empty'] ) ? 0 : 1; echo $before_widget; if ( $title ) if ( $hide_if_empty ) echo '
'; echo '
'; if ( $hide_if_empty ) echo '
'; echo $after_widget; } } }