403Webshell
Server IP : 10.19.1.101  /  Your IP : 216.73.216.158
Web Server : Apache
System : Linux web1f13.kinghost.net 5.4.282-1.el8.elrepo.x86_64 #1 SMP Mon Aug 19 18:33:22 EDT 2024 x86_64
User : schererimoveisrs ( 170628)
PHP Version : 7.4.33
Disable Function : apache_child_terminate,c99_buff_prepare,c99_sess_put,dl,exec,leak,link,myshellexec,openlog,passthru,pclose,pcntl_exec,php_check_syntax,php_strip_whitespace,popen,posix_kill,posix_mkfifo,posix_setpgid,posix_setsid,posix_setuid,proc_close,proc_get_status,proc_nice,proc_open,proc_terminate,shell_exec,show_source,symlink,system,socket_listen,socket_create_listen,putenv
MySQL : ON  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/schererimoveisrs/www/wp-content/themes/sleeky/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/schererimoveisrs/www/wp-content/themes/sleeky//woocommerce-functions.php
<?php
function sleeky_remove_hooks_woocommerce() {
	remove_action( 'woocommerce_before_main_content', 'woocommerce_breadcrumb', 20 );
	remove_action( 'woocommerce_before_shop_loop', 'woocommerce_result_count', 20 );
	remove_action( 'woocommerce_before_shop_loop', 'woocommerce_catalog_ordering', 30 );
	remove_action( 'woocommerce_sidebar', 'woocommerce_get_sidebar' );
	remove_action( 'woocommerce_before_shop_loop_item', 'woocommerce_template_loop_product_link_open', 10 );
	remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_product_link_close', 5 );
	remove_action( 'woocommerce_shop_loop_item_title', 'woocommerce_template_loop_product_title', 10 );
	remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart', 10 );
	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 );
	remove_action( 'woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_rating', 5 );
	remove_action( 'woocommerce_after_shop_loop', 'woocommerce_pagination', 10 );
}

add_action( 'init', 'sleeky_remove_hooks_woocommerce' );
add_filter( 'woocommerce_show_page_title', '__return_false' );

add_action( 'woocommerce_before_main_content', 'sleeky_before_main_content', 10 );
function sleeky_before_main_content() {
	if ( ! is_home() && ! is_front_page() ) {
		$sleeky_show_breadcrumb = get_post_meta( get_the_ID(), 'sleeky_core_show_breadcrumb', true );

		?>
		<!-- Page Banner Section -->
		<?php if ( $sleeky_show_breadcrumb != 'off' ) : ?>
			<!-- page-title -->
			<?php if ( is_shop() ) { ?>
			<section class="page-title shop-page centred">
				<div class="large-container">
					<div class="text">
						<h1><?php woocommerce_page_title(); ?></h1>
					</div>
				</div>
			</section>
			<?php } else { ?>
			<section class="page-title shop-details centred">
				<div class="large-container">
					<div class="content-box">
						<?php if ( function_exists( 'bcn_display' ) ) : ?>
							<ul class="bread-crumb clearfix">
								<?php bcn_display(); ?>
							</ul>
						<?php endif; ?>
					</div>
				</div>
			</section>
		<?php } endif; ?>
		<!-- page-title end -->
		<?php
	}
}
add_filter( 'woocommerce_sale_flash', 'sleeky_custom_hide_sales_flash' );
function sleeky_custom_hide_sales_flash() {
	 return false;
}

add_filter( 'woocommerce_sale_flash', 'sleeky_addtocart_sell' );
function sleeky_addtocart_sell() {
	return false;
}
add_filter( 'woocommerce_product_add_to_cart_text', 'sleeky_addtocart_text' );
function sleeky_addtocart_text() {
	$sleeky_addtocart_icon     = '<i class="fa fa-shopping-cart"></i>Add to cart';
	$sleeky_addtocart_icon_esc = sprintf( __( '%s', 'sleeky' ), $sleeky_addtocart_icon );
	return $sleeky_addtocart_icon_esc;
}
add_filter( 'woocommerce_loop_add_to_cart_link', 'sleeky_addtocart_link' );
function sleeky_addtocart_link() {
	global $product;
	if ( $product ) {
		$defaults                   = array(
			'quantity'        => 1,
			'data-product_id' => $product->get_id(),
			'class'           => implode(
				' ',
				array_filter(
					array(
						'product_type_' . $product->get_type(),
						$product->is_purchasable() && $product->is_in_stock() ? 'add_to_cart_button theme-btn btn-one' : '',
						$product->supports( 'ajax_add_to_cart' ) ? 'ajax_add_to_cart' : '',
					)
				)
			),
		);
		$args                       = array();
		$args                       = apply_filters( 'woocommerce_loop_add_to_cart_args', wp_parse_args( $args, $defaults ), $product );
		$sleeky_addtocart_filter_fn = sprintf(
			'<a href="%s" data-quantity="%s" class="%s" data-product_id="%s">%s</a>',
			esc_url( $product->add_to_cart_url() ),
			esc_attr( isset( $args['quantity'] ) ? $args['quantity'] : 1 ),
			esc_attr( isset( $args['class'] ) ? $args['class'] : 'button theme-btn btn-one' ),
			$args['data-product_id'],
			$product->add_to_cart_text()
		);
		return $sleeky_addtocart_filter_fn;
	}
}
?>
<?php
// shop open markup
add_action( 'woocommerce_before_shop_loop', 'sleeky_before_shop_markup' );
function sleeky_before_shop_markup() {
	$shop_category_top_widget_elementor = sleeky_get_options( 'shop_page_top_category_template' );

	if ( class_exists( '\\Elementor\\Plugin' ) ) {
		$pluginElementor = \Elementor\Plugin::instance();
		if ( is_array( $shop_category_top_widget_elementor ) && ! empty( $shop_category_top_widget_elementor ) ) :

			foreach ( $shop_category_top_widget_elementor as $single_value ) {
				$sleeky_all_save_element = $pluginElementor->frontend->get_builder_content( $single_value );
				echo do_shortcode( $sleeky_all_save_element );
			}
		else :
			$sleeky_single_save_element = $pluginElementor->frontend->get_builder_content( $shop_category_top_widget_elementor );
			echo do_shortcode( $sleeky_single_save_element );
		endif;
	}
	?>

	<!-- shop-page-section -->
	<section class="shop-page-section">
		<div class="large-container">
			<div class="item-shorting clearfix">
				<div class="left-column pull-left clearfix">
					<div class="text">
						<p><?php woocommerce_result_count(); ?></p>
					</div>
					<div class="short-box clearfix">
						<p><?php echo esc_html__( 'Short by', 'sleeky' ); ?></p>
						<div class="select-box">
							<?php woocommerce_catalog_ordering(); ?>
						</div>
					</div>
				</div>
				<?php if ( is_active_sidebar( 'woo_sideber' ) ) { ?>
				<div class="right-column pull-right clearfix">
					<div class="switch_btn_one">
						<button class="search__toggler"><?php _e( 'Filter', 'sleeky' ); ?><i class="fal fa-angle-down"></i></button>
						<div class="advanced-search">
							<div class="close-btn">
								<a href="#" class="close-side-widget"><i class="fal fa-times"></i></a>
							</div>
							<div class="row clearfix">
								<?php dynamic_sidebar( 'woo_sideber' ); ?>
							</div>
						</div>
					</div>
				</div>
				<?php } ?>
			</div>
			<div class="our-shop">
				<div class="wrapper grid">
					<div class="shop-grid-content">

					<?php
}

				// shop open markup single item
				add_action( 'woocommerce_before_shop_loop_item', 'sleeky_before_shop_markup_single_item' );
function sleeky_before_shop_markup_single_item() {
	?>

						<div class="shop-block-one">
							<div class="inner-box">
				<?php if ( shortcode_exists( 'ti_wishlists_addtowishlist' ) ) : ?>
									<?php echo do_shortcode( '[ti_wishlists_addtowishlist loop=yes]' ); ?>
								<?php endif; ?>
			<?php
}
						// shop open markup single item title and images
						add_action( 'woocommerce_before_shop_loop_item', 'sleeky_before_shop_loop_item_img_start_div' );
function sleeky_before_shop_loop_item_img_start_div() {
	?>
								<figure class="image">
		<?php
}

							// shop open markup single item title and images end
							add_action( 'woocommerce_shop_loop_item_title', 'woocommerce_shop_loop_item_title_img_close_div' );
function woocommerce_shop_loop_item_title_img_close_div() {
	global $product;
	$sleeky_product_link  = apply_filters( 'woocommerce_loop_product_link', get_the_permalink(), $product );
	$sleeky_product_title = apply_filters( 'woocommerce_loop_product_title', get_the_title(), $product );
	?>
								</figure>
								<div class="content-box">
									<h4><a href="<?php echo esc_url( $sleeky_product_link ); ?>"><?php echo esc_html( $sleeky_product_title ); ?></a></h4>
		<?php the_excerpt(); ?>
									<h3><?php woocommerce_template_loop_price(); ?></h3>
									<div class="btn-box"><?php woocommerce_template_loop_add_to_cart(); ?></div>
								</div>
							<?php
}
							add_action( 'woocommerce_after_shop_loop_item', 'sleeky_after_shop_markup_single_item' );
function sleeky_after_shop_markup_single_item() {
	?>
							</div>
						</div>
					<?php
}
							// shop open markup - end
							add_action( 'woocommerce_after_shop_loop', 'sleeky_after_shop_markup' );
function sleeky_after_shop_markup() {
	?>

					</div>
				</div>
				<?php if ( get_the_posts_pagination() ) : ?>
					<div class="pagination-wrapper centred">
						<?php
									the_posts_pagination(
										array(
											'mid_size'  => 2,
											'prev_text' => '<i class="fal fa-angle-left"></i>' . esc_html__( 'Prev', 'sleeky' ),
											'next_text' => esc_html__( 'Next', 'sleeky' ) . '<i class="fal fa-angle-right"></i>',
										)
									);
						?>
					</div>
				<?php endif; ?>
			</div>
		</div>
	</section>
	<?php
}

Youez - 2016 - github.com/yon3zu
LinuXploit