/var/www/(Del)hsihk.com/wp-content/themes/flatsome/inc/custom-wc-fields.php


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
<?php

// Custom WooCommerce product fields

if(!function_exists('wc_custom_product_data_fields')){

  function 
wc_custom_product_data_fields(){

    
$custom_product_data_fields = array();

    
$custom_product_data_fields[] = array(
          
'tab_name'    => __('Extra''flatsome'),
    );

    
$custom_product_data_fields[] = array(
          
'id'          => '_bubble_new',
          
'type'        => 'select',
          
'label'       => __('"New" Bubble''flatsome'),
          
'description' => __('Enable a New bubble on this product''flatsome'),
          
'desc_tip'    => true,
           
'options'     => array(
              
''  => 'Disabled',
              
'"yes"'  => 'Enabled',
          ),
    );


    
$custom_product_data_fields[] = array(
          
'id'          => '_custom_tab_title',
          
'type'        => 'text',
          
'label'       => __('Custom Tab Title''wc_cpdf'),
          
//'placeholder' => __('A placeholder text goes here.', 'wc_cpdf'),
          
'class'       => 'large',
          
'description' => __('Field description.''wc_cpdf'),
          
'desc_tip'    => true,
    );


    
$custom_product_data_fields[] = array(
          
'id'          => '_custom_tab',
          
'type'        => 'textarea',
          
'label'       => __('Custom Tab Content''flatsome'),
          
//'placeholder' => __('', 'wc_cpdf'),
          
'style'       => 'width:100%;height:140px;',
          
'description' => __('Enter content for custom product tab here. Shortcodes are allowed''flatsome'),
          
'desc_tip'    => true,
    );

    
/*

    // GET THE ID;
    global $wc_cpdf;
    echo $wc_cpdf->get_value(get_the_ID(), 'bubble_new');

    /*
    $custom_product_data_fields[] = array(
          'id'          => '_mytext',
          'type'        => 'text',
          'label'       => __('Text', 'wc_cpdf'),
          'placeholder' => __('A placeholder text goes here.', 'wc_cpdf'),
          'class'       => 'large',
          'description' => __('Field description.', 'wc_cpdf'),
          'desc_tip'    => true,
    );

    $custom_product_data_fields[] = array(
          'id'          => '_mynumber',
          'type'        => 'number',
          'label'       => __('Number', 'wc_cpdf'),
          'placeholder' => __('Number.', 'wc_cpdf'),
          'class'       => 'short',
          'description' => __('Field description.', 'wc_cpdf'),
          'desc_tip'    => true,
    );

    $custom_product_data_fields[] = array(
          'id'          => '_mytextarea',
          'type'        => 'textarea',
          'label'       => __('Textarea', 'wc_cpdf'),
          'placeholder' => __('A placeholder text goes here.', 'wc_cpdf'),
          'style'       => 'width:70%;height:140px;',
          'description' => __('Field description.', 'wc_cpdf'),
          'desc_tip'    => true,
    );

    $custom_product_data_fields[] = array(
          'id'          => '_mycheckbox',
          'type'        => 'checkbox',
          'label'       => __('Checkbox', 'wc_cpdf'),
          'description' => __('Field description.', 'wc_cpdf'),
          'desc_tip'    => true,
    );

    $custom_product_data_fields[] = array(
          'id'          => '_myselect',
          'type'        => 'select',
          'label'       => __('Select', 'wc_cpdf'),
          'options'     => array(
              'option_1'  => 'Option 1',
              'option_2'  => 'Option 2',
              'option_3'  => 'Option 3'
          ),
          'description' => __('Field description.', 'wc_cpdf'),
          'desc_tip'    => true,
    );

    $custom_product_data_fields[] = array(
          'id'          => '_myradio',
          'type'        => 'radio',
          'label'       => __('Radio', 'wc_cpdf'),
          'options'     => array(
                'radio_1' => 'Radio 1',
                'radio_2' => 'Radio 2',
                'radio_3' => 'Radio 3'
          ),
          'description' => __('Field description.', 'wc_cpdf'),
          'desc_tip'    => true,
    );

    $custom_product_data_fields[] = array(
          'id'         => '_myhidden',
          'type'       => 'hidden',
          'value'      => 'Hidden Value',
    );

    */

    
return $custom_product_data_fields;


  }



}

?>