1 | <?php |
||
13 | class Carbon_Breadcrumb_Trail_Setup { |
||
14 | |||
15 | /** |
||
16 | * Breadcrumb trail. |
||
17 | * |
||
18 | * @access protected |
||
19 | * @var Carbon_Breadcrumb_Trail |
||
20 | */ |
||
21 | protected $trail; |
||
22 | |||
23 | /** |
||
24 | * Constructor. |
||
25 | * |
||
26 | * Hooks all breadcrumb trail item population methods. |
||
27 | * |
||
28 | * @access public |
||
29 | * |
||
30 | * @param Carbon_Breadcrumb_Trail $trail Trail object to populate. |
||
31 | */ |
||
32 | public function __construct( Carbon_Breadcrumb_Trail $trail ) { |
||
44 | |||
45 | /** |
||
46 | * Populate DB object items (post types, terms, authors). |
||
47 | * |
||
48 | * @access public |
||
49 | */ |
||
50 | public function populate_db_object_items() { |
||
62 | |||
63 | /** |
||
64 | * Populate date archives. |
||
65 | * |
||
66 | * @access public |
||
67 | */ |
||
68 | public function populate_date_archive_items() { |
||
77 | |||
78 | /** |
||
79 | * Populate post type archives. |
||
80 | * |
||
81 | * @access public |
||
82 | */ |
||
83 | public function populate_post_type_archive_items() { |
||
99 | |||
100 | |||
101 | /** |
||
102 | * Populate search items. |
||
103 | * |
||
104 | * @access public |
||
105 | */ |
||
106 | public function populate_search_items() { |
||
115 | |||
116 | /** |
||
117 | * Populate 404 items. |
||
118 | * |
||
119 | * @access public |
||
120 | */ |
||
121 | public function populate_404_items() { |
||
129 | |||
130 | /** |
||
131 | * Populate category hierarchy when on a single post. |
||
132 | * |
||
133 | * @access public |
||
134 | */ |
||
135 | public function populate_category_items() { |
||
147 | |||
148 | /** |
||
149 | * Populate page for posts item where necessary. |
||
150 | * |
||
151 | * @access public |
||
152 | */ |
||
153 | public function populate_page_for_posts_items() { |
||
165 | |||
166 | /** |
||
167 | * True if on a post archive, false otherwise. |
||
168 | * Post archives are: category, tag, date (year, month, day) and author pages. |
||
169 | * |
||
170 | * @access public |
||
171 | * |
||
172 | * @return bool |
||
173 | */ |
||
174 | public function is_post_archive() { |
||
177 | |||
178 | /** |
||
179 | * True if on a post archive, on posts page or on a single post; false otherwise. |
||
180 | * |
||
181 | * @access public |
||
182 | * |
||
183 | * @return bool |
||
184 | */ |
||
185 | public function is_post_context() { |
||
188 | |||
189 | /** |
||
190 | * Populate home item. |
||
191 | * |
||
192 | * @access public |
||
193 | */ |
||
194 | public function populate_home_items() { |
||
205 | |||
206 | /** |
||
207 | * Generate the items of a certain locator. |
||
208 | * |
||
209 | * @access protected |
||
210 | * |
||
211 | * @param string $locator_name Name of the locator. |
||
212 | * @return array $items Items generated by this locator. |
||
213 | */ |
||
214 | protected function generate_locator_items( $locator_name ) { |
||
224 | |||
225 | /** |
||
226 | * Retrieve the trail object. |
||
227 | * |
||
228 | * @access public |
||
229 | * |
||
230 | * @return Carbon_Breadcrumb_Trail $trail The trail object. |
||
231 | */ |
||
232 | public function get_trail() { |
||
235 | |||
236 | /** |
||
237 | * Modify the trail object. |
||
238 | * |
||
239 | * @access public |
||
240 | * |
||
241 | * @param Carbon_Breadcrumb_Trail $trail The modified rendering object. |
||
242 | */ |
||
243 | public function set_trail( Carbon_Breadcrumb_Trail $trail ) { |
||
246 | |||
247 | } |
||
248 |