|
1 <?php if ( ! defined( 'OT_VERSION') ) exit( 'No direct script access allowed' ); |
|
2 /** |
|
3 * Builds the Setting & Documentation UI. |
|
4 * |
|
5 * @uses ot_register_settings() |
|
6 * |
|
7 * @package OptionTree |
|
8 * @author Derek Herman <derek@valendesigns.com> |
|
9 * @copyright Copyright (c) 2012, Derek Herman |
|
10 */ |
|
11 if ( function_exists( 'ot_register_settings' ) ) { |
|
12 |
|
13 ot_register_settings( array( |
|
14 array( |
|
15 'id' => 'option_tree_settings', |
|
16 'pages' => apply_filters( 'ot_register_pages_array', array( |
|
17 array( |
|
18 'id' => 'ot', |
|
19 'page_title' => __( 'OptionTree', 'option-tree' ), |
|
20 'menu_title' => __( 'OptionTree', 'option-tree' ), |
|
21 'capability' => 'manage_options', |
|
22 'menu_slug' => 'ot-settings', |
|
23 'icon_url' => OT_URL . '/assets/images/ot-logo-mini.png', |
|
24 'position' => 61, |
|
25 'hidden_page' => true |
|
26 ), |
|
27 array( |
|
28 'id' => 'settings', |
|
29 'parent_slug' => 'ot-settings', |
|
30 'page_title' => __( 'Settings', 'option-tree' ), |
|
31 'menu_title' => __( 'Settings', 'option-tree' ), |
|
32 'capability' => 'edit_theme_options', |
|
33 'menu_slug' => 'ot-settings', |
|
34 'icon_url' => null, |
|
35 'position' => null, |
|
36 'updated_message' => __( 'Theme Options updated.', 'option-tree' ), |
|
37 'reset_message' => __( 'Theme Options reset.', 'option-tree' ), |
|
38 'button_text' => __( 'Save Settings', 'option-tree' ), |
|
39 'show_buttons' => false, |
|
40 'screen_icon' => 'themes', |
|
41 'sections' => array( |
|
42 array( |
|
43 'id' => 'create_setting', |
|
44 'title' => __( 'Theme Options UI', 'option-tree' ) |
|
45 ), |
|
46 array( |
|
47 'id' => 'import', |
|
48 'title' => __( 'Import', 'option-tree' ) |
|
49 ), |
|
50 array( |
|
51 'id' => 'export', |
|
52 'title' => __( 'Export', 'option-tree' ) |
|
53 ), |
|
54 array( |
|
55 'id' => 'layouts', |
|
56 'title' => __( 'Layouts', 'option-tree' ) |
|
57 ) |
|
58 ), |
|
59 'settings' => array( |
|
60 array( |
|
61 'id' => 'theme_options_ui_text', |
|
62 'label' => __( 'Theme Options UI Builder', 'option-tree' ), |
|
63 'type' => 'theme_options_ui', |
|
64 'section' => 'create_setting' |
|
65 ), |
|
66 array( |
|
67 'id' => 'import_xml_text', |
|
68 'label' => __( 'Settings XML', 'option-tree' ), |
|
69 'type' => 'import-xml', |
|
70 'section' => 'import' |
|
71 ), |
|
72 array( |
|
73 'id' => 'import_settings_text', |
|
74 'label' => __( 'Settings', 'option-tree' ), |
|
75 'type' => 'import-settings', |
|
76 'section' => 'import' |
|
77 ), |
|
78 array( |
|
79 'id' => 'import_data_text', |
|
80 'label' => __( 'Theme Options', 'option-tree' ), |
|
81 'type' => 'import-data', |
|
82 'section' => 'import' |
|
83 ), |
|
84 array( |
|
85 'id' => 'import_layouts_text', |
|
86 'label' => __( 'Layouts', 'option-tree' ), |
|
87 'type' => 'import-layouts', |
|
88 'section' => 'import' |
|
89 ), |
|
90 array( |
|
91 'id' => 'export_settings_file_text', |
|
92 'label' => __( 'Settings PHP File', 'option-tree' ), |
|
93 'type' => 'export-settings-file', |
|
94 'section' => 'export' |
|
95 ), |
|
96 array( |
|
97 'id' => 'export_settings_text', |
|
98 'label' => __( 'Settings', 'option-tree' ), |
|
99 'type' => 'export-settings', |
|
100 'section' => 'export' |
|
101 ), |
|
102 array( |
|
103 'id' => 'export_data_text', |
|
104 'label' => __( 'Theme Options', 'option-tree' ), |
|
105 'type' => 'export-data', |
|
106 'section' => 'export' |
|
107 ), |
|
108 array( |
|
109 'id' => 'export_layout_text', |
|
110 'label' => __( 'Layouts', 'option-tree' ), |
|
111 'type' => 'export-layouts', |
|
112 'section' => 'export' |
|
113 ), |
|
114 array( |
|
115 'id' => 'modify_layouts_text', |
|
116 'label' => __( 'Add, Activate, & Remove Layouts', 'option-tree' ), |
|
117 'type' => 'modify-layouts', |
|
118 'section' => 'layouts' |
|
119 ) |
|
120 ) |
|
121 ), |
|
122 array( |
|
123 'id' => 'documentation', |
|
124 'parent_slug' => 'ot-settings', |
|
125 'page_title' => __( 'Documentation', 'option-tree' ), |
|
126 'menu_title' => __( 'Documentation', 'option-tree' ), |
|
127 'capability' => 'edit_theme_options', |
|
128 'menu_slug' => 'ot-documentation', |
|
129 'icon_url' => null, |
|
130 'position' => null, |
|
131 'updated_message' => __( 'Theme Options updated.', 'option-tree' ), |
|
132 'reset_message' => __( 'Theme Options reset.', 'option-tree' ), |
|
133 'button_text' => __( 'Save Settings', 'option-tree' ), |
|
134 'show_buttons' => false, |
|
135 'screen_icon' => 'themes', |
|
136 'sections' => array( |
|
137 array( |
|
138 'id' => 'creating_options', |
|
139 'title' => __( 'Creating Options', 'option-tree' ) |
|
140 ), |
|
141 array( |
|
142 'id' => 'option_types', |
|
143 'title' => __( 'Option Types', 'option-tree' ) |
|
144 ), |
|
145 array( |
|
146 'id' => 'functions', |
|
147 'title' => __( 'Function References', 'option-tree' ) |
|
148 ), |
|
149 array( |
|
150 'id' => 'theme_mode', |
|
151 'title' => __( 'Theme Mode', 'option-tree' ) |
|
152 ), |
|
153 array( |
|
154 'id' => 'meta_boxes', |
|
155 'title' => __( 'Meta Boxes', 'option-tree' ) |
|
156 ), |
|
157 array( |
|
158 'id' => 'examples', |
|
159 'title' => __( 'Code Examples', 'option-tree' ) |
|
160 ), |
|
161 array( |
|
162 'id' => 'layouts_overview', |
|
163 'title' => __( 'Layouts Overview', 'option-tree' ) |
|
164 ) |
|
165 ), |
|
166 'settings' => array( |
|
167 array( |
|
168 'id' => 'creating_options_text', |
|
169 'label' => __( 'Overview of available Theme Option fields.', 'option-tree' ), |
|
170 'type' => 'creating-options', |
|
171 'section' => 'creating_options' |
|
172 ), |
|
173 array( |
|
174 'id' => 'option_types_text', |
|
175 'label' => __( 'Option types in alphabetical order & hooks to filter them.', 'option-tree' ), |
|
176 'type' => 'option-types', |
|
177 'section' => 'option_types' |
|
178 ), |
|
179 array( |
|
180 'id' => 'functions_ot_get_option', |
|
181 'label' => __( 'Function Reference:ot_get_option()', 'option-tree' ), |
|
182 'type' => 'ot-get-option', |
|
183 'section' => 'functions' |
|
184 ), |
|
185 array( |
|
186 'id' => 'functions_get_option_tree', |
|
187 'label' => __( 'Function Reference:get_option_tree()', 'option-tree' ), |
|
188 'type' => 'get-option-tree', |
|
189 'section' => 'functions' |
|
190 ), |
|
191 array( |
|
192 'id' => 'theme_mode_text', |
|
193 'label' => __( 'Theme Mode', 'option-tree' ), |
|
194 'type' => 'theme-mode', |
|
195 'section' => 'theme_mode' |
|
196 ), |
|
197 array( |
|
198 'id' => 'meta_boxes_text', |
|
199 'label' => __( 'Meta Boxes', 'option-tree' ), |
|
200 'type' => 'meta-boxes', |
|
201 'section' => 'meta_boxes' |
|
202 ), |
|
203 array( |
|
204 'id' => 'example_text', |
|
205 'label' => __( 'Code examples for front-end development.', 'option-tree' ), |
|
206 'type' => 'examples', |
|
207 'section' => 'examples' |
|
208 ), |
|
209 array( |
|
210 'id' => 'layouts_overview_text', |
|
211 'label' => __( 'What\'s a layout anyhow?', 'option-tree' ), |
|
212 'type' => 'layouts-overview', |
|
213 'section' => 'layouts_overview' |
|
214 ) |
|
215 ) |
|
216 ) |
|
217 ) ) |
|
218 ) |
|
219 ) |
|
220 ); |
|
221 |
|
222 } |
|
223 |
|
224 /* End of file ot-ui-admin.php */ |
|
225 /* Location: ./option-tree/ot-ui-admin.php */ |