first commit

This commit is contained in:
2024-07-15 11:28:08 +02:00
commit f52d538ea5
21891 changed files with 6161164 additions and 0 deletions

View File

@@ -0,0 +1,503 @@
<?php
/**
* Class description
*
* @package package_name
* @author Cherry Team
* @license GPL-2.0+
*/
// If this file is called directly, abort.
if ( ! defined( 'WPINC' ) ) {
die;
}
if ( ! class_exists( 'Jet_Woo_Builder_Integration' ) ) {
/**
* Define Jet_Woo_Builder_Integration class
*/
class Jet_Woo_Builder_Integration {
/**
* A reference to an instance of this class.
*
* @since 1.0.0
* @var object
*/
private static $instance = null;
/**
* Check if processing elementor widget
*
* @var boolean
*/
private $is_elementor_ajax = false;
/**
* Holder for current product instance
*
* @var array
*/
private $current_product = false;
/**
* Initalize integration hooks
*
* @return void
*/
public function init() {
add_action( 'elementor/init', array( $this, 'register_category' ) );
add_action( 'elementor/widgets/widgets_registered', array( $this, 'include_wc_hooks' ), 0 );
add_action( 'elementor/widgets/widgets_registered', array( $this, 'register_widgets' ), 10 );
add_action( 'wp_ajax_elementor_render_widget', array( $this, 'set_elementor_ajax' ), 10, - 1 );
add_action( 'elementor/page_templates/canvas/before_content', array( $this, 'open_canvas_wrap' ) );
add_action( 'elementor/page_templates/canvas/after_content', array( $this, 'close_canvas_wrap' ) );
add_action( 'elementor/editor/after_enqueue_styles', array( $this, 'editor_styles' ) );
add_action( 'elementor/controls/controls_registered', array( $this, 'add_controls' ), 10 );
add_action( 'template_redirect', array( $this, 'set_track_product_view' ), 20 );
add_filter( 'post_class', array( $this, 'add_product_post_class' ), 20 );
$this->include_theme_integration_file();
$this->include_plugin_integration_file();
}
/**
* Set current product data
*/
public function set_current_product( $product_data = array() ) {
$this->current_product = $product_data;
}
/**
* Get current product data
* @return [type] [description]
*/
public function get_current_product() {
return $this->current_product;
}
/**
* Get current product data
* @return [type] [description]
*/
public function reset_current_product() {
return $this->current_product = false;
}
/**
* Enqueue editor styles
*
* @return void
*/
public function editor_styles() {
wp_enqueue_style(
'jet-woo-builder-font',
jet_woo_builder()->plugin_url( 'assets/css/lib/jetwoobuilder-font/css/jetwoobuilder.css' ),
array(),
jet_woo_builder()->get_version()
);
wp_enqueue_style(
'jet-woo-builder-icons-font',
jet_woo_builder()->plugin_url( 'assets/css/lib/jet-woo-builder-icons/jet-woo-builder-icons.css' ),
array(),
jet_woo_builder()->get_version()
);
wp_enqueue_style(
'jet-woo-builder-editor',
jet_woo_builder()->plugin_url( 'assets/css/editor.css' ),
array(),
jet_woo_builder()->get_version()
);
}
/**
* Include woocommerce front-end hooks
*
* @return [type] [description]
*/
public function include_wc_hooks() {
$elementor = Elementor\Plugin::instance();
$is_edit_mode = $elementor->editor->is_edit_mode();
if ( ! $is_edit_mode ) {
return;
}
if ( ! defined( 'WC_ABSPATH' ) ) {
return;
}
if ( ! file_exists( WC_ABSPATH . 'includes/wc-template-hooks.php' ) ) {
return;
}
$rewrite = apply_filters( 'jet-woo-builder/integration/rewrite-frontend-hooks', false );
if ( ! $rewrite ) {
include_once WC_ABSPATH . 'includes/wc-template-hooks.php';
}
remove_filter( 'woocommerce_product_loop_start', 'woocommerce_maybe_show_product_subcategories' );
}
public function add_product_post_class( $classes ) {
if (
is_archive() ||
'related' === wc_get_loop_prop( 'name' ) ||
'up-sells' === wc_get_loop_prop( 'name' ) ||
'cross-sells' === wc_get_loop_prop( 'name' )
) {
if ( filter_var( jet_woo_builder_settings()->get( 'enable_product_thumb_effect' ), FILTER_VALIDATE_BOOLEAN ) ) {
$classes[] = 'jet-woo-thumb-with-effect';
}
}
return $classes;
}
/**
* Track product views.
*/
public function set_track_product_view() {
if ( ! is_singular( 'product' ) ) {
return;
}
global $post;
if ( empty( $_COOKIE['woocommerce_recently_viewed'] ) ) {
$viewed_products = array();
} else {
$viewed_products = (array) explode( '|', $_COOKIE['woocommerce_recently_viewed'] );
}
if ( ! in_array( $post->ID, $viewed_products ) ) {
$viewed_products[] = $post->ID;
}
if ( sizeof( $viewed_products ) > 30 ) {
array_shift( $viewed_products );
}
// Store for session only
wc_setcookie( 'woocommerce_recently_viewed', implode( '|', $viewed_products ) );
}
/**
* Include integration theme file
*
* @return void
*/
public function include_theme_integration_file() {
$template = get_template();
$int_file = jet_woo_builder()->plugin_path( "includes/integrations/themes/{$template}/functions.php" );
if ( file_exists( $int_file ) ) {
require $int_file;
}
}
/**
* Include plugin integrations file
*
* @return [type] [description]
*/
public function include_plugin_integration_file() {
$plugins = array(
'jet-popup.php' => array(
'cb' => 'class_exists',
'args' => 'Jet_Popup',
),
);
foreach ( $plugins as $file => $condition ) {
if ( true === call_user_func( $condition['cb'], $condition['args'] ) ) {
require jet_woo_builder()->plugin_path( 'includes/integrations/plugins/' . $file );
}
}
}
/**
* Open wrapper for canvas page template for product templates
*
* @return [type] [description]
*/
public function open_canvas_wrap() {
if ( ! is_singular( jet_woo_builder_post_type()->slug() ) ) {
return;
}
echo '<div class="product">';
}
/**
* Close wrapper for canvas page template for product templates
*
* @return [type] [description]
*/
public function close_canvas_wrap() {
if ( ! is_singular( jet_woo_builder_post_type()->slug() ) ) {
return;
}
echo '</div>';
}
/**
* Set $this->is_elementor_ajax to true on Elementor AJAX processing
*
* @return void
*/
public function set_elementor_ajax() {
$this->is_elementor_ajax = true;
}
/**
* Check if we currently in Elementor mode
*
* @return void
*/
public function in_elementor() {
$result = false;
if ( wp_doing_ajax() ) {
$result = $this->is_elementor_ajax;
} elseif ( Elementor\Plugin::instance()->editor->is_edit_mode()
|| Elementor\Plugin::instance()->preview->is_preview_mode() ) {
$result = true;
}
/**
* Allow to filter result before return
*
* @var bool $result
*/
return apply_filters( 'jet-woo-builder/in-elementor', $result );
}
/**
* Register plugin widgets
*
* @param object $widgets_manager Elementor widgets manager instance.
*
* @return void
*/
public function register_widgets( $widgets_manager ) {
$global_available_widgets = jet_woo_builder_settings()->get( 'global_available_widgets' );
$single_available_widgets = jet_woo_builder_settings()->get( 'single_product_available_widgets' );
$archive_available_widgets = jet_woo_builder_settings()->get( 'archive_product_available_widgets' );
$archive_category_available_widgets = jet_woo_builder_settings()->get( 'archive_category_available_widgets' );
$shop_available_widgets = jet_woo_builder_settings()->get( 'shop_product_available_widgets' );
require_once jet_woo_builder()->plugin_path( 'includes/base/class-jet-woo-builder-base.php' );
foreach ( glob( jet_woo_builder()->plugin_path( 'includes/widgets/global/' ) . '*.php' ) as $file ) {
$slug = basename( $file, '.php' );
$enabled = isset( $global_available_widgets[ $slug ] ) ? $global_available_widgets[ $slug ] : '';
if ( filter_var( $enabled, FILTER_VALIDATE_BOOLEAN ) || ! $global_available_widgets ) {
$this->register_widget( $file, $widgets_manager );
}
}
$doc_type = jet_woo_builder()->documents->get_current_type();
if ( ! $doc_type ) {
if ( get_post_type() === jet_woo_builder_post_type()->slug() ) {
$doc_type = get_post_meta( get_the_ID(), '_elementor_template_type', true );
}
}
$doc_type = apply_filters( 'jet-woo-builder/integration/doc-type', $doc_type );
$doc_types = jet_woo_builder()->documents->get_document_types();
if ( $this->is_setting_enabled( 'custom_single_page' ) || $doc_types['single']['slug'] === $doc_type ) {
foreach ( glob( jet_woo_builder()->plugin_path( 'includes/widgets/single-product/' ) . '*.php' ) as $file ) {
$slug = basename( $file, '.php' );
$enabled = isset( $single_available_widgets[ $slug ] ) ? $single_available_widgets[ $slug ] : '';
if ( filter_var( $enabled, FILTER_VALIDATE_BOOLEAN ) || ! $single_available_widgets ) {
$this->register_widget( $file, $widgets_manager );
}
}
}
if ( $this->is_setting_enabled( 'custom_shop_page' ) || $doc_types['shop']['slug'] === $doc_type ) {
foreach ( glob( jet_woo_builder()->plugin_path( 'includes/widgets/shop/' ) . '*.php' ) as $file ) {
$slug = basename( $file, '.php' );
$enabled = isset( $shop_available_widgets[ $slug ] ) ? $shop_available_widgets[ $slug ] : '';
if ( filter_var( $enabled, FILTER_VALIDATE_BOOLEAN ) || ! $shop_available_widgets ) {
$this->register_widget( $file, $widgets_manager );
}
}
}
if ( $this->is_setting_enabled( 'custom_archive_page' ) || $doc_types['archive']['slug'] === $doc_type ) {
foreach ( glob( jet_woo_builder()->plugin_path( 'includes/widgets/archive-product/' ) . '*.php' ) as $file ) {
$slug = basename( $file, '.php' );
$enabled = isset( $archive_available_widgets[ $slug ] ) ? $archive_available_widgets[ $slug ] : '';
if ( filter_var( $enabled, FILTER_VALIDATE_BOOLEAN ) || ! $archive_available_widgets ) {
$this->register_widget( $file, $widgets_manager );
}
}
}
if ( $this->is_setting_enabled( 'custom_archive_category_page' ) || $doc_types['category']['slug'] === $doc_type ) {
foreach ( glob( jet_woo_builder()->plugin_path( 'includes/widgets/archive-category/' ) . '*.php' ) as $file ) {
$slug = basename( $file, '.php' );
$enabled = isset( $archive_category_available_widgets[ $slug ] ) ? $archive_category_available_widgets[ $slug ] : '';
if ( filter_var( $enabled, FILTER_VALIDATE_BOOLEAN ) || ! $archive_category_available_widgets ) {
$this->register_widget( $file, $widgets_manager );
}
}
}
}
/**
* Return true if certain option is enabled
*
* @return bool
*/
public function is_setting_enabled( $type = 'custom_single_page' ) {
return filter_var( jet_woo_builder_shop_settings()->get( $type ), FILTER_VALIDATE_BOOLEAN );
}
/**
* Register addon by file name
*
* @param string $file File name.
* @param object $widgets_manager Widgets manager instance.
*
* @return void
*/
public function register_widget( $file, $widgets_manager ) {
$base = basename( str_replace( '.php', '', $file ) );
$class = ucwords( str_replace( '-', ' ', $base ) );
$class = str_replace( ' ', '_', $class );
$class = sprintf( 'Elementor\%s', $class );
require_once $file;
if ( class_exists( $class ) ) {
$widgets_manager->register_widget_type( new $class );
}
}
/**
* Register cherry category for elementor if not exists
*
* @return void
*/
public function register_category() {
$elements_manager = Elementor\Plugin::instance()->elements_manager;
$jet_woo_builder_cat = 'jet-woo-builder';
$elements_manager->add_category(
$jet_woo_builder_cat,
array(
'title' => esc_html__( 'Jet Woo Builder', 'jet-woo-builder' ),
'icon' => 'font',
),
1
);
}
/**
* Add new controls.
*
* @param object $controls_manager Controls manager instance.
*
* @return void
*/
public function add_controls( $controls_manager ) {
$grouped = array(
'jet-woo-box-style' => 'Jet_Woo_Group_Control_Box_Style',
);
foreach ( $grouped as $control_id => $class_name ) {
if ( $this->include_control( $class_name, true ) ) {
$controls_manager->add_group_control( $control_id, new $class_name() );
}
}
}
/**
* Include control file by class name.
*
* @param [type] $class_name [description]
*
* @return [type] [description]
*/
public function include_control( $class_name, $grouped = false ) {
$filename = sprintf(
'includes/controls/%2$sclass-%1$s.php',
str_replace( '_', '-', strtolower( $class_name ) ),
( true === $grouped ? 'groups/' : '' )
);
if ( ! file_exists( jet_woo_builder()->plugin_path( $filename ) ) ) {
return false;
}
require jet_woo_builder()->plugin_path( $filename );
return true;
}
/**
* Returns the instance.
*
* @since 1.0.0
* @return object
*/
public static function get_instance( $shortcodes = array() ) {
// If the single instance hasn't been set, set it now.
if ( null == self::$instance ) {
self::$instance = new self( $shortcodes );
}
return self::$instance;
}
}
}
/**
* Returns instance of Jet_Woo_Builder_Integration
*
* @return object
*/
function jet_woo_builder_integration() {
return Jet_Woo_Builder_Integration::get_instance();
}

View File

@@ -0,0 +1,803 @@
<?php
/**
* Popup compatibility package
*/
// If this file is called directly, abort.
if ( ! defined( 'WPINC' ) ) {
die;
}
if ( ! class_exists( 'Jet_Woo_Builder_Popup_Package' ) ) {
/**
* Define Jet_Woo_Builder_Popup_Package class
*/
class Jet_Woo_Builder_Popup_Package {
private $jet_woo_builder_qw_templates;
/**
* Contains a string of photoswipe styles registered by WC.
*
* @var array
*/
private $photoswipe_styles = '';
/**
* Contains a string of woocommerce default styles registered by WC.
*
* @var array
*/
private $woocommerce_styles = '';
/**
* Jet_Woo_Builder_Popup_Package constructor.
*/
public function __construct() {
add_filter( 'jet-popup/widget-extension/widget-before-render-settings', array( $this, 'define_popups' ), 10, 2 );
add_filter( 'jet-popup/popup-generator/before-define-popup-assets/popup-id', array( $this, 'define_popup_assets' ), 10, 2 );
add_action( 'jet-popup/editor/widget-extension/after-base-controls', array( $this, 'register_controls' ), 10, 2 );
add_filter( 'jet-popup/widget-extension/widget-before-render-settings', array( $this, 'pass_woo_builder_trigger' ), 10, 2 );
add_filter( 'jet-popup/ajax-request/get-elementor-content', array( $this, 'get_popup_content' ), 10, 2 );
add_action( 'jet-woo-builder/popup-generator/after-added-to-cart/cart-popup', array( $this, 'get_cart_popup_data_attrs' ), 10, 2 );
// Add Quick View buttons controls to Products Grid widget
add_action( 'elementor/element/jet-woo-products/section_dots_style/after_section_end', array( $this, 'register_quickview_button_content_controls' ) , 10, 2 );
add_action( 'elementor/element/jet-woo-products/section_dots_style/after_section_end', array( $this, 'register_quickview_button_style_controls' ) , 10, 2 );
add_action( 'elementor/element/jet-woo-products/section_general/before_section_end', array( $this, 'register_quickview_button_show_control' ) , 10, 2 );
add_action( 'jet-woo-builder/templates/jet-woo-products/quickview-button', array( $this, 'get_quickview_button_content' ) );
// Add Quick View buttons controls to Products List widget
add_action( 'elementor/element/jet-woo-products-list/section_button_style/after_section_end', array( $this, 'register_quickview_button_content_controls' ) , 10, 2 );
add_action( 'elementor/element/jet-woo-products-list/section_button_style/after_section_end', array( $this, 'register_quickview_button_style_controls' ) , 10, 2 );
add_action( 'elementor/element/jet-woo-products-list/section_general/before_section_end', array( $this, 'register_quickview_button_show_control' ) , 10, 2 );
add_action( 'jet-woo-builder/templates/jet-woo-products-list/quickview-button', array( $this, 'get_quickview_button_content' ) );
// Add Quick View buttons new icon settings
add_filter( 'jet-woo-builder/jet-woo-products-grid/settings', array( $this, 'quick_view_button_icon' ), 10, 2 );
add_filter( 'jet-woo-builder/jet-woo-products-list/settings', array( $this, 'quick_view_button_icon' ), 10, 2 );
}
/**
* Add Quick View buttons new icon settings.
*
* @param $settings
* @param $widget
* @return mixed
*/
public function quick_view_button_icon( $settings, $widget ) {
if ( isset( $settings['selected_quickview_button_icon_normal'] ) || isset( $settings['quickview_button_icon_normal'] ) ) {
$settings['selected_quickview_button_icon_normal'] = htmlspecialchars( $widget->__render_icon('quickview_button_icon_normal', '%s', '', false ) );
}
return $settings;
}
/**
* Define Jet Woo Builder quick view popups
*
* @param $widget_settings
* @param $settings
*
* @return mixed
*/
public function define_popups( $widget_settings, $settings ) {
if( ! isset( $settings['jet_woo_builder_qv'] ) ){
return $widget_settings;
}
$popup_id = $settings['jet_attached_popup'];
$jet_woo_builder_qw_enabled = filter_var( $settings['jet_woo_builder_qv'], FILTER_VALIDATE_BOOLEAN );
if ( $jet_woo_builder_qw_enabled && ! empty( $settings['jet_woo_builder_qv_template'] ) ) {
$this->jet_woo_builder_qw_templates[ $popup_id ] = $settings['jet_woo_builder_qv_template'];
}
$this->enqueue_popup_styles( $settings['jet_attached_popup'] );
return $widget_settings;
}
/**
* Enqueue current popup styles
*
* @param $popup_id
*/
public function enqueue_popup_styles( $popup_id ){
if ( $popup_id ) {
if ( class_exists( 'Elementor\Core\Files\CSS\Post' ) ) {
$css_file = new Elementor\Core\Files\CSS\Post( $popup_id );
} else {
$css_file = new Elementor\Post_CSS_File( $popup_id );
}
$css_file->enqueue();
}
}
/**
* Define Jet Woo Builder quick view content assets
*
* @param $popup_id
* @param $settings
*
* @return mixed
*/
public function define_popup_assets( $popup_id, $settings ) {
if( empty( $this->jet_woo_builder_qw_templates ) ){
return $popup_id;
}
if ( isset( $this->jet_woo_builder_qw_templates[ $popup_id ] ) ) {
$popup_id = $this->jet_woo_builder_qw_templates[ $popup_id ];
}
return $popup_id;
}
/**
* Register Jet Woo Builder trigger
* @return [type] [description]
*/
public function register_controls( $manager ) {
$templates = jet_woo_builder_post_type()->get_templates_list_for_options( 'single' );
$avaliable_popups = Jet_Popup_Utils::get_avaliable_popups();
$manager->add_control(
'jet_woo_builder_qv',
array(
'label' => __( 'Jet Woo Builder Quick View', 'jet-woo-builder' ),
'description' => __( 'For Products Grid and Product List widgets use Click On Custom Selector Trigger Type with .jet-quickview-button selector', 'jet-woo-builder' ),
'type' => Elementor\Controls_Manager::SWITCHER,
'label_on' => __( 'Yes', 'jet-woo-builder' ),
'label_off' => __( 'No', 'jet-woo-builder' ),
'return_value' => 'yes',
'default' => '',
)
);
$manager->add_control(
'jet_woo_builder_qv_template',
array(
'type' => Elementor\Controls_Manager::SELECT,
'label' => esc_html__( 'Template', 'jet-woo-builder' ),
'default' => '',
'options' => $templates,
'condition' => array(
'jet_woo_builder_qv' => 'yes',
),
)
);
$manager->add_control(
'jet_woo_builder_cart_popup',
array(
'label' => esc_html__( 'Jet Woo Builder Cart PopUp', 'jet-woo-builder' ),
'description' => esc_html__( 'This option works with widgets that add products to the cart using an ajax request and open popup after it.', 'jet-woo-builder' ),
'type' => Elementor\Controls_Manager::SWITCHER,
'label_on' => esc_html__( 'Yes', 'jet-woo-builder' ),
'label_off' => esc_html__( 'No', 'jet-woo-builder' ),
'return_value' => 'yes',
'default' => '',
)
);
$manager->add_control(
'jet_woo_builder_cart_popup_template',
array(
'type' => Elementor\Controls_Manager::SELECT,
'label' => esc_html__( 'Template', 'jet-woo-builder' ),
'default' => '',
'options' => $avaliable_popups,
'condition' => array(
'jet_woo_builder_cart_popup' => 'yes',
),
)
);
}
/**
* If cart popup option enable - set appropriate key and popup id in data attribute.
*
* @param $popup_enable
* @param $popup_id
* @return bool|int
*/
public function get_cart_popup_data_attrs( $popup_enable, $popup_id) {
if ( ! $popup_enable ) {
return false;
}
return printf( 'data-cart-popup-enable=%1s data-cart-popup-id=%2s', json_encode( $popup_enable ), $popup_id );
}
/**
* If jet_woo_builder_qv enabled - set appropriate key in localized popup data
*
* @param [type] $data [description]
* @param [type] $settings [description]
*
* @return [type] [description]
*/
public function pass_woo_builder_trigger( $data, $settings ) {
$popup_trigger = ! empty( $settings['jet_woo_builder_qv'] ) ? true : false;
$popup_template = ! empty( $settings['jet_woo_builder_qv_template'] ) ? $settings['jet_woo_builder_qv_template'] : '';
if ( $popup_trigger ) {
$data['is-jet-woo-builder'] = $popup_trigger;
$data['jet-woo-builder-qv-template'] = $popup_template;
}
return $data;
}
/**
* Get dynamic content related to passed post ID
*
* @param [type] $content [description]
* @param [type] $popup_data [description]
*
* @return [type] [description]
*/
public function get_popup_content( $content, $popup_data ) {
if ( empty( $popup_data['isJetWooBuilder'] ) || empty( $popup_data['productId'] ) || empty( $popup_data['templateId'] ) ) {
return $content;
}
$template_id = $popup_data['templateId'];
if ( empty( $template_id ) ) {
return $content;
}
$plugin = Elementor\Plugin::instance();
global $post, $woocommerce;
$post = get_post( $popup_data['productId'] );
if ( empty( $post ) ) {
return;
}
$this->photoswipe_styles = apply_filters( 'jet-popup/widgets/photoswipe-styles', $this->photoswipe_styles );
$this->woocommerce_styles = apply_filters( 'jet-popup/widgets/woocommerce-styles', $this->woocommerce_styles );
setup_postdata( $post, null, false );
$content = $this->photoswipe_styles;
$content .= $this->woocommerce_styles;
$content .= $plugin->frontend->get_builder_content( $template_id, true );
$content .= sprintf( '<script> jQuery.getScript("%s/assets/js/frontend/add-to-cart-variation.min.js"); </script>', $woocommerce->plugin_url() );
wp_reset_postdata( $post );
return $content;
}
/**
* Get quick view button html
*
* @param $display_settings
*/
public function get_quickview_button_content( $display_settings ){
$button_classes = array(
'jet-quickview-button',
'jet-quickview-button__link',
'jet-quickview-button__link--icon-' . $display_settings['quickview_button_icon_position'],
);
?>
<div class="jet-quickview-button__container"><a href="#" class="<?php echo implode( ' ', $button_classes ); ?>">
<div class="jet-quickview-button__plane jet-quickview-button__plane-normal"></div>
<div class="jet-quickview-button__state jet-quickview-button__state-normal">
<?php
if ( filter_var( $display_settings['quickview_use_button_icon'], FILTER_VALIDATE_BOOLEAN ) ) {
printf( '<span class="jet-quickview-button__icon jet-woo-builder-icon">%s</span>', htmlspecialchars_decode( $display_settings['selected_quickview_button_icon_normal'] ) );
}
printf( '<span class="jet-quickview-button__label">%s</span>', $display_settings['quickview_button_label_normal'] );
?>
</div>
</a></div>
<?php
}
/**
* Register content controls
*
* @param $obj
* @param array $args
*/
public function register_quickview_button_content_controls( $obj, $args = array() ){
$obj->start_controls_section(
'section_quickview_content',
array(
'label' => esc_html__( 'Quick View', 'jet-woo-builder' ),
)
);
$obj->__add_advanced_icon_control(
'quickview_button_icon_normal',
array(
'label' => esc_html__( 'Button Icon', 'jet-woo-builder' ),
'type' => Elementor\Controls_Manager::ICON,
'label_block' => true,
'file' => '',
'default' => 'fa fa-eye',
'fa5_default' => array(
'value' => 'fas fa-eye',
'library' => 'fa-solid',
),
)
);
$obj->add_control(
'quickview_button_label_normal',
array(
'label' => esc_html__( 'Button Label Text', 'jet-woo-builder' ),
'type' => Elementor\Controls_Manager::TEXT,
'default' => esc_html__( 'Quick View', 'jet-woo-builder' ),
)
);
$obj->add_control(
'quickview_button_icon_settings_heading',
array(
'label' => esc_html__( 'Icon', 'jet-woo-builder' ),
'type' => Elementor\Controls_Manager::HEADING,
'separator' => 'before',
)
);
$obj->add_control(
'quickview_use_button_icon',
array(
'label' => esc_html__( 'Use Icon?', 'jet-woo-builder' ),
'type' => Elementor\Controls_Manager::SWITCHER,
'label_on' => esc_html__( 'Yes', 'jet-woo-builder' ),
'label_off' => esc_html__( 'No', 'jet-woo-builder' ),
'return_value' => 'yes',
'default' => 'yes',
)
);
$obj->add_control(
'quickview_button_icon_position',
array(
'label' => esc_html__( 'Icon Position', 'jet-woo-builder' ),
'type' => Elementor\Controls_Manager::SELECT,
'options' => array(
'left' => esc_html__( 'Left', 'jet-woo-builder' ),
'top' => esc_html__( 'Top', 'jet-woo-builder' ),
'right' => esc_html__( 'Right', 'jet-woo-builder' ),
'bottom' => esc_html__( 'Bottom', 'jet-woo-builder' ),
),
'default' => 'left',
'render_type' => 'template',
'condition' => array(
'quickview_use_button_icon' => 'yes',
),
)
);
$obj->end_controls_section();
}
/**
* Register style controls
*
* @param $obj
* @param array $args
*/
public function register_quickview_button_style_controls( $obj, $args = array() ){
$css_scheme = apply_filters(
'jet-quickview-button/quickview-button/css-scheme',
array(
'container' => '.jet-quickview-button__container',
'button' => '.jet-quickview-button__link',
'plane_normal' => '.jet-quickview-button__plane-normal',
'state_normal' => '.jet-quickview-button__state-normal',
'icon_normal' => '.jet-quickview-button__state-normal .jet-quickview-button__icon',
'label_normal' => '.jet-quickview-button__state-normal .jet-quickview-button__label',
)
);
/**
* General Style Section
*/
$obj->start_controls_section(
'section_button_quickview_general_style',
array(
'label' => esc_html__( 'Quick View', 'jet-woo-builder' ),
'tab' => Elementor\Controls_Manager::TAB_STYLE,
'show_label' => false,
)
);
$obj->add_group_control(
Elementor\Group_Control_Typography::get_type(),
array(
'name' => 'quickview_button_typography',
'scheme' => Elementor\Scheme_Typography::TYPOGRAPHY_1,
'selector' => '{{WRAPPER}} ' . $css_scheme['button'] . ',{{WRAPPER}} ' . $css_scheme['label_normal'],
)
);
$obj->add_control(
'quickview_custom_size',
array(
'label' => esc_html__( 'Custom Size', 'jet-woo-builder' ),
'type' => Elementor\Controls_Manager::SWITCHER,
'label_on' => esc_html__( 'Yes', 'jet-woo-builder' ),
'label_off' => esc_html__( 'No', 'jet-woo-builder' ),
'return_value' => 'yes',
'default' => 'false',
)
);
$obj->add_responsive_control(
'quickview_button_custom_width',
array(
'label' => esc_html__( 'Custom Width', 'jet-woo-builder' ),
'type' => Elementor\Controls_Manager::SLIDER,
'size_units' => array(
'px',
'em',
'%',
),
'range' => array(
'px' => array(
'min' => 40,
'max' => 1000,
),
'%' => array(
'min' => 0,
'max' => 100,
),
),
'selectors' => array(
'{{WRAPPER}} ' . $css_scheme['button'] => 'width: {{SIZE}}{{UNIT}};',
),
'condition' => array(
'quickview_custom_size' => 'yes',
),
)
);
$obj->add_responsive_control(
'quickview_button_custom_height',
array(
'label' => esc_html__( 'Custom Height', 'jet-woo-builder' ),
'type' => Elementor\Controls_Manager::SLIDER,
'size_units' => array(
'px',
'em',
'%',
),
'range' => array(
'px' => array(
'min' => 10,
'max' => 1000,
),
'%' => array(
'min' => 0,
'max' => 100,
),
),
'selectors' => array(
'{{WRAPPER}} ' . $css_scheme['button'] => 'height: {{SIZE}}{{UNIT}};',
),
'condition' => array(
'quickview_custom_size' => 'yes',
),
)
);
$obj->start_controls_tabs( 'quickview_button_style_tabs' );
$obj->start_controls_tab(
'quickview_button_normal_styles',
array(
'label' => esc_html__( 'Normal', 'jet-woo-builder' ),
)
);
$obj->add_control(
'quickview_button_normal_color',
array(
'label' => esc_html__( 'Color', 'jet-woo-builder' ),
'type' => Elementor\Controls_Manager::COLOR,
'selectors' => array(
'{{WRAPPER}} ' . $css_scheme['label_normal'] => 'color: {{VALUE}}',
'{{WRAPPER}} ' . $css_scheme['icon_normal'] => 'color: {{VALUE}}',
),
)
);
$obj->add_control(
'quickview_button_normal_background',
array(
'label' => esc_html__( 'Background Color', 'jet-woo-builder' ),
'type' => Elementor\Controls_Manager::COLOR,
'scheme' => array(
'type' => Elementor\Scheme_Color::get_type(),
'value' => Elementor\Scheme_Color::COLOR_1,
),
'selectors' => array(
'{{WRAPPER}} ' . $css_scheme['button'] . ' ' . $css_scheme['plane_normal'] => 'background-color: {{VALUE}}',
),
)
);
$obj->end_controls_tab();
$obj->start_controls_tab(
'quickview_button_hover_styles',
array(
'label' => esc_html__( 'Hover', 'jet-woo-builder' ),
)
);
$obj->add_control(
'quickview_button_hover_color',
array(
'label' => esc_html__( 'Color', 'jet-woo-builder' ),
'type' => Elementor\Controls_Manager::COLOR,
'selectors' => array(
'{{WRAPPER}} ' . $css_scheme['button'] . ':hover ' . $css_scheme['label_normal'] => 'color: {{VALUE}}',
'{{WRAPPER}} ' . $css_scheme['button'] . ':hover ' . $css_scheme['icon_normal'] => 'color: {{VALUE}}',
),
)
);
$obj->add_control(
'quickview_button_hover_background',
array(
'label' => esc_html__( 'Background Color', 'jet-woo-builder' ),
'type' => Elementor\Controls_Manager::COLOR,
'scheme' => array(
'type' => Elementor\Scheme_Color::get_type(),
'value' => Elementor\Scheme_Color::COLOR_4,
),
'selectors' => array(
'{{WRAPPER}} ' . $css_scheme['button'] . ':hover ' . $css_scheme['plane_normal'] => 'background-color: {{VALUE}}',
),
)
);
$obj->add_control(
'quickview_button_border_hover_color',
array(
'label' => esc_html__( 'Border Color', 'jet-woo-builder' ),
'type' => Elementor\Controls_Manager::COLOR,
'selectors' => array(
'{{WRAPPER}} ' . $css_scheme['button'] . ':hover ' . $css_scheme['plane_normal'] => 'border-color: {{VALUE}}',
),
'condition' => array(
'quickview_button_border_border!' => ''
)
)
);
$obj->end_controls_tab();
$obj->end_controls_tabs();
$obj->add_control(
'quickview_button_border_radius',
array(
'label' => esc_html__( 'Border Radius', 'jet-woo-builder' ),
'type' => Elementor\Controls_Manager::DIMENSIONS,
'size_units' => array( 'px', '%' ),
'selectors' => array(
'{{WRAPPER}} ' . $css_scheme['button'] => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
'{{WRAPPER}} ' . $css_scheme['plane_normal'] => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
),
)
);
$obj->add_responsive_control(
'quickview_button_alignment',
array(
'label' => esc_html__( 'Alignment', 'jet-woo-builder' ),
'type' => Elementor\Controls_Manager::CHOOSE,
'default' => 'center',
'options' => array(
'flex-start' => array(
'title' => esc_html__( 'Left', 'jet-woo-builder' ),
'icon' => 'fa fa-align-left',
),
'center' => array(
'title' => esc_html__( 'Center', 'jet-woo-builder' ),
'icon' => 'fa fa-align-center',
),
'flex-end' => array(
'title' => esc_html__( 'Right', 'jet-woo-builder' ),
'icon' => 'fa fa-align-right',
),
),
'selectors' => array(
'{{WRAPPER}} ' . $css_scheme['container'] => 'justify-content: {{VALUE}};',
),
'separator' => 'before'
)
);
$obj->add_responsive_control(
'quickview_button_padding',
array(
'label' => __( 'Padding', 'jet-woo-builder' ),
'type' => Elementor\Controls_Manager::DIMENSIONS,
'size_units' => array( 'px', '%' ),
'selectors' => array(
'{{WRAPPER}} ' . $css_scheme['button'] => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
),
)
);
$obj->add_responsive_control(
'quickview_button_margin',
array(
'label' => __( 'Margin', 'jet-woo-builder' ),
'type' => Elementor\Controls_Manager::DIMENSIONS,
'size_units' => array( 'px', '%' ),
'selectors' => array(
'{{WRAPPER}} ' . $css_scheme['button'] => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
),
)
);
$obj->add_control(
'quickview_button_icon_heading',
array(
'label' => esc_html__( 'Icon', 'jet-woo-builder' ),
'type' => Elementor\Controls_Manager::HEADING,
'separator' => 'before',
)
);
$obj->start_controls_tabs( 'tabs_quickview_icon_styles' );
$obj->start_controls_tab(
'tab_quickview_icon_normal',
array(
'label' => esc_html__( 'Normal', 'jet-woo-builder' ),
)
);
$obj->add_control(
'normal_quickview_icon_color',
array(
'label' => esc_html__( 'Color', 'jet-woo-builder' ),
'type' => Elementor\Controls_Manager::COLOR,
'selectors' => array(
'{{WRAPPER}} ' . $css_scheme['icon_normal'] . ' i' => 'color: {{VALUE}}',
),
)
);
$obj->add_responsive_control(
'normal_quickview_icon_font_size',
array(
'label' => esc_html__( 'Font Size', 'jet-woo-builder' ),
'type' => Elementor\Controls_Manager::SLIDER,
'size_units' => array(
'px',
'em',
'rem',
),
'range' => array(
'px' => array(
'min' => 1,
'max' => 100,
),
),
'selectors' => array(
'{{WRAPPER}} ' . $css_scheme['icon_normal'] => 'font-size: {{SIZE}}{{UNIT}}',
),
)
);
$obj->add_responsive_control(
'normal_quickview_icon_margin',
array(
'label' => __( 'Margin', 'jet-woo-builder' ),
'type' => Elementor\Controls_Manager::DIMENSIONS,
'size_units' => array( 'px', '%' ),
'selectors' => array(
'{{WRAPPER}} ' . $css_scheme['icon_normal'] => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
),
)
);
$obj->end_controls_tab();
$obj->start_controls_tab(
'tab_quickview_icon_hover',
array(
'label' => esc_html__( 'Hover', 'jet-woo-builder' ),
)
);
$obj->add_control(
'quickview_icon_color_hover',
array(
'label' => esc_html__( 'Color', 'jet-woo-builder' ),
'type' => Elementor\Controls_Manager::COLOR,
'selectors' => array(
'{{WRAPPER}} ' . $css_scheme['button'] . ':hover ' . $css_scheme['icon_normal'] . ' i' => 'color: {{VALUE}}',
),
)
);
$obj->end_controls_tab();
$obj->end_controls_tabs();
$obj->end_controls_section();
}
/**
* Register displaying controls
*
* @param $obj
* @param array $args
*/
public function register_quickview_button_show_control( $obj, $args = array() ){
$obj->add_control(
'show_quickview',
array(
'label' => esc_html__( 'Show Quick View', 'jet-woo-builder' ),
'type' => Elementor\Controls_Manager::SWITCHER,
'label_on' => esc_html__( 'Yes', 'jet-woo-builder' ),
'label_off' => esc_html__( 'No', 'jet-woo-builder' ),
'return_value' => 'yes',
'default' => '',
)
);
$obj->add_responsive_control(
'quickview_button_order',
array(
'type' => Elementor\Controls_Manager::NUMBER,
'label' => esc_html__( 'Quick View Button Order', 'jet-woo-builder' ),
'default' => 1,
'min' => 1,
'max' => 10,
'step' => 1,
'selectors' => array(
'{{WRAPPER}} ' . '.jet-quickview-button__container' => 'order: {{VALUE}}',
),
)
);
}
}
}
new Jet_Woo_Builder_Popup_Package();

View File

@@ -0,0 +1,23 @@
<?php
/**
* Avada integration
*/
add_action( 'jet-smart-filters/providers/woocommerce-archive/before-ajax-content', 'jet_woo_astra_compatibility', 1 );
function jet_woo_astra_compatibility(){
if( class_exists( 'Astra_Woocommerce' ) ){
$astra = new Astra_Woocommerce();
if ( ! apply_filters( 'astra_woo_shop_product_structure_override', false ) ) {
$astra->shop_customization();
}
remove_action( 'woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_rating', 5 );
remove_action( 'woocommerce_shop_loop_item_title', 'woocommerce_template_loop_product_title', 10 );
remove_action( 'woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_price', 10 );
remove_action( 'woocommerce_before_shop_loop_item_title', 'woocommerce_show_product_loop_sale_flash', 10 );
}
}

View File

@@ -0,0 +1,14 @@
/**
* Avada integration styles
*/
.jet-woo-builder .onsale {
display: inline-block;
}
.jet-woo-builder .price > .amount {
color: inherit;
}
.jet-woo-builder .woocommerce-tabs .panel {
margin: 0;
}

View File

@@ -0,0 +1,17 @@
/**
* Avada integration styles
*/
.jet-woo-builder{
.onsale{
display: inline-block;
}
.price > .amount{
color: inherit;
}
.woocommerce-tabs .panel{
margin: 0;
}
}

View File

@@ -0,0 +1,70 @@
<?php
/**
* Avada integration
*/
add_action( 'elementor/page_templates/canvas/before_content', 'jet_woo_avada_open_site_main_wrap', - 999 );
add_action( 'jet-woo-builder/blank-page/before-content', 'jet_woo_avada_open_site_main_wrap', - 999 );
add_action( 'elementor/page_templates/header-footer/before_content', 'jet_woo_avada_open_site_main_wrap', - 999 );
add_action( 'jet-woo-builder/full-width-page/before-content', 'jet_woo_avada_open_site_main_wrap', - 999 );
add_action( 'elementor/page_templates/canvas/after_content', 'jet_woo_avada_close_site_main_wrap', 999 );
add_action( 'jet-woo-builder/blank-page/after_content', 'jet_woo_avada_close_site_main_wrap', 999 );
add_action( 'elementor/page_templates/header-footer/after_content', 'jet_woo_avada_close_site_main_wrap', 999 );
add_action( 'jet-woo-builder/full-width-page/after_content', 'jet_woo_avada_close_site_main_wrap', 999 );
add_action( 'wp_enqueue_scripts', 'jet_woo_avada_enqueue_styles' );
add_action( 'elementor/widgets/widgets_registered', 'jet_woo_avada_fix_wc_hooks' );
/**
* Fix WooCommerce hooks for avada
*
* @return [type] [description]
*/
function jet_woo_avada_fix_wc_hooks() {
remove_action( 'woocommerce_before_shop_loop_item_title', 'woocommerce_template_loop_product_thumbnail', 10 );
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 );
}
/**
* Open .site-main wrapper for products
* @return [type] [description]
*/
function jet_woo_avada_open_site_main_wrap() {
if ( ! is_singular( array( jet_woo_builder_post_type()->slug(), 'product' ) ) ) {
return;
}
echo '<div class="site-main">';
}
/**
* Close .site-main wrapper for products
* @return [type] [description]
*/
function jet_woo_avada_close_site_main_wrap() {
if ( ! is_singular( array( jet_woo_builder_post_type()->slug(), 'product' ) ) ) {
return;
}
echo '</div>';
}
/**
* Enqueue Avada integration stylesheets.
*
* @since 1.0.0
* @access public
* @return void
*/
function jet_woo_avada_enqueue_styles() {
wp_enqueue_style(
'jet-woo-builder-avada',
jet_woo_builder()->plugin_url( 'includes/integrations/themes/avada/assets/css/style.css' ),
false,
jet_woo_builder()->get_version()
);
}

View File

@@ -0,0 +1,31 @@
/**
* GeneratePress integration styles
*/
.site-main .jet-woo-builder .product_meta > span,
.entry-content .jet-woo-builder .product_meta > span {
display: block;
}
.site-main .jet-woo-builder .tabs:after, .site-main .jet-woo-builder .tabs:before,
.entry-content .jet-woo-builder .tabs:after,
.entry-content .jet-woo-builder .tabs:before {
display: none !important;
}
.site-main .jet-woo-builder .tabs > li,
.entry-content .jet-woo-builder .tabs > li {
border: none !important;
background: transparent !important;
}
.site-main .jet-woo-builder .tabs > li:after, .site-main .jet-woo-builder .tabs > li:before,
.entry-content .jet-woo-builder .tabs > li:after,
.entry-content .jet-woo-builder .tabs > li:before {
display: none;
}
.site-main .jet-woo-builder .tabs > li a,
.entry-content .jet-woo-builder .tabs > li a {
width: 100%;
display: block;
}

View File

@@ -0,0 +1,34 @@
/**
* GeneratePress integration styles
*/
.site-main .jet-woo-builder,
.entry-content .jet-woo-builder {
.product_meta {
> span {
display: block;
}
}
.tabs{
&:after,
&:before{
display: none!important;
}
> li {
border: none!important;
background: transparent!important;
&:after,
&:before {
display: none;
}
a {
width: 100%;
display: block;
}
}
}
}

View File

@@ -0,0 +1,57 @@
<?php
/**
* GeneratePress integration
*/
add_action( 'elementor/page_templates/canvas/before_content', 'jet_woo_generatepress_open_site_main_wrap', - 999 );
add_action( 'jet-woo-builder/blank-page/before-content', 'jet_woo_generatepress_open_site_main_wrap', - 999 );
add_action( 'elementor/page_templates/header-footer/before_content', 'jet_woo_generatepress_open_site_main_wrap', - 999 );
add_action( 'jet-woo-builder/full-width-page/before-content', 'jet_woo_generatepress_open_site_main_wrap', - 999 );
add_action( 'elementor/page_templates/canvas/after_content', 'jet_woo_generatepress_close_site_main_wrap', 999 );
add_action( 'jet-woo-builder/blank-page/after_content', 'jet_woo_generatepress_close_site_main_wrap', 999 );
add_action( 'elementor/page_templates/header-footer/after_content', 'jet_woo_generatepress_close_site_main_wrap', 999 );
add_action( 'jet-woo-builder/full-width-page/after_content', 'jet_woo_generatepress_close_site_main_wrap', 999 );
add_action( 'wp_enqueue_scripts', 'jet_woo_generatepress_enqueue_styles' );
/**
* Open .site-main wrapper for products
* @return [type] [description]
*/
function jet_woo_generatepress_open_site_main_wrap() {
if ( ! is_singular( array( jet_woo_builder_post_type()->slug(), 'product' ) ) ) {
return;
}
echo '<div class="site-main">';
}
/**
* Close .site-main wrapper for products
* @return [type] [description]
*/
function jet_woo_generatepress_close_site_main_wrap() {
if ( ! is_singular( array( jet_woo_builder_post_type()->slug(), 'product' ) ) ) {
return;
}
echo '</div>';
}
/**
* Enqueue GeneratePress integration stylesheets.
*
* @since 1.0.0
* @access public
* @return void
*/
function jet_woo_generatepress_enqueue_styles() {
wp_enqueue_style(
'jet-woo-builder-generatepress',
jet_woo_builder()->plugin_url( 'includes/integrations/themes/generatepress/assets/css/style.css' ),
false,
jet_woo_builder()->get_version()
);
}

View File

@@ -0,0 +1,44 @@
/**
* Hestia integration styles
*/
.site-main .jet-woo-builder .product_meta > span,
.main .jet-woo-builder .product_meta > span,
.entry-content .jet-woo-builder .product_meta > span {
display: block;
}
.site-main .jet-woo-builder .woocommerce-tabs li,
.main .jet-woo-builder .woocommerce-tabs li,
.entry-content .jet-woo-builder .woocommerce-tabs li {
margin: 0;
}
.site-main .jet-woo-builder .tabs:after, .site-main .jet-woo-builder .tabs:before,
.main .jet-woo-builder .tabs:after,
.main .jet-woo-builder .tabs:before,
.entry-content .jet-woo-builder .tabs:after,
.entry-content .jet-woo-builder .tabs:before {
display: none !important;
}
.site-main .jet-woo-builder .tabs > li,
.main .jet-woo-builder .tabs > li,
.entry-content .jet-woo-builder .tabs > li {
border: none !important;
background: transparent !important;
}
.site-main .jet-woo-builder .tabs > li:after, .site-main .jet-woo-builder .tabs > li:before,
.main .jet-woo-builder .tabs > li:after,
.main .jet-woo-builder .tabs > li:before,
.entry-content .jet-woo-builder .tabs > li:after,
.entry-content .jet-woo-builder .tabs > li:before {
display: none;
}
.site-main .jet-woo-builder .tabs > li a,
.main .jet-woo-builder .tabs > li a,
.entry-content .jet-woo-builder .tabs > li a {
width: 100%;
display: block;
}

View File

@@ -0,0 +1,39 @@
/**
* Hestia integration styles
*/
.site-main .jet-woo-builder,
.main .jet-woo-builder,
.entry-content .jet-woo-builder {
.product_meta {
> span {
display: block;
}
}
.woocommerce-tabs li {
margin: 0;
}
.tabs{
&:after,
&:before{
display: none!important;
}
> li {
border: none!important;
background: transparent!important;
&:after,
&:before {
display: none;
}
a {
width: 100%;
display: block;
}
}
}
}

View File

@@ -0,0 +1,71 @@
<?php
/**
* Hestia integration
*/
add_action( 'elementor/page_templates/canvas/before_content', 'jet_woo_hestia_open_site_main_wrap', -999 );
add_action( 'jet-woo-builder/blank-page/before-content', 'jet_woo_hestia_open_site_main_wrap', -999 );
add_action( 'elementor/page_templates/header-footer/before_content', 'jet_woo_hestia_open_site_main_wrap', -999 );
add_action( 'jet-woo-builder/full-width-page/before-content', 'jet_woo_hestia_open_site_main_wrap', -999 );
add_action( 'elementor/page_templates/canvas/after_content', 'jet_woo_hestia_close_site_main_wrap', 999 );
add_action( 'jet-woo-builder/blank-page/after_content', 'jet_woo_hestia_close_site_main_wrap', 999 );
add_action( 'elementor/page_templates/header-footer/after_content', 'jet_woo_hestia_close_site_main_wrap', 999 );
add_action( 'jet-woo-builder/full-width-page/after_content', 'jet_woo_hestia_close_site_main_wrap', 999 );
add_action( 'elementor/widgets/widgets_registered', 'jet_woo_hestia_fix_wc_hooks' );
add_action( 'wp_enqueue_scripts', 'jet_woo_hestia_enqueue_styles' );
/**
* Fix WooCommerce hooks for hestia
*
* @return [type] [description]
*/
function jet_woo_hestia_fix_wc_hooks() {
remove_action( 'woocommerce_before_shop_loop_item_title', 'woocommerce_template_loop_product_thumbnail', 10 );
remove_action( 'woocommerce_shop_loop_item_title', 'woocommerce_template_loop_product_title', 10 );
remove_action( 'woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_price', 10 );
remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart', 10 );
}
/**
* Open .site-main wrapper for products
* @return [type] [description]
*/
function jet_woo_hestia_open_site_main_wrap() {
if ( ! is_singular( array( jet_woo_builder_post_type()->slug(), 'product' ) ) ) {
return;
}
echo '<div class="site-main">';
}
/**
* Close .site-main wrapper for products
* @return [type] [description]
*/
function jet_woo_hestia_close_site_main_wrap() {
if ( ! is_singular( array( jet_woo_builder_post_type()->slug(), 'product' ) ) ) {
return;
}
echo '</div>';
}
/**
* Enqueue Hestia integration stylesheets.
*
* @since 1.0.0
* @access public
* @return void
*/
function jet_woo_hestia_enqueue_styles() {
wp_enqueue_style(
'jet-woo-builder-hestia',
jet_woo_builder()->plugin_url( 'includes/integrations/themes/hestia/assets/css/style.css' ),
false,
jet_woo_builder()->get_version()
);
}

View File

@@ -0,0 +1,51 @@
<?php
/**
* Kava integration
*/
add_action( 'elementor/page_templates/canvas/before_content', 'jet_woo_kava_open_site_main_wrap', -999 );
add_action( 'jet-woo-builder/blank-page/before-content', 'jet_woo_kava_open_site_main_wrap', -999 );
add_action( 'elementor/page_templates/header-footer/before_content', 'jet_woo_kava_open_site_main_wrap', -999 );
add_action( 'jet-woo-builder/full-width-page/before-content', 'jet_woo_kava_open_site_main_wrap', -999 );
add_action( 'elementor/page_templates/canvas/after_content', 'jet_woo_kava_close_site_main_wrap', 999 );
add_action( 'jet-woo-builder/blank-page/after_content', 'jet_woo_kava_close_site_main_wrap', 999 );
add_action( 'jet-woo-builder/full-width-page/after_content', 'jet_woo_kava_close_site_main_wrap', 999 );
add_action( 'elementor/page_templates/header-footer/after_content', 'jet_woo_kava_close_site_main_wrap', 999 );
add_action( 'elementor/widgets/widgets_registered', 'jet_woo_kava_fix_wc_hooks' );
/**
* Fix WooCommerce hooks for kava
*
* @return [type] [description]
*/
function jet_woo_kava_fix_wc_hooks() {
remove_action( 'woocommerce_shop_loop_item_title', 'woocommerce_template_loop_product_title', 10 );
remove_action( 'woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_rating', 10 );
}
/**
* Open .site-main wrapper for products
* @return [type] [description]
*/
function jet_woo_kava_open_site_main_wrap() {
if ( ! is_singular( array( jet_woo_builder_post_type()->slug(), 'product' ) ) ) {
return;
}
echo '<div class="site-main">';
}
/**
* Close .site-main wrapper for products
* @return [type] [description]
*/
function jet_woo_kava_close_site_main_wrap() {
if ( ! is_singular( array( jet_woo_builder_post_type()->slug(), 'product' ) ) ) {
return;
}
echo '</div>';
}

View File

@@ -0,0 +1,56 @@
/**
* Ocean WP integration styles
*/
/* Product Button styles */
.add_to_cart_button.button {
float: none;
display: inline-block;
background-color: transparent;
color: #848494;
padding: 5px 12px;
border: 3px double #e4e4e4;
font-size: 12px;
line-height: 1.5;
border-radius: 0;
text-transform: none; }
.add_to_cart_button.button:hover {
background-color: transparent;
color: #13aff0;
border-color: #13aff0; }
.entry-content .jet-woo-builder .product_meta > span {
display: block; }
.entry-content .jet-woo-builder .woocommerce-tabs li {
margin: 0; }
.entry-content .jet-woo-builder .tabs > li:after, .entry-content .jet-woo-builder .tabs > li:before {
display: none; }
.entry-content .jet-woo-builder .tabs > li a {
width: 100%;
display: block; }
.entry-content .jet-woo-builder .woocommerce-tabs ul.tabs.wc-tabs,
.entry-content .jet-woo-builder .woocommerce-tabs ul.tabs.wc-tabs li a {
border: none; }
.entry-content .jet-woo-builder .woocommerce-variation-price .price {
display: block; }
.entry-content .jet-woo-builder .woocommerce-tabs .panel.wc-tab {
margin: 0; }
.entry-content .jet-woo-builder .price .amount {
color: inherit; }
.entry-content .jet-woo-builder .single_add_to_cart_button {
vertical-align: top; }
.entry-content .jet-woo-builder form .input-text.qty {
max-width: calc( 100% - 74px); }
.woocommerce div.product .jet-single-images__wrap .woocommerce-product-gallery .flex-control-thumbs li {
clear: unset !important; }
/*# sourceMappingURL=style.css.map */

View File

@@ -0,0 +1,75 @@
/**
* Ocean WP integration styles
*/
@import "woocommerce";
.entry-content .jet-woo-builder {
.product_meta {
> span {
display: block;
}
}
.woocommerce-tabs li {
margin: 0;
}
.tabs > li {
&:after,
&:before {
display: none;
}
a {
width: 100%;
display: block;
}
}
.woocommerce-tabs ul.tabs.wc-tabs,
.woocommerce-tabs ul.tabs.wc-tabs li a {
border: none;
}
.woocommerce-variation-price .price {
display: block;
}
.woocommerce-tabs .panel.wc-tab {
margin: 0;
}
.price .amount{
color: inherit;
}
.single_add_to_cart_button{
vertical-align: top;
}
form .input-text.qty{
max-width: calc( 100% - 74px );
}
}
.woocommerce div.product .jet-single-images__wrap .woocommerce-product-gallery .flex-control-thumbs li{
clear: unset!important;
}
// TODO: Do this when will work on OceanWP compatibility
//.elementor-jet-woo-builder-products-ordering {
// .woocommerce-ordering {
// select{
// -webkit-appearance: inherit!important;
// width: 100%!important;
// position: relative!important;
// opacity: 1!important;
// height: auto!important;
// }
//
// .theme-select.orderby.theme-selectOpen{
// display: none!important;
// }
// }
//}

View File

@@ -0,0 +1,21 @@
/* Product Button styles */
.add_to_cart_button {
&.button {
float: none;
display: inline-block;
background-color: transparent;
color: #848494;
padding: 5px 12px;
border: 3px double #e4e4e4;
font-size: 12px;
line-height: 1.5;
border-radius: 0;
text-transform: none;
&:hover {
background-color: transparent;
color: #13aff0;
border-color: #13aff0;
}
}
}

View File

@@ -0,0 +1,83 @@
<?php
/**
* Ocean WP integration
*/
add_action( 'elementor/page_templates/canvas/before_content', 'jet_woo_oceanwp_open_site_main_wrap', -999 );
add_action( 'jet-woo-builder/blank-page/before-content', 'jet_woo_oceanwp_open_site_main_wrap', -999 );
add_action( 'elementor/page_templates/header-footer/before_content', 'jet_woo_oceanwp_open_site_main_wrap', -999 );
add_action( 'jet-woo-builder/full-width-page/before-content', 'jet_woo_oceanwp_open_site_main_wrap', -999 );
add_action( 'elementor/page_templates/canvas/after_content', 'jet_woo_oceanwp_close_site_main_wrap', 999 );
add_action( 'jet-woo-builder/blank-page/after_content', 'jet_woo_oceanwp_close_site_main_wrap', 999 );
add_action( 'elementor/page_templates/header-footer/after_content', 'jet_woo_oceanwp_close_site_main_wrap', 999 );
add_action( 'jet-woo-builder/full-width-page/after_content', 'jet_woo_oceanwp_close_site_main_wrap', 999 );
add_action( 'elementor/widgets/widgets_registered', 'jet_woo_oceanwp_fix_wc_hooks' );
add_action( 'wp_enqueue_scripts', 'jet_woo_oceanwp_enqueue_styles' );
add_filter( 'ocean_post_layout_class', 'jet_woo_oceanwp_display_sidebar' );
function jet_woo_oceanwp_display_sidebar( $class ){
if ( get_post_type() === 'jet-woo-builder' ){
$class = 'full-width';
}
return $class;
}
/**
* Fix WooCommerce hooks for oceanwp
*
* @return [type] [description]
*/
function jet_woo_oceanwp_fix_wc_hooks() {
remove_action( 'woocommerce_before_shop_loop_item_title', 'woocommerce_template_loop_product_thumbnail', 10 );
remove_action( 'woocommerce_shop_loop_item_title', 'woocommerce_template_loop_product_title', 10 );
remove_action( 'woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_price', 10 );
remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart', 10 );
}
/**
* Open .site-main wrapper for products
* @return [type] [description]
*/
function jet_woo_oceanwp_open_site_main_wrap() {
if ( ! is_singular( array( jet_woo_builder_post_type()->slug(), 'product' ) ) ) {
return;
}
echo '<div class="site-main">';
}
/**
* Close .site-main wrapper for products
* @return [type] [description]
*/
function jet_woo_oceanwp_close_site_main_wrap() {
if ( ! is_singular( array( jet_woo_builder_post_type()->slug(), 'product' ) ) ) {
return;
}
echo '</div>';
}
/**
* Enqueue Ocean WP integration stylesheets.
*
* @since 1.0.0
* @access public
* @return void
*/
function jet_woo_oceanwp_enqueue_styles() {
wp_enqueue_style(
'jet-woo-builder-oceanwp',
jet_woo_builder()->plugin_url( 'includes/integrations/themes/oceanwp/assets/css/style.css' ),
false,
jet_woo_builder()->get_version()
);
}

View File

@@ -0,0 +1,33 @@
/**
* Storefront integration styles
*/
div.product .jet-woo-builder .woocommerce-product-gallery .flex-control-thumbs li {
display: inline-block;
}
.single-product div.product .jet-woo-builder .product_meta {
padding: 0;
font-size: inherit;
border: none;
}
.jet-woo-builder .woocommerce-tabs ul.tabs li:after {
display: none;
}
.single-product div.product .jet-woo-builder .woocommerce-product-rating {
margin-top: 0;
margin-bottom: 0;
}
@media (min-width: 768px) {
.jet-woo-builder.elementor-jet-woo-builder-products-ordering .woocommerce-ordering,
.jet-woo-builder.elementor-jet-woo-builder-products-ordering .woocommerce-result-count,
.jet-woo-builder.elementor-jet-woo-builder-products-result-count .woocommerce-ordering,
.jet-woo-builder.elementor-jet-woo-builder-products-result-count .woocommerce-result-count {
float: none;
margin-bottom: 0;
margin-right: 0;
padding: 0;
}
}

View File

@@ -0,0 +1,34 @@
/**
* Storefront integration styles
*/
div.product .jet-woo-builder .woocommerce-product-gallery .flex-control-thumbs li {
display: inline-block;
}
.single-product div.product .jet-woo-builder .product_meta {
padding: 0;
font-size: inherit;
border: none;
}
.jet-woo-builder .woocommerce-tabs ul.tabs li:after{
display: none;
}
.single-product div.product .jet-woo-builder .woocommerce-product-rating{
margin-top: 0;
margin-bottom: 0;
}
.jet-woo-builder.elementor-jet-woo-builder-products-ordering,
.jet-woo-builder.elementor-jet-woo-builder-products-result-count{
@media (min-width: 768px){
.woocommerce-ordering,
.woocommerce-result-count {
float: none;
margin-bottom: 0;
margin-right: 0;
padding: 0;
}
}
}

View File

@@ -0,0 +1,77 @@
<?php
/**
* Storefront integration
*/
add_action( 'elementor/page_templates/canvas/before_content', 'jet_woo_storefront_open_site_main_wrap', -999 );
add_action( 'jet-woo-builder/blank-page/before-content', 'jet_woo_storefront_open_site_main_wrap', -999 );
add_action( 'elementor/page_templates/header-footer/before_content', 'jet_woo_storefront_open_site_main_wrap', -999 );
add_action( 'jet-woo-builder/full-width-page/before-content', 'jet_woo_storefront_open_site_main_wrap', -999 );
add_action( 'elementor/page_templates/canvas/after_content', 'jet_woo_storefront_close_site_main_wrap', 999 );
add_action( 'jet-woo-builder/blank-page/after_content', 'jet_woo_storefront_close_site_main_wrap', 999 );
add_action( 'elementor/page_templates/header-footer/after_content', 'jet_woo_storefront_close_site_main_wrap', 999 );
add_action( 'jet-woo-builder/full-width-page/after_content', 'jet_woo_storefront_close_site_main_wrap', 999 );
add_action( 'elementor/widgets/widgets_registered', 'jet_woo_storefront_fix_wc_hooks' );
add_action( 'wp_enqueue_scripts', 'jet_woo_storefront_enqueue_styles' );
/**
* Fix WooCommerce hooks for storefront
*
* @return [type] [description]
*/
function jet_woo_storefront_fix_wc_hooks() {
remove_action( 'woocommerce_before_shop_loop_item_title', 'woocommerce_show_product_loop_sale_flash', 10 );
add_filter( 'storefront_product_thumbnail_columns', 'jet_woo_storefront_thumbnails_columns' );
}
/**
* Open .site-main wrapper for products
* @return [type] [description]
*/
function jet_woo_storefront_open_site_main_wrap() {
if ( ! is_singular( array( jet_woo_builder_post_type()->slug(), 'product' ) ) ) {
return;
}
echo '<div class="site-main">';
}
/**
* Close .site-main wrapper for products
* @return [type] [description]
*/
function jet_woo_storefront_close_site_main_wrap() {
if ( ! is_singular( array( jet_woo_builder_post_type()->slug(), 'product' ) ) ) {
return;
}
echo '</div>';
}
function jet_woo_storefront_thumbnails_columns( $columns ){
$columns = 6;
return $columns;
}
/**
* Enqueue Storefront integration stylesheets.
*
* @since 1.0.0
* @access public
* @return void
*/
function jet_woo_storefront_enqueue_styles() {
wp_enqueue_style(
'jet-woo-builder-storefront',
jet_woo_builder()->plugin_url( 'includes/integrations/themes/storefront/assets/css/style.css' ),
false,
jet_woo_builder()->get_version()
);
}

View File

@@ -0,0 +1,19 @@
/**
* Twenty Fifteen integration styles
*/
.jet-woo-builder-template-elementor_canvas:before {
display: none;
}
.jet-woo-builder .woocommerce-review-link {
border: none;
}
.jet-woo-builder .product_meta > span {
display: block;
}
.jet-woo-builder .tagged_as a,
.jet-woo-builder .posted_in a {
border: none;
}

View File

@@ -0,0 +1,28 @@
/**
* Twenty Fifteen integration styles
*/
.jet-woo-builder-template-elementor_canvas {
&:before {
display: none;
}
}
.jet-woo-builder {
.woocommerce-review-link {
border: none;
}
.product_meta{
> span{
display: block;
}
}
.tagged_as,
.posted_in{
a{
border: none;
}
}
}

View File

@@ -0,0 +1,59 @@
<?php
/**
* Twenty Fifteen integration
*/
add_action( 'elementor/page_templates/canvas/before_content', 'jet_woo_twenty_fifteen_open_site_main_wrap', - 999 );
add_action( 'jet-woo-builder/blank-page/before-content', 'jet_woo_twenty_fifteen_open_site_main_wrap', - 999 );
add_action( 'elementor/page_templates/header-footer/before_content', 'jet_woo_twenty_fifteen_open_site_main_wrap', - 999 );
add_action( 'jet-woo-builder/full-width-page/before-content', 'jet_woo_twenty_fifteen_open_site_main_wrap', - 999 );
add_action( 'elementor/page_templates/canvas/after_content', 'jet_woo_twenty_fifteen_close_site_main_wrap', 999 );
add_action( 'jet-woo-builder/blank-page/after_content', 'jet_woo_twenty_fifteen_close_site_main_wrap', 999 );
add_action( 'elementor/page_templates/header-footer/after_content', 'jet_woo_twenty_fifteen_close_site_main_wrap', 999 );
add_action( 'jet-woo-builder/full-width-page/after_content', 'jet_woo_twenty_fifteen_close_site_main_wrap', 999 );
add_action( 'wp_enqueue_scripts', 'jet_woo_twenty_fifteen_enqueue_styles' );
/**
* Open .site-main wrapper for products
* @return [type] [description]
*/
function jet_woo_twenty_fifteen_open_site_main_wrap() {
if ( ! is_singular( array( jet_woo_builder_post_type()->slug(), 'product' ) ) ) {
return;
}
echo '<div class="site-main">';
}
/**
* Close .site-main wrapper for products
* @return [type] [description]
*/
function jet_woo_twenty_fifteen_close_site_main_wrap() {
if ( ! is_singular( array( jet_woo_builder_post_type()->slug(), 'product' ) ) ) {
return;
}
echo '</div>';
}
/**
* Enqueue Twenty Fifteen integration stylesheets.
*
* @since 1.0.0
* @access public
* @return void
*/
function jet_woo_twenty_fifteen_enqueue_styles() {
wp_enqueue_style(
'jet-woo-builder-twentyfifteen',
jet_woo_builder()->plugin_url( 'includes/integrations/themes/twentyfifteen/assets/css/style.css' ),
false,
jet_woo_builder()->get_version()
);
}

View File

@@ -0,0 +1,27 @@
/**
* Twenty Seventeen integration styles
*/
.entry-content .jet-woo-builder .product_meta > span {
display: block;
}
.entry-content .jet-woo-builder a:hover {
box-shadow: none;
}
.entry-content .jet-woo-builder .woocommerce-tabs li {
margin: 0;
}
.entry-content .jet-woo-builder .tabs > li.active a {
box-shadow: none;
}
.entry-content .jet-woo-builder .tabs > li a {
width: 100%;
display: block;
}
.entry-content .jet-woo-builder .woocommerce-variation-price .price {
display: block;
}

View File

@@ -0,0 +1,38 @@
/**
* Twenty Seventeen integration styles
*/
.entry-content .jet-woo-builder {
.product_meta{
> span{
display: block;
}
}
a:hover {
box-shadow: none;
}
.woocommerce-tabs li {
margin: 0;
}
.tabs > li{
&.active{
a{
box-shadow: none;
}
}
a {
width: 100%;
display: block;
}
}
.woocommerce-variation-price .price{
display: block;
}
}

View File

@@ -0,0 +1,59 @@
<?php
/**
* Twenty Seventeen integration
*/
add_action( 'elementor/page_templates/canvas/before_content', 'jet_woo_twenty_seventeen_open_site_main_wrap', - 999 );
add_action( 'jet-woo-builder/blank-page/before-content', 'jet_woo_twenty_seventeen_open_site_main_wrap', - 999 );
add_action( 'elementor/page_templates/header-footer/before_content', 'jet_woo_twenty_seventeen_open_site_main_wrap', - 999 );
add_action( 'jet-woo-builder/full-width-page/before-content', 'jet_woo_twenty_seventeen_open_site_main_wrap', - 999 );
add_action( 'elementor/page_templates/canvas/after_content', 'jet_woo_twenty_seventeen_close_site_main_wrap', 999 );
add_action( 'jet-woo-builder/blank-page/after_content', 'jet_woo_twenty_seventeen_close_site_main_wrap', 999 );
add_action( 'elementor/page_templates/header-footer/after_content', 'jet_woo_twenty_seventeen_close_site_main_wrap', 999 );
add_action( 'jet-woo-builder/full-width-page/after_content', 'jet_woo_twenty_seventeen_close_site_main_wrap', 999 );
add_action( 'wp_enqueue_scripts', 'jet_woo_twenty_seventeen_enqueue_styles' );
/**
* Open .site-main wrapper for products
* @return [type] [description]
*/
function jet_woo_twenty_seventeen_open_site_main_wrap() {
if ( ! is_singular( array( jet_woo_builder_post_type()->slug(), 'product' ) ) ) {
return;
}
echo '<div class="site-main">';
}
/**
* Close .site-main wrapper for products
* @return [type] [description]
*/
function jet_woo_twenty_seventeen_close_site_main_wrap() {
if ( ! is_singular( array( jet_woo_builder_post_type()->slug(), 'product' ) ) ) {
return;
}
echo '</div>';
}
/**
* Enqueue Twenty Fifteen integration stylesheets.
*
* @since 1.0.0
* @access public
* @return void
*/
function jet_woo_twenty_seventeen_enqueue_styles() {
wp_enqueue_style(
'jet-woo-builder-twentyseventeen',
jet_woo_builder()->plugin_url( 'includes/integrations/themes/twentyseventeen/assets/css/style.css' ),
false,
jet_woo_builder()->get_version()
);
}

View File

@@ -0,0 +1,31 @@
/**
* Twenty Sixteen integration styles
*/
.entry-content .jet-woo-builder .product_meta > span {
display: block;
}
.entry-content .jet-woo-builder .woocommerce-tabs li {
margin: 0;
}
.entry-content .jet-woo-builder .tabs > li {
border: none !important;
background-color: transparent !important;
border-radius: 0 !important;
margin: 0 !important;
padding: 0 !important;
}
.entry-content .jet-woo-builder .tabs > li:after, .entry-content .jet-woo-builder .tabs > li:before {
display: none;
}
.entry-content .jet-woo-builder .tabs > li a {
width: 100%;
display: block;
}
.entry-content .jet-woo-builder .woocommerce-variation-price .price {
display: block;
}

View File

@@ -0,0 +1,38 @@
/**
* Twenty Sixteen integration styles
*/
.entry-content .jet-woo-builder {
.product_meta{
> span{
display: block;
}
}
.woocommerce-tabs li {
margin: 0;
}
.tabs > li{
border: none!important;
background-color: transparent!important;
border-radius: 0!important;
margin: 0!important;
padding: 0!important;
&:after,
&:before{
display: none;
}
a {
width: 100%;
display: block;
}
}
.woocommerce-variation-price .price{
display: block;
}
}

View File

@@ -0,0 +1,59 @@
<?php
/**
* Twenty Sixteen integration
*/
add_action( 'elementor/page_templates/canvas/before_content', 'jet_woo_twenty_sixteen_open_site_main_wrap', - 999 );
add_action( 'jet-woo-builder/blank-page/before-content', 'jet_woo_twenty_sixteen_open_site_main_wrap', - 999 );
add_action( 'elementor/page_templates/header-footer/before_content', 'jet_woo_twenty_sixteen_open_site_main_wrap', - 999 );
add_action( 'jet-woo-builder/full-width-page/before-content', 'jet_woo_twenty_sixteen_open_site_main_wrap', - 999 );
add_action( 'elementor/page_templates/canvas/after_content', 'jet_woo_twenty_sixteen_close_site_main_wrap', 999 );
add_action( 'jet-woo-builder/blank-page/after_content', 'jet_woo_twenty_sixteen_close_site_main_wrap', 999 );
add_action( 'elementor/page_templates/header-footer/after_content', 'jet_woo_twenty_sixteen_close_site_main_wrap', 999 );
add_action( 'jet-woo-builder/full-width-page/after_content', 'jet_woo_twenty_sixteen_close_site_main_wrap', 999 );
add_action( 'wp_enqueue_scripts', 'jet_woo_twenty_sixteen_enqueue_styles' );
/**
* Open .site-main wrapper for products
* @return [type] [description]
*/
function jet_woo_twenty_sixteen_open_site_main_wrap() {
if ( ! is_singular( array( jet_woo_builder_post_type()->slug(), 'product' ) ) ) {
return;
}
echo '<div class="site-main">';
}
/**
* Close .site-main wrapper for products
* @return [type] [description]
*/
function jet_woo_twenty_sixteen_close_site_main_wrap() {
if ( ! is_singular( array( jet_woo_builder_post_type()->slug(), 'product' ) ) ) {
return;
}
echo '</div>';
}
/**
* Enqueue Twenty Fifteen integration stylesheets.
*
* @since 1.0.0
* @access public
* @return void
*/
function jet_woo_twenty_sixteen_enqueue_styles() {
wp_enqueue_style(
'jet-woo-builder-twentysixteen',
jet_woo_builder()->plugin_url( 'includes/integrations/themes/twentysixteen/assets/css/style.css' ),
false,
jet_woo_builder()->get_version()
);
}

View File

@@ -0,0 +1,45 @@
/**
* Zerif Lite integration styles
*/
.site-main .jet-woo-builder .product_meta > span,
.entry-content .jet-woo-builder .product_meta > span {
display: block;
}
.site-main .jet-woo-builder p,
.entry-content .jet-woo-builder p {
text-align: inherit;
}
.site-main .jet-woo-builder button.button,
.entry-content .jet-woo-builder button.button {
width: auto;
}
.site-main .jet-woo-builder .tabs,
.entry-content .jet-woo-builder .tabs {
padding-left: inherit;
}
.site-main .jet-woo-builder .tabs:before,
.entry-content .jet-woo-builder .tabs:before {
display: none !important;
}
.site-main .jet-woo-builder .tabs > li,
.entry-content .jet-woo-builder .tabs > li {
background: transparent !important;
border: none !important;
}
.site-main .jet-woo-builder .tabs > li:after, .site-main .jet-woo-builder .tabs > li:before,
.entry-content .jet-woo-builder .tabs > li:after,
.entry-content .jet-woo-builder .tabs > li:before {
display: none;
}
.site-main .jet-woo-builder .tabs > li a,
.entry-content .jet-woo-builder .tabs > li a {
width: 100%;
display: block;
}

View File

@@ -0,0 +1,43 @@
/**
* Zerif Lite integration styles
*/
.site-main .jet-woo-builder,
.entry-content .jet-woo-builder {
.product_meta {
> span {
display: block;
}
}
p {
text-align: inherit;
}
button.button {
width: auto;
}
.tabs {
padding-left: inherit;
&:before{
display: none!important;
}
> li {
background: transparent!important;
border: none!important;
&:after,
&:before {
display: none;
}
a {
width: 100%;
display: block;
}
}
}
}

View File

@@ -0,0 +1,57 @@
<?php
/**
* Zerif Lite integration
*/
add_action( 'elementor/page_templates/canvas/before_content', 'jet_woo_zeriflite_open_site_main_wrap', - 999 );
add_action( 'jet-woo-builder/blank-page/before-content', 'jet_woo_zeriflite_open_site_main_wrap', - 999 );
add_action( 'elementor/page_templates/header-footer/before_content', 'jet_woo_zeriflite_open_site_main_wrap', - 999 );
add_action( 'jet-woo-builder/full-width-page/before-content', 'jet_woo_zeriflite_open_site_main_wrap', - 999 );
add_action( 'elementor/page_templates/canvas/after_content', 'jet_woo_zeriflite_close_site_main_wrap', 999 );
add_action( 'jet-woo-builder/blank-page/after_content', 'jet_woo_zeriflite_close_site_main_wrap', 999 );
add_action( 'elementor/page_templates/header-footer/after_content', 'jet_woo_zeriflite_close_site_main_wrap', 999 );
add_action( 'jet-woo-builder/full-width-page/after_content', 'jet_woo_zeriflite_close_site_main_wrap', 999 );
add_action( 'wp_enqueue_scripts', 'jet_woo_zeriflite_enqueue_styles' );
/**
* Open .site-main wrapper for products
* @return [type] [description]
*/
function jet_woo_zeriflite_open_site_main_wrap() {
if ( ! is_singular( array( jet_woo_builder_post_type()->slug(), 'product' ) ) ) {
return;
}
echo '<div class="site-main">';
}
/**
* Close .site-main wrapper for products
* @return [type] [description]
*/
function jet_woo_zeriflite_close_site_main_wrap() {
if ( ! is_singular( array( jet_woo_builder_post_type()->slug(), 'product' ) ) ) {
return;
}
echo '</div>';
}
/**
* Enqueue Zerif Lite integration stylesheets.
*
* @since 1.0.0
* @access public
* @return void
*/
function jet_woo_zeriflite_enqueue_styles() {
wp_enqueue_style(
'jet-woo-builder-zeriflite',
jet_woo_builder()->plugin_url( 'includes/integrations/themes/zerif-lite/assets/css/style.css' ),
false,
jet_woo_builder()->get_version()
);
}

View File

@@ -0,0 +1,45 @@
/**
* Zerif integration styles
*/
.site-main .jet-woo-builder .product_meta > span,
.entry-content .jet-woo-builder .product_meta > span {
display: block;
}
.site-main .jet-woo-builder p,
.entry-content .jet-woo-builder p {
text-align: inherit;
}
.site-main .jet-woo-builder button.button,
.entry-content .jet-woo-builder button.button {
width: auto;
}
.site-main .jet-woo-builder .tabs,
.entry-content .jet-woo-builder .tabs {
padding-left: inherit;
}
.site-main .jet-woo-builder .tabs:before,
.entry-content .jet-woo-builder .tabs:before {
display: none !important;
}
.site-main .jet-woo-builder .tabs > li,
.entry-content .jet-woo-builder .tabs > li {
background: transparent !important;
border: none !important;
}
.site-main .jet-woo-builder .tabs > li:after, .site-main .jet-woo-builder .tabs > li:before,
.entry-content .jet-woo-builder .tabs > li:after,
.entry-content .jet-woo-builder .tabs > li:before {
display: none;
}
.site-main .jet-woo-builder .tabs > li a,
.entry-content .jet-woo-builder .tabs > li a {
width: 100%;
display: block;
}

View File

@@ -0,0 +1,43 @@
/**
* Zerif integration styles
*/
.site-main .jet-woo-builder,
.entry-content .jet-woo-builder {
.product_meta {
> span {
display: block;
}
}
p {
text-align: inherit;
}
button.button {
width: auto;
}
.tabs {
padding-left: inherit;
&:before{
display: none!important;
}
> li {
background: transparent!important;
border: none!important;
&:after,
&:before {
display: none;
}
a {
width: 100%;
display: block;
}
}
}
}

View File

@@ -0,0 +1,57 @@
<?php
/**
* Zerif integration
*/
add_action( 'elementor/page_templates/canvas/before_content', 'jet_woo_zerif_open_site_main_wrap', - 999 );
add_action( 'jet-woo-builder/blank-page/before-content', 'jet_woo_zerif_open_site_main_wrap', - 999 );
add_action( 'elementor/page_templates/header-footer/before_content', 'jet_woo_zerif_open_site_main_wrap', - 999 );
add_action( 'jet-woo-builder/full-width-page/before-content', 'jet_woo_zerif_open_site_main_wrap', - 999 );
add_action( 'elementor/page_templates/canvas/after_content', 'jet_woo_zerif_close_site_main_wrap', 999 );
add_action( 'jet-woo-builder/blank-page/after_content', 'jet_woo_zerif_close_site_main_wrap', 999 );
add_action( 'elementor/page_templates/header-footer/after_content', 'jet_woo_zerif_close_site_main_wrap', 999 );
add_action( 'jet-woo-builder/full-width-page/after_content', 'jet_woo_zerif_close_site_main_wrap', 999 );
add_action( 'wp_enqueue_scripts', 'jet_woo_zerif_enqueue_styles' );
/**
* Open .site-main wrapper for products
* @return [type] [description]
*/
function jet_woo_zerif_open_site_main_wrap() {
if ( ! is_singular( array( jet_woo_builder_post_type()->slug(), 'product' ) ) ) {
return;
}
echo '<div class="site-main">';
}
/**
* Close .site-main wrapper for products
* @return [type] [description]
*/
function jet_woo_zerif_close_site_main_wrap() {
if ( ! is_singular( array( jet_woo_builder_post_type()->slug(), 'product' ) ) ) {
return;
}
echo '</div>';
}
/**
* Enqueue Zerif integration stylesheets.
*
* @since 1.0.0
* @access public
* @return void
*/
function jet_woo_zerif_enqueue_styles() {
wp_enqueue_style(
'jet-woo-builder-zerif',
jet_woo_builder()->plugin_url( 'includes/integrations/themes/zerif/assets/css/style.css' ),
false,
jet_woo_builder()->get_version()
);
}