PluginProbe ʕ •ᴥ•ʔ
ShopEngine Elementor WooCommerce Builder Addon – All in One WooCommerce Solution / 4.7.2
ShopEngine Elementor WooCommerce Builder Addon – All in One WooCommerce Solution v4.7.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 / core / wc-customizer / register-settings.php
shopengine / core / wc-customizer Last commit date
register-settings.php 2 years ago
register-settings.php
76 lines
1 <?php
2
3 namespace ShopEngine\Core\Wc_Customizer;
4
5 use ShopEngine\Traits\Singleton;
6
7 defined('ABSPATH') || exit;
8
9 /**
10 * Description: this class will register option in wordpress default customizer
11 *
12 * @package ShopEngine
13 * @subpackage ShopEngine/Core/Wc_Customizer
14 * @since 4.5.0
15 */
16 class Register_Settings
17 {
18 use Singleton;
19
20 /**
21 * will int the class
22 *
23 * @since 4.5.0
24 * @access public
25 * @return void
26 */
27 public function init(){
28 add_action('customize_register', [$this, 'shopengine_add_customizer_options']);
29 }
30
31 /**
32 * Add customizer options
33 *
34 * This is a callback function for customize_register action. It'll add a customizer option in the Customizer > WooCommerce > Product Catalog section
35 * @since 4.5.0
36 * @access public
37 * @param object $wp_customize
38 * @return void
39 */
40 public function shopengine_add_customizer_options( $wp_customize ) {
41
42 $wp_customize->add_setting('shopengine_product_per_page_mobile', array(
43 'default' => '2',
44 'sanitize_callback' => 'sanitize_text_field',
45 ));
46
47 $wp_customize->add_control('shopengine_product_per_page_mobile', array(
48 'label' => __('Products per row in mobile', 'shopengine'),
49 'section' => 'woocommerce_product_catalog',
50 'type' => 'number',
51 'priority' => 11,
52 'input_attrs' => array(
53 'min' => 1,
54 'step' => 1,
55 ),
56 ));
57
58 $wp_customize->add_setting('shopengine_product_per_page_tablet', array(
59 'default' => '2',
60 'sanitize_callback' => 'sanitize_text_field',
61 ));
62
63 $wp_customize->add_control('shopengine_product_per_page_tablet', array(
64 'label' => __('Products per row in tablet', 'shopengine'),
65 'section' => 'woocommerce_product_catalog',
66 'type' => 'number',
67 'priority' => 11,
68 'input_attrs' => array(
69 'min' => 1,
70 'step' => 1,
71 ),
72 ));
73 }
74
75 }
76