PluginProbe ʕ •ᴥ•ʔ
ShopPress – Shop Builder for Elementor and WooCommerce / trunk
ShopPress – Shop Builder for Elementor and WooCommerce vtrunk
shop-press / Elementor / widgets / loop / sku / config.php
shop-press / Elementor / widgets / loop / sku Last commit date
config.php 2 years ago
config.php
61 lines
1 <?php
2 namespace ShopPress\Elementor\Widgets\LoopBuilder;
3
4 use Elementor\Controls_Manager;
5 use ShopPress\Elementor\ShopPressWidgets;
6
7 defined( 'ABSPATH' ) || exit;
8
9 class SKU extends ShopPressWidgets {
10
11 public function get_name() {
12 return 'sp-item-item-sku';
13 }
14
15 public function get_title() {
16 return __( 'Product SKU', 'shop-press' );
17 }
18
19 public function get_icon() {
20 return 'sp-widget sp-eicon-product-loop-sku';
21 }
22
23 public function get_categories() {
24 return array( 'sp_woo_loop' );
25 }
26
27 public function setup_styling_options() {
28 $this->register_group_styler(
29 'wrapper',
30 __( 'SKU', 'shop-press' ),
31 array(
32 'wrapper' => array(
33 'label' => esc_html__( 'SKU', 'shop-press' ),
34 'type' => 'styler',
35 'selector' => '.sp-loop-product-sku',
36 'wrapper' => '{{WRAPPER}}',
37 ),
38 )
39 );
40 }
41 protected function register_controls() {
42 $this->setup_styling_options();
43
44 do_action( 'shoppress/elementor/widget/register_controls_init', $this );
45 }
46
47 protected function render() {
48 do_action( 'shoppress/widget/before_render', $this->get_settings_for_display() );
49
50 if ( $this->editor_preview() ) {
51 sp_load_builder_template( 'loop/loop-sku' );
52 }
53 }
54
55 protected function content_template() {
56 ?>
57 <div class="sp-loop-product-sku">tshirt-logo</div>
58 <?php
59 }
60 }
61