0
|
1 |
<?php if ( ! defined( 'OT_VERSION') ) exit( 'No direct script access allowed' ); |
|
2 |
/** |
|
3 |
* Builds the Theme Option 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 |
|
|
12 |
/* get the settings array */ |
|
13 |
$get_settings = get_option( 'option_tree_settings' ); |
|
14 |
|
|
15 |
/* sections array */ |
|
16 |
$sections = isset( $get_settings['sections'] ) ? $get_settings['sections'] : array(); |
|
17 |
|
|
18 |
/* settings array */ |
|
19 |
$settings = isset( $get_settings['settings'] ) ? $get_settings['settings'] : array(); |
|
20 |
|
|
21 |
/* contexual_help array */ |
|
22 |
$contextual_help = isset( $get_settings['contextual_help'] ) ? $get_settings['contextual_help'] : array(); |
|
23 |
|
|
24 |
/* build the Theme Options */ |
|
25 |
if ( function_exists( 'ot_register_settings' ) ) { |
|
26 |
|
|
27 |
ot_register_settings( array( |
|
28 |
array( |
|
29 |
'id' => 'option_tree', |
|
30 |
'pages' => array( |
|
31 |
array( |
|
32 |
'id' => 'ot_theme_options', |
|
33 |
'parent_slug' => 'themes.php', |
|
34 |
'page_title' => apply_filters( 'ot_theme_options_page_title', __( 'Theme Options', 'option-tree' ) ), |
|
35 |
'menu_title' => apply_filters( 'ot_theme_options_menu_title', __( 'Theme Options', 'option-tree' ) ), |
|
36 |
'capability' => apply_filters( 'ot_theme_options_capability', 'edit_theme_options' ), |
|
37 |
'menu_slug' => 'ot-theme-options', |
|
38 |
'icon_url' => apply_filters( 'ot_theme_options_icon_url', null ), |
|
39 |
'position' => apply_filters( 'ot_theme_options_position', null ), |
|
40 |
'updated_message' => apply_filters( 'ot_theme_options_updated_message', __( 'Theme Options updated.', 'option-tree' ) ), |
|
41 |
'reset_message' => apply_filters( 'ot_theme_options_reset_message', __( 'Theme Options reset.', 'option-tree' ) ), |
|
42 |
'button_text' => apply_filters( 'ot_theme_options_button_text', __( 'Save Changes', 'option-tree' ) ), |
|
43 |
'screen_icon' => 'themes', |
|
44 |
'contextual_help' => $contextual_help, |
|
45 |
'sections' => $sections, |
|
46 |
'settings' => $settings |
|
47 |
) |
|
48 |
) |
|
49 |
) |
|
50 |
) |
|
51 |
); |
|
52 |
|
|
53 |
} |
|
54 |
|
|
55 |
/* End of file ot-ui-theme-options.php */ |
|
56 |
/* Location: ./option-tree/ot-ui-theme-options.php */ |