-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.php
64 lines (56 loc) · 1.53 KB
/
index.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
<?php
/**
* Plugin Name: WP Settings api
* Plugin URI:
* Description: Description of the plugin.
* Version: 1.0.0
* Author: Tushar Imran
* Author URI:
* Text Domain: wp-settings-api
* License: GPL v2 or later
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt
*/
include plugin_dir_path( __FILE__ ) . 'inc/wpsettingapi.php';
wpsettingapi::setSection(array(
'id' => 'wpsi_test_group_setting',
'title' => __( 'Basic Settings', 'wpsi' ),
'page' => 'WPSI',
'fields' => array(
array(
'id' => 'wpsi_test_field',
'title' => __( 'Text Input', 'wpsi' ),
'desc' => 'this is description',
'default' => 'Default Value',
'placeholder' => '',
'type' => 'text',
),
array(
'id' => 'wpsi_test_field_two',
'title' => __( 'textarea Input', 'wpsi' ),
'desc' => 'this is description',
'placeholder' => 'Placeholder',
'type' => 'textarea',
),
)
));
wpsettingapi::setSection(array(
'id' => 'wpsi_test_group_setting_two',
'title' => __( 'Basic Settings Two', 'wpsi' ),
'page' => 'reading',
'fields' => array(
array(
'id' => 'wpsi_test_field_three',
'title' => __( 'Text Input', 'wpsi' ),
'desc' => 'this is simple text field',
'default' => 'this is default value',
'placeholder' => 'this is placeholder',
'type' => 'text',
),
array(
'id' => 'wpsi_test_field_four',
'title' => __( 'textarea Input', 'wpsi' ),
'desc' => 'this is simple text field',
'type' => 'textarea',
),
)
));