'; } } else { esc_html_e( 'billiard', 'billiard' ); } } /* * Get site footer. */ function billiard_footer() { $billiard = billiard_site_options(); if( has_nav_menu( 'footer-menu' ) || ! empty( $billiard['footer_copyright'] ) || !class_exists('CSFramework') ) { $footer_style = ( ! empty( $billiard['footer_style'] ) ) ? $billiard['footer_style'] : ''; $output = ''; echo wp_kses_post( $output ); } } /** * * Helper Functions * @since 1.0.0 * @version 1.0.0 * */ if ( ! function_exists( 'billiard_site_options' ) ) { function billiard_site_options() { if( function_exists( 'cs_framework_init' ) ) { $options = apply_filters( 'cs_get_option', get_option( CS_OPTION ) ); return $options; } else { return false; } } } function billiard_wp_link_pages() { get_post_format(); } /** * * Create custom html structure for comments * */ function billiard_comment( $comment, $args, $depth ) { $GLOBALS['comment'] = $comment; $reply_class = ( $comment->comment_parent ) ? 'indented' : ''; switch ( $comment->comment_type ): case 'pingback': case 'trackback': ?>
', '' ); ?>
  • id="li-comment-">
    esc_html__( 'Reply', 'billiard' ), 'after' => '', 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>
    'category', 'portfolio' => 'portfolio-category' ); $categories = get_terms( $cats[$post_type] ); $list = array(); if( ! empty( $categories ) ) { foreach ( $categories as $category ) { $list[$category->name] = $category->slug; } } return $list; } /* * Change exerpt end. */ function billiard_excerpt_more( $more ) { return '...'; } add_filter('excerpt_more', 'billiard_excerpt_more'); // Remove role attribute from search form. function billiard_valid_search_form ($form) { return str_replace('role="search" ', '', $form); } add_filter('get_search_form', 'billiard_valid_search_form'); // Add custom class for body tag function billiard_custom_body_class( $classes ) { $billiard = billiard_site_options(); if( ! isset( $billiard['preloader'] ) || $billiard['preloader'] ) { $classes[] = 'animsition'; } if( ! class_exists('Billiard_Plugins') ) { $classes[] .= ' no-billiard-plugins'; } return $classes; } add_filter( 'body_class', 'billiard_custom_body_class' ); /* * * Post input form * @since 1.0.0 * @version 1.0.0 * **/ if ( ! function_exists( 'billiard_reorder_comment_fields' ) ) { function billiard_reorder_comment_fields( $fields ){ $new_fields = array(); $myorder = array('author','email'); foreach( $myorder as $key ){ $new_fields[ $key ] = $fields[ $key ]; unset( $fields[ $key ] ); } if( $fields ) foreach( $fields as $key => $val ) $new_fields[ $key ] = $val; return $new_fields; } add_filter('comment_form_fields', 'billiard_reorder_comment_fields' ); } if ( ! function_exists( 'billiard_mini_cart' ) ) { function billiard_mini_cart() { if ( ! WC()->cart->is_empty() ) : ?>

    : cart->get_cart_subtotal(); ?>

    cart->get_cart_contents_count(); ?>