PluginProbe ʕ •ᴥ•ʔ
ShopEngine Elementor WooCommerce Builder Addon – All in One WooCommerce Solution / 4.9.2
ShopEngine Elementor WooCommerce Builder Addon – All in One WooCommerce Solution v4.9.2
4.9.2 4.9.1 4.9.0 2.0.0 2.1.0 2.2.0 2.2.1 2.2.2 2.3.0 2.4.0 2.5.0 2.5.1 3.0.0 3.1.0 3.1.1 4.0.0 4.0.1 4.1.0 4.1.1 4.2.0 4.2.1 4.3.0 4.3.1 4.4.0 4.5.0 4.5.1 4.6.0 4.6.1 4.6.2 4.6.3 4.6.4 4.6.5 4.6.6 4.6.7 4.6.8 4.6.9 4.7.0 4.7.1 4.7.2 4.7.3 4.7.4 4.7.5 4.7.6 4.7.7 4.7.8 4.7.9 4.8.0 4.8.1 4.8.2 4.8.3 4.8.4 4.8.5 4.8.6 4.8.7 4.8.8 4.8.9 trunk 0.1.2-beta 0.1.3-beta 0.1.4-beta 1.0.0 1.1.0 1.1.1 1.1.2 1.1.3 1.2.0 1.2.1 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.4.0 1.4.1 1.5.0 1.5.1 1.6.0 1.6.1 1.7.0 1.8.0 1.8.1 1.9.0
shopengine / widgets / product-share / product-share.php
shopengine / widgets / product-share Last commit date
screens 2 years ago product-share-config.php 4 years ago product-share.php 3 years ago
product-share.php
68 lines
1 <?php
2
3 namespace Elementor;
4
5 defined('ABSPATH') || exit;
6
7 use ShopEngine\Core\Template_Cpt;
8 use ShopEngine\Widgets\Products;
9
10
11 class ShopEngine_Product_Share extends \ShopEngine\Base\Widget
12 {
13
14 public function config() {
15 return new ShopEngine_Product_Share_Config();
16 }
17
18
19 protected function register_controls() {
20 /*
21 * Style Tab - Product Share
22 */
23 $this->start_controls_section(
24 'shopengine_section_share_styles',
25 [
26 'label' => esc_html__('Styles', 'shopengine'),
27 'tab' => Controls_Manager::TAB_STYLE,
28 ]
29 );
30
31 $this->add_control(
32 'shopengine_product_share_note',
33 [
34 'type' => Controls_Manager::RAW_HTML,
35 'raw' => sprintf(
36 '%1$s <a title="' . esc_html__("Wp Social Page","shopengine") . '" href="https://wordpress.org/plugins/wp-social/" target="_blank" rel="noopener">Wp Social</a> %2$s',
37 esc_html__('You need to install', 'shopengine'),
38 esc_html__('plugin or sharing plugins like this one can hook into here or you can add your own code directly. Hook: woocommerce_share', 'shopengine')
39 ),
40 'content_classes' => 'elementor-panel-alert elementor-panel-alert-info',
41 ]
42 );
43
44 $this->end_controls_section();
45 }
46
47
48 protected function screen() {
49
50 $settings = $this->get_settings_for_display();
51
52 $post_type = get_post_type();
53
54 if($post_type == 'product' || $post_type == Template_Cpt::TYPE) {
55
56 $product = Products::instance()->get_product($post_type);
57
58 $tpl = Products::instance()->get_widget_template($this->get_name());
59
60 include $tpl;
61
62 } else {
63
64 esc_html_e('You are trying to view the page outside the builder or the Product page.', 'shopengine');
65 }
66 }
67 }
68