-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfunctions.php
More file actions
executable file
·86 lines (86 loc) · 3.05 KB
/
Copy pathfunctions.php
File metadata and controls
executable file
·86 lines (86 loc) · 3.05 KB
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
<?php
function child_options($sections) {
$sections['custom'] = array (
'title' => __( 'Custom', 'fruitful' ),
'id' => 'custom',
'fields' => array(
array(
'id' => 'example_text',
'label' => __('Text field','fruitful'),
'info' => __('This is a information for the text input','fruitful'),
'type' => 'text',
'default' => 'Default value',
),
array(
'id' => 'example_textarea',
'label' => __('Example Textarea Input','fruitful'),
'info' => __('This is a information for the textarea input.','fruitful'),
'type' => 'textarea',
'default' => 'Default value',
),
array(
'id' => 'example_checkbox',
'label' => __( 'Example Checkbox' , 'fruitful' ),
'info' => __( 'This is a information for the checkbox.', 'fruitful' ),
'description' => __( 'This is a description for the checkbox.' , 'fruitful'),
'type' => 'checkbox',
'default' => 'on',
),
array(
'id' => 'example_select',
'label' => __('Example Select','fruitful'),
'info' => __('This is a information for the select.','fruitful'),
'type' => 'select',
'options' => array(
'choice1' => __('Choice 1', 'fruitful'),
'choice2' => __('Choice 2', 'fruitful'),
'choice3' => __('Choice 3', 'fruitful'),
),
'default' => 'choice1',
),
array(
'id' => 'example_image',
'label' => __( 'Example image' , 'fruitful' ),
'info' => __( 'This is a information for the upload image.', 'fruitful' ),
'type' => 'image',
'class' => 'upload_btn'
),
array(
'id' => 'example_color',
'label' => __('Example color','fruitful'),
'info' => __('This is a information for the color.','fruitful'),
'type' => 'color',
'default' => '#000000',
),
array(
'id' => 'example_font_family',
'label' => __( 'Example Fonts' , 'fruitful' ),
'info' => __( 'This is a information for the fonts.', 'fruitful' ),
'type' => 'font',
'options' => fruitful_fonts_list(),
'default' => 'Open Sans, sans-serif',
),
array(
'id' => 'example_combined_fields',
'label' => __( 'Combined fields' , 'fruitful' ),
'info' => __( 'This is a information for the combined fields.', 'fruitful' ),
'fields' => array (
array(
'id' => 'example_box1',
'type' => 'text',
'default' => 'Default value',
'box-title' => __( 'This is a box-title for example box1.', 'fruitful' ),
),
array(
'id' => 'example_box2',
'type' => 'color',
'box-title' => __( 'This is a box-title for example box2.', 'fruitful' ),
'default' => '#000000',
),
)
),
)
);
return $sections;
}
add_filter('settings_fields', 'child_options');