1 | <?php |
||
7 | class Carbon_Breadcrumb_Admin { |
||
8 | |||
9 | /** |
||
10 | * Settings container. |
||
11 | * |
||
12 | * @access public |
||
13 | * |
||
14 | * @var Carbon_Breadcrumb_Admin_Settings |
||
15 | */ |
||
16 | public $settings = null; |
||
17 | |||
18 | /** |
||
19 | * Constructor. |
||
20 | * |
||
21 | * Creates the administration functionality wrapper. |
||
22 | * |
||
23 | * @access public |
||
24 | */ |
||
25 | 3 | public function __construct() { |
|
35 | |||
36 | /** |
||
37 | * Include the administration files. |
||
38 | * |
||
39 | * @access public |
||
40 | */ |
||
41 | 1 | public function include_files() { |
|
42 | 1 | $dir = dirname( __FILE__ ); |
|
43 | |||
44 | 1 | include_once($dir . '/Carbon_Breadcrumb_Admin_Settings.php'); |
|
45 | 1 | include_once($dir . '/Carbon_Breadcrumb_Admin_Settings_Field.php'); |
|
46 | 1 | include_once($dir . '/Carbon_Breadcrumb_Admin_Settings_Field_Text.php'); |
|
47 | 1 | include_once($dir . '/Carbon_Breadcrumb_Admin_Settings_Field_Checkbox.php'); |
|
48 | 1 | } |
|
49 | |||
50 | /** |
||
51 | * Initialize breadcrumb administration. |
||
52 | * |
||
53 | * @access public |
||
54 | */ |
||
55 | 1 | public function admin_menu() { |
|
59 | |||
60 | /** |
||
61 | * Initialize breadcrumb frontend. |
||
62 | * |
||
63 | * @access public |
||
64 | */ |
||
65 | 1 | public function init() { |
|
69 | |||
70 | /** |
||
71 | * Register and setup the settings page and fields. |
||
72 | * |
||
73 | * @access public |
||
74 | */ |
||
75 | 1 | public function register_settings() { |
|
79 | |||
80 | /** |
||
81 | * Apply the settings to the breadcrumb trail renderer |
||
82 | * |
||
83 | * @access public |
||
84 | * |
||
85 | * @param array $settings The default settings. |
||
86 | * @return array $settings The modified settings. |
||
87 | */ |
||
88 | 4 | public function apply_settings( $settings = array() ) { |
|
100 | |||
101 | /** |
||
102 | * Whether the administration interface should be enabled. |
||
103 | * |
||
104 | * @access public |
||
105 | * |
||
106 | * @return bool $is_enabled True if the admin interface is enabled. |
||
107 | */ |
||
108 | 4 | public function is_enabled() { |
|
126 | |||
127 | /** |
||
128 | * Returns the current directory. |
||
129 | * Useful for covering multiple cases in unit tests. |
||
130 | * |
||
131 | * @access public |
||
132 | * |
||
133 | * @return string The absolute directory of the current file. |
||
134 | */ |
||
135 | 1 | public function current_dir() { |
|
138 | |||
139 | } |