%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /var/www/html/friendstravel.al/wp-content/themes/friendstravel/woocommerce/
Upload File :
Create Path :
Current File : /var/www/html/friendstravel.al/wp-content/themes/friendstravel/woocommerce/woocommerce.php

<?php
// Remove each style one by one
add_filter( 'woocommerce_enqueue_styles', 'jk_dequeue_styles' );
function jk_dequeue_styles( $enqueue_styles ) {
	unset( $enqueue_styles['woocommerce-smallscreen'] );    // Remove the smallscreen optimisation
	unset( $enqueue_styles['woocommerce-layout'] );        // Remove the layout
	return $enqueue_styles;
}

// remove woocommerce_breadcrumb
remove_action( 'woocommerce_before_main_content', 'woocommerce_breadcrumb', 20, 0 );
remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_product_link_close', 5 );
add_action( 'woocommerce_before_shop_loop_item_title', 'woocommerce_template_loop_product_link_close', 30 );

add_action( 'woocommerce_after_shop_loop_item_title', 'add_product_description', 30 );
function add_product_description() {
	echo '<div class="description">';
	the_excerpt();
	echo '</div>';
}

remove_action( 'woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_price', 10 );
remove_action( 'woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_rating', 5 );
add_action( 'woocommerce_before_shop_loop_item_title_price', 'woocommerce_template_loop_price', 20 );

remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_rating', 5 );


/**
 * Breadcrumb
 *
 * @param $defaults
 *
 * @return mixed
 */
add_filter( 'woocommerce_breadcrumb_defaults', 'travelwp_change_breadcrumb_delimiter' );
function travelwp_change_breadcrumb_delimiter( $defaults ) {
	$defaults['delimiter'] = '';

	return $defaults;
}

add_action( 'tour_booking_single_share', 'tour_booking_single_share', 5 );

if ( !function_exists( 'tour_booking_single_share' ) ) {
	function tour_booking_single_share() {
		global $travelwp_theme_options;
		$html = '<div class="tour-share">';
		$html .= '<ul class="share-social">';
		if ( isset( $travelwp_theme_options['social-sortable']['sharing_facebook'] ) && $travelwp_theme_options['social-sortable']['sharing_facebook'] == '1' ) {
			$html .= '<li><a target="_blank" class="facebook" href="https://www.facebook.com/sharer/sharer.php?u=' . urlencode( get_permalink() ) . '" onclick=\'javascript:window.open(this.href, "", "menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600");return false;\'><i class="fa fa-facebook"></i></a></li>';
		}
		if ( isset( $travelwp_theme_options['social-sortable']['sharing_twitter'] ) && $travelwp_theme_options['social-sortable']['sharing_twitter'] == 1 ) {
			$html .= '<li><a target="_blank" class="twitter" href="https://twitter.com/share?url=' . urlencode( get_permalink() ) . '&amp;text=' . esc_attr( get_the_title() ) . '" onclick=\'javascript:window.open(this.href, "", "menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600");return false;\'><i class="fa fa-twitter"></i></a></li>';
		}
		if ( isset( $travelwp_theme_options['social-sortable']['sharing_pinterset'] ) && $travelwp_theme_options['social-sortable']['sharing_pinterset'] == 1 ) {
			$html .= '<li><a target="_blank" class="pinterest" href="http://pinterest.com/pin/create/button/?url=' . urlencode( get_permalink() ) . '&amp;description=' . get_the_excerpt() . '&media=' . urlencode( wp_get_attachment_url( get_post_thumbnail_id() ) ) . '" onclick=\'javascript:window.open(this.href, "", "menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600");return false;\'><i class="fa fa-pinterest"></i></a></li>';
		}
		if ( isset( $travelwp_theme_options['social-sortable']['sharing_google'] ) && $travelwp_theme_options['social-sortable']['sharing_google'] == 1 ) {
			$html .= '<li><a target="_blank" class="googleplus" href="https://plus.google.com/share?url=' . urlencode( get_permalink() ) . '" onclick=\'javascript:window.open(this.href, "", "menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600");return false;\'><i class="fa fa-google"></i></a></li>';
		}
		$html .= '</ul>';
		$html .= '</div>';
		printf( '%s', $html );
	}
}
// hidden related product
if ( travelwp_get_option( 'phys_woo_single_related_product' ) == 1 ) {
	remove_action( 'woocommerce_after_single_product_summary', 'woocommerce_output_related_products', 20 );
}

Zerion Mini Shell 1.0