Breadcrumb NavXT - Version 2.2.0-Beta1

Version Description

Download this release

Release Info

Developer mtekk
Plugin Icon 128x128 Breadcrumb NavXT
Version 2.2.0-Beta1
Comparing to
See all releases

Code changes from version 2.1.4 to 2.2.0-Beta1

breadcrumb-navxt.pot ADDED
@@ -0,0 +1,364 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # SOME DESCRIPTIVE TITLE.
2
+ # This file is put in the public domain.
3
+ # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
4
+ #
5
+ #, fuzzy
6
+ msgid ""
7
+ msgstr ""
8
+ "Project-Id-Version: PACKAGE VERSION\n"
9
+ "Report-Msgid-Bugs-To: http://wordpress.org/tag/breadcrumb-navxt\n"
10
+ "POT-Creation-Date: 2008-08-24 20:24+0000\n"
11
+ "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
12
+ "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13
+ "Language-Team: LANGUAGE <LL@li.org>\n"
14
+ "MIME-Version: 1.0\n"
15
+ "Content-Type: text/plain; charset=CHARSET\n"
16
+ "Content-Transfer-Encoding: 8bit\n"
17
+
18
+ #: breadcrumb_navxt_admin.php:55
19
+ msgid ""
20
+ "<strong>Aborting: WordPress API Malfunction</strong><br /> For some reason "
21
+ "the \n"
22
+ "\t\t\t\tfunction get_currentuserinfo() did not behave as expected. Your "
23
+ "user_level seems to be null.\n"
24
+ "\t\t\t\tThis can be resolved by navigationg to the Users section of the "
25
+ "WordPress administrative interface.\n"
26
+ "\t\t\t\tIn this section check the user that you use for administrative "
27
+ "purposes. Then under the drop down\n"
28
+ "\t\t\t\tlabled \"change role to...\" select administrator. Now click the "
29
+ "change button. Should you still \n"
30
+ "\t\t\t\trecieve this error please report this bug to the plug-in author. In "
31
+ "your report please specify \n"
32
+ "\t\t\t\tyour WordPress version, PHP version, Apache (or whatever HTTP server "
33
+ "you are using) verion, and \n"
34
+ "\t\t\t\tthe version of the plug-in you are using.<br />"
35
+ msgstr ""
36
+
37
+ #: breadcrumb_navxt_admin.php:63
38
+ msgid "WordPress version: "
39
+ msgstr ""
40
+
41
+ #: breadcrumb_navxt_admin.php:65
42
+ msgid "PHP version: "
43
+ msgstr ""
44
+
45
+ #: breadcrumb_navxt_admin.php:67
46
+ msgid "Plug-in version: "
47
+ msgstr ""
48
+
49
+ #: breadcrumb_navxt_admin.php:73
50
+ msgid ""
51
+ "<strong>Aborting: Insufficient Privleges</strong><br /> Your User Level: "
52
+ msgstr ""
53
+
54
+ #: breadcrumb_navxt_admin.php:75
55
+ msgid "<br /> Required User Level: "
56
+ msgstr ""
57
+
58
+ #: breadcrumb_navxt_admin.php:367
59
+ msgid "Settings"
60
+ msgstr ""
61
+
62
+ #: breadcrumb_navxt_admin.php:406
63
+ msgid ""
64
+ "Warning, your version of Breadcrumb NavXT does not match the version "
65
+ "supported by this administrative interface. As a result, settings may not "
66
+ "work as expected."
67
+ msgstr ""
68
+
69
+ #: breadcrumb_navxt_admin.php:407
70
+ msgid "Your Breadcrumb NavXT Administration interface version is "
71
+ msgstr ""
72
+
73
+ #: breadcrumb_navxt_admin.php:408
74
+ msgid "Your Breadcrumb NavXT version is "
75
+ msgstr ""
76
+
77
+ #: breadcrumb_navxt_admin.php:414
78
+ msgid "Breadcrumb NavXT Settings"
79
+ msgstr ""
80
+
81
+ #: breadcrumb_navxt_admin.php:416
82
+ #, php-format
83
+ msgid ""
84
+ "Tips for the settings are located below select options. Please refer to the %"
85
+ "sdocumentation%s for more detailed explanation of each setting."
86
+ msgstr ""
87
+
88
+ #: breadcrumb_navxt_admin.php:423
89
+ msgid "General"
90
+ msgstr ""
91
+
92
+ #: breadcrumb_navxt_admin.php:427
93
+ msgid "Breadcrumbs Linked"
94
+ msgstr ""
95
+
96
+ #: breadcrumb_navxt_admin.php:432 breadcrumb_navxt_admin.php:516
97
+ msgid "Yes"
98
+ msgstr ""
99
+
100
+ #: breadcrumb_navxt_admin.php:434
101
+ msgid "Allow breadcrumbs in the trail to be linked."
102
+ msgstr ""
103
+
104
+ #: breadcrumb_navxt_admin.php:439
105
+ msgid "Home Breadcrumb"
106
+ msgstr ""
107
+
108
+ #: breadcrumb_navxt_admin.php:445
109
+ msgid "Leave the home breadcrumb out of the trail."
110
+ msgstr ""
111
+
112
+ #: breadcrumb_navxt_admin.php:451
113
+ msgid "Place the home breadcrumb in the trail."
114
+ msgstr ""
115
+
116
+ #: breadcrumb_navxt_admin.php:456
117
+ msgid "Home Title: "
118
+ msgstr ""
119
+
120
+ #: breadcrumb_navxt_admin.php:466
121
+ msgid "Breadcrumb Separator"
122
+ msgstr ""
123
+
124
+ #: breadcrumb_navxt_admin.php:470
125
+ msgid "Placed in between each breadcrumb."
126
+ msgstr ""
127
+
128
+ #: breadcrumb_navxt_admin.php:475
129
+ msgid "Breadcrumb Max Title Length"
130
+ msgstr ""
131
+
132
+ #: breadcrumb_navxt_admin.php:483
133
+ msgid "Home Anchor"
134
+ msgstr ""
135
+
136
+ #: breadcrumb_navxt_admin.php:487
137
+ msgid "The anchor template for the home breadcrumb."
138
+ msgstr ""
139
+
140
+ #: breadcrumb_navxt_admin.php:496
141
+ msgid "Blog Anchor"
142
+ msgstr ""
143
+
144
+ #: breadcrumb_navxt_admin.php:500
145
+ msgid "The anchor template for the blog breadcrumb."
146
+ msgstr ""
147
+
148
+ #: breadcrumb_navxt_admin.php:507
149
+ msgid "Current Item"
150
+ msgstr ""
151
+
152
+ #: breadcrumb_navxt_admin.php:511
153
+ msgid "Link Current Item"
154
+ msgstr ""
155
+
156
+ #: breadcrumb_navxt_admin.php:522
157
+ msgid "Current Item Prefix"
158
+ msgstr ""
159
+
160
+ #: breadcrumb_navxt_admin.php:530
161
+ msgid "Current Item Suffix"
162
+ msgstr ""
163
+
164
+ #: breadcrumb_navxt_admin.php:538
165
+ msgid "Current Item Anchor"
166
+ msgstr ""
167
+
168
+ #: breadcrumb_navxt_admin.php:542
169
+ msgid "The anchor template for current item breadcrumbs."
170
+ msgstr ""
171
+
172
+ #: breadcrumb_navxt_admin.php:547
173
+ msgid "Display Paged Text"
174
+ msgstr ""
175
+
176
+ #: breadcrumb_navxt_admin.php:552
177
+ msgid ""
178
+ "Show that the user is on a page other than the first on posts/archives with "
179
+ "multiple pages."
180
+ msgstr ""
181
+
182
+ #: breadcrumb_navxt_admin.php:558
183
+ msgid "Paged Prefix"
184
+ msgstr ""
185
+
186
+ #: breadcrumb_navxt_admin.php:566
187
+ msgid "Paged Suffix"
188
+ msgstr ""
189
+
190
+ #: breadcrumb_navxt_admin.php:575
191
+ msgid "Posts & Pages"
192
+ msgstr ""
193
+
194
+ #: breadcrumb_navxt_admin.php:579
195
+ msgid "Post Prefix"
196
+ msgstr ""
197
+
198
+ #: breadcrumb_navxt_admin.php:587
199
+ msgid "Post Suffix"
200
+ msgstr ""
201
+
202
+ #: breadcrumb_navxt_admin.php:595
203
+ msgid "Post Anchor"
204
+ msgstr ""
205
+
206
+ #: breadcrumb_navxt_admin.php:599
207
+ msgid "The anchor template for post breadcrumbs."
208
+ msgstr ""
209
+
210
+ #: breadcrumb_navxt_admin.php:604
211
+ msgid "Post Taxonomy Display"
212
+ msgstr ""
213
+
214
+ #: breadcrumb_navxt_admin.php:609
215
+ msgid "Show the taxonomy leading to a post in the breadcrumb trail."
216
+ msgstr ""
217
+
218
+ #: breadcrumb_navxt_admin.php:615
219
+ msgid "Post Taxonomy"
220
+ msgstr ""
221
+
222
+ #: breadcrumb_navxt_admin.php:621 breadcrumb_navxt_admin.php:679
223
+ msgid "Categories"
224
+ msgstr ""
225
+
226
+ #: breadcrumb_navxt_admin.php:627 breadcrumb_navxt_admin.php:725
227
+ msgid "Tags"
228
+ msgstr ""
229
+
230
+ #: breadcrumb_navxt_admin.php:631
231
+ msgid "The taxonomy which the breadcrumb trail will show."
232
+ msgstr ""
233
+
234
+ #: breadcrumb_navxt_admin.php:637
235
+ msgid "Page Prefix"
236
+ msgstr ""
237
+
238
+ #: breadcrumb_navxt_admin.php:645
239
+ msgid "Page Suffix"
240
+ msgstr ""
241
+
242
+ #: breadcrumb_navxt_admin.php:653
243
+ msgid "Page Anchor"
244
+ msgstr ""
245
+
246
+ #: breadcrumb_navxt_admin.php:657
247
+ msgid "The anchor template for page breadcrumbs."
248
+ msgstr ""
249
+
250
+ #: breadcrumb_navxt_admin.php:662
251
+ msgid "Attachment Prefix"
252
+ msgstr ""
253
+
254
+ #: breadcrumb_navxt_admin.php:670
255
+ msgid "Attachment Suffix"
256
+ msgstr ""
257
+
258
+ #: breadcrumb_navxt_admin.php:683
259
+ msgid "Archive by Category Prefix"
260
+ msgstr ""
261
+
262
+ #: breadcrumb_navxt_admin.php:691
263
+ msgid "Archive by Category Suffix"
264
+ msgstr ""
265
+
266
+ #: breadcrumb_navxt_admin.php:699
267
+ msgid "Category Prefix"
268
+ msgstr ""
269
+
270
+ #: breadcrumb_navxt_admin.php:707
271
+ msgid "Category Suffix"
272
+ msgstr ""
273
+
274
+ #: breadcrumb_navxt_admin.php:715
275
+ msgid "Category Anchor"
276
+ msgstr ""
277
+
278
+ #: breadcrumb_navxt_admin.php:719
279
+ msgid "The anchor template for category breadcrumbs."
280
+ msgstr ""
281
+
282
+ #: breadcrumb_navxt_admin.php:729
283
+ msgid "Archive by Tag Prefix"
284
+ msgstr ""
285
+
286
+ #: breadcrumb_navxt_admin.php:737
287
+ msgid "Archive by Tag Suffix"
288
+ msgstr ""
289
+
290
+ #: breadcrumb_navxt_admin.php:745
291
+ msgid "Tag Prefix"
292
+ msgstr ""
293
+
294
+ #: breadcrumb_navxt_admin.php:753
295
+ msgid "Tag Suffix"
296
+ msgstr ""
297
+
298
+ #: breadcrumb_navxt_admin.php:761
299
+ msgid "Tag Anchor"
300
+ msgstr ""
301
+
302
+ #: breadcrumb_navxt_admin.php:765
303
+ msgid "The anchor template for tag breadcrumbs."
304
+ msgstr ""
305
+
306
+ #: breadcrumb_navxt_admin.php:771
307
+ msgid "Date Archives"
308
+ msgstr ""
309
+
310
+ #: breadcrumb_navxt_admin.php:775
311
+ msgid "Archive by Date Prefix"
312
+ msgstr ""
313
+
314
+ #: breadcrumb_navxt_admin.php:783
315
+ msgid "Archive by Date Suffix"
316
+ msgstr ""
317
+
318
+ #: breadcrumb_navxt_admin.php:791
319
+ msgid "Date Anchor"
320
+ msgstr ""
321
+
322
+ #: breadcrumb_navxt_admin.php:795
323
+ msgid "The anchor template for date breadcrumbs."
324
+ msgstr ""
325
+
326
+ #: breadcrumb_navxt_admin.php:801
327
+ msgid "Miscellaneous"
328
+ msgstr ""
329
+
330
+ #: breadcrumb_navxt_admin.php:805
331
+ msgid "Author Prefix"
332
+ msgstr ""
333
+
334
+ #: breadcrumb_navxt_admin.php:813
335
+ msgid "Author Suffix"
336
+ msgstr ""
337
+
338
+ #: breadcrumb_navxt_admin.php:821
339
+ msgid "Author Display Format"
340
+ msgstr ""
341
+
342
+ #: breadcrumb_navxt_admin.php:831
343
+ msgid "Search Prefix"
344
+ msgstr ""
345
+
346
+ #: breadcrumb_navxt_admin.php:839
347
+ msgid "Search Suffix"
348
+ msgstr ""
349
+
350
+ #: breadcrumb_navxt_admin.php:847
351
+ msgid "404 Title"
352
+ msgstr ""
353
+
354
+ #: breadcrumb_navxt_admin.php:855
355
+ msgid "404 Prefix"
356
+ msgstr ""
357
+
358
+ #: breadcrumb_navxt_admin.php:863
359
+ msgid "404 Suffix"
360
+ msgstr ""
361
+
362
+ #: breadcrumb_navxt_admin.php:872
363
+ msgid "Save Changes"
364
+ msgstr ""
breadcrumb_navxt.mo CHANGED
Binary file
breadcrumb_navxt.po CHANGED
@@ -2,8 +2,8 @@ msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Breadcrumb NavXT\n"
4
  "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2008-06-30 23:03-0600\n"
6
- "PO-Revision-Date: 2008-06-30 23:03-0600\n"
7
  "Last-Translator: John Havlik <mtekkmonkey@gmail.com>\n"
8
  "Language-Team: John Havlik <mtekkmonkey@gmail.com>\n"
9
  "MIME-Version: 1.0\n"
@@ -16,7 +16,7 @@ msgstr ""
16
 
17
  #: C:\Documents
18
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
19
- #: NavXT\trunk/breadcrumb_navxt_admin.php:53
20
  msgid ""
21
  "<strong>Aborting: WordPress API Malfunction</strong><br /> For some reason the \n"
22
  "\t\t\t\tfunction get_currentuserinfo() did not behave as expected. Your user_level seems to be null.\n"
@@ -30,471 +30,485 @@ msgstr ""
30
 
31
  #: C:\Documents
32
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
33
- #: NavXT\trunk/breadcrumb_navxt_admin.php:61
34
  msgid "WordPress version: "
35
  msgstr ""
36
 
37
  #: C:\Documents
38
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
39
- #: NavXT\trunk/breadcrumb_navxt_admin.php:63
40
  msgid "PHP version: "
41
  msgstr ""
42
 
43
  #: C:\Documents
44
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
45
- #: NavXT\trunk/breadcrumb_navxt_admin.php:65
46
  msgid "Plug-in version: "
47
  msgstr ""
48
 
49
  #: C:\Documents
50
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
51
- #: NavXT\trunk/breadcrumb_navxt_admin.php:71
52
  msgid "<strong>Aborting: Insufficient Privleges</strong><br /> Your User Level: "
53
  msgstr ""
54
 
55
  #: C:\Documents
56
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
57
- #: NavXT\trunk/breadcrumb_navxt_admin.php:73
58
  msgid "<br /> Required User Level: "
59
  msgstr ""
60
 
61
  #: C:\Documents
62
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
63
- #: NavXT\trunk/breadcrumb_navxt_admin.php:313
 
 
 
 
 
 
64
  msgid "Warning, your version of Breadcrumb NavXT does not match the version supported by this administrative interface. As a result, settings may not work as expected."
65
  msgstr ""
66
 
67
  #: C:\Documents
68
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
69
- #: NavXT\trunk/breadcrumb_navxt_admin.php:314
70
  msgid "Your Breadcrumb NavXT Administration interface version is "
71
  msgstr ""
72
 
73
  #: C:\Documents
74
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
75
- #: NavXT\trunk/breadcrumb_navxt_admin.php:315
76
  msgid "Your Breadcrumb NavXT version is "
77
  msgstr ""
78
 
79
  #: C:\Documents
80
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
81
- #: NavXT\trunk/breadcrumb_navxt_admin.php:321
82
  msgid "Breadcrumb NavXT Settings"
83
  msgstr ""
84
 
85
  #: C:\Documents
86
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
87
- #: NavXT\trunk/breadcrumb_navxt_admin.php:327
88
  #, php-format
89
- msgid ""
90
- "This administration interface allows the full customization of the breadcrumb output with no loss\n"
91
- "\tof functionality when compared to manual configuration. Each setting is the same as the corresponding\n"
92
- "\tclass option, please refer to the \n"
93
- "\t%sdocumentation%s \n"
94
- "\tfor more detailed explanation of each setting."
95
  msgstr ""
96
 
97
  #: C:\Documents
98
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
99
- #: NavXT\trunk/breadcrumb_navxt_admin.php:333
100
  msgid "General"
101
  msgstr ""
102
 
103
  #: C:\Documents
104
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
105
- #: NavXT\trunk/breadcrumb_navxt_admin.php:337
106
- msgid "Blog Title"
107
  msgstr ""
108
 
109
  #: C:\Documents
110
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
111
- #: NavXT\trunk/breadcrumb_navxt_admin.php:341
112
- msgid "Will be displayed on the home page (when not using a static front page), always links to the main post page."
 
113
  msgstr ""
114
 
115
  #: C:\Documents
116
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
117
- #: NavXT\trunk/breadcrumb_navxt_admin.php:346
118
- msgid "Breadcrumb Separator"
119
  msgstr ""
120
 
121
  #: C:\Documents
122
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
123
- #: NavXT\trunk/breadcrumb_navxt_admin.php:350
124
- msgid "Placed in between each breadcrumb."
125
  msgstr ""
126
 
127
  #: C:\Documents
128
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
129
- #: NavXT\trunk/breadcrumb_navxt_admin.php:355
130
- msgid "URL Title Prefix"
131
  msgstr ""
132
 
133
  #: C:\Documents
134
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
135
- #: NavXT\trunk/breadcrumb_navxt_admin.php:359
136
- msgid "The prefix applied globally to the title field in the breadcrumb links."
137
  msgstr ""
138
 
139
  #: C:\Documents
140
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
141
- #: NavXT\trunk/breadcrumb_navxt_admin.php:363
142
- msgid "URL Title Suffix"
143
  msgstr ""
144
 
145
  #: C:\Documents
146
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
147
- #: NavXT\trunk/breadcrumb_navxt_admin.php:367
148
- msgid "The suffix applied globally to the title field in the breadcrumb links."
149
  msgstr ""
150
 
151
  #: C:\Documents
152
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
153
- #: NavXT\trunk/breadcrumb_navxt_admin.php:372
154
- msgid "Search Prefix"
155
  msgstr ""
156
 
157
  #: C:\Documents
158
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
159
- #: NavXT\trunk/breadcrumb_navxt_admin.php:380
160
- msgid "Search Suffix"
161
  msgstr ""
162
 
163
  #: C:\Documents
164
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
165
- #: NavXT\trunk/breadcrumb_navxt_admin.php:388
166
- msgid "404 Title"
167
  msgstr ""
168
 
169
  #: C:\Documents
170
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
171
- #: NavXT\trunk/breadcrumb_navxt_admin.php:397
172
- msgid "Front Page"
173
  msgstr ""
174
 
175
  #: C:\Documents
176
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
177
- #: NavXT\trunk/breadcrumb_navxt_admin.php:401
178
- msgid "Static Front Page"
179
  msgstr ""
180
 
181
  #: C:\Documents
182
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
183
- #: NavXT\trunk/breadcrumb_navxt_admin.php:404
184
- #: NavXT\trunk/breadcrumb_navxt_admin.php:548
185
- msgid "Yes"
186
  msgstr ""
187
 
188
  #: C:\Documents
189
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
190
- #: NavXT\trunk/breadcrumb_navxt_admin.php:409
191
- msgid "Relative Blog URL"
192
  msgstr ""
193
 
194
  #: C:\Documents
195
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
196
- #: NavXT\trunk/breadcrumb_navxt_admin.php:413
197
- msgid "The location of the page that contains posts relative to the WordPress Blog address."
198
  msgstr ""
199
 
200
  #: C:\Documents
201
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
202
- #: NavXT\trunk/breadcrumb_navxt_admin.php:418
203
- msgid "Home Breadcrumb"
204
  msgstr ""
205
 
206
  #: C:\Documents
207
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
208
- #: NavXT\trunk/breadcrumb_navxt_admin.php:423
209
- msgid "Is in trail"
210
  msgstr ""
211
 
212
  #: C:\Documents
213
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
214
- #: NavXT\trunk/breadcrumb_navxt_admin.php:423
215
- msgid "Should the \"Home\" crumb be placed in the breadcrumb trail?"
216
  msgstr ""
217
 
218
  #: C:\Documents
219
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
220
- #: NavXT\trunk/breadcrumb_navxt_admin.php:427
221
- msgid "Links to Homepage"
222
  msgstr ""
223
 
224
  #: C:\Documents
225
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
226
- #: NavXT\trunk/breadcrumb_navxt_admin.php:427
227
- msgid "Should the Home crumb link to the home page?"
228
  msgstr ""
229
 
230
  #: C:\Documents
231
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
232
- #: NavXT\trunk/breadcrumb_navxt_admin.php:429
233
- #, php-format
234
- msgid "URL of the Homepage is %s"
235
  msgstr ""
236
 
237
  #: C:\Documents
238
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
239
- #: NavXT\trunk/breadcrumb_navxt_admin.php:434
240
- msgid "Home Title"
241
  msgstr ""
242
 
243
  #: C:\Documents
244
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
245
- #: NavXT\trunk/breadcrumb_navxt_admin.php:438
246
- msgid "The title applied to the link to the static home page."
247
  msgstr ""
248
 
249
  #: C:\Documents
250
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
251
- #: NavXT\trunk/breadcrumb_navxt_admin.php:444
252
- msgid "Author Page"
253
  msgstr ""
254
 
255
  #: C:\Documents
256
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
257
- #: NavXT\trunk/breadcrumb_navxt_admin.php:448
258
- msgid "Author Prefix"
259
  msgstr ""
260
 
261
  #: C:\Documents
262
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
263
- #: NavXT\trunk/breadcrumb_navxt_admin.php:456
264
- msgid "Author Suffix"
265
  msgstr ""
266
 
267
  #: C:\Documents
268
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
269
- #: NavXT\trunk/breadcrumb_navxt_admin.php:464
270
- msgid "Author Display Format"
271
  msgstr ""
272
 
273
  #: C:\Documents
274
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
275
- #: NavXT\trunk/breadcrumb_navxt_admin.php:475
276
- msgid "Archive Display"
277
  msgstr ""
278
 
279
  #: C:\Documents
280
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
281
- #: NavXT\trunk/breadcrumb_navxt_admin.php:479
282
- msgid "Archive by Category Prefix"
283
  msgstr ""
284
 
285
  #: C:\Documents
286
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
287
- #: NavXT\trunk/breadcrumb_navxt_admin.php:487
288
- msgid "Archive by Category Suffix"
289
  msgstr ""
290
 
291
  #: C:\Documents
292
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
293
- #: NavXT\trunk/breadcrumb_navxt_admin.php:495
294
- msgid "Archive by Date Prefix"
295
  msgstr ""
296
 
297
  #: C:\Documents
298
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
299
- #: NavXT\trunk/breadcrumb_navxt_admin.php:503
300
- msgid "Archive by Date Suffix"
 
301
  msgstr ""
302
 
303
  #: C:\Documents
304
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
305
- #: NavXT\trunk/breadcrumb_navxt_admin.php:511
306
- msgid "Archive by Date Format"
 
307
  msgstr ""
308
 
309
  #: C:\Documents
310
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
311
- #: NavXT\trunk/breadcrumb_navxt_admin.php:517
312
- msgid "e.g. EU: 14 May 2008, US: May 14, 2008, ISO: 2008 May 14"
313
  msgstr ""
314
 
315
  #: C:\Documents
316
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
317
- #: NavXT\trunk/breadcrumb_navxt_admin.php:522
318
- msgid "Archive by Tag Prefix"
319
  msgstr ""
320
 
321
  #: C:\Documents
322
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
323
- #: NavXT\trunk/breadcrumb_navxt_admin.php:530
324
- msgid "Archive by Tag Suffix"
325
  msgstr ""
326
 
327
  #: C:\Documents
328
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
329
- #: NavXT\trunk/breadcrumb_navxt_admin.php:539
330
- msgid "Current Item"
331
  msgstr ""
332
 
333
  #: C:\Documents
334
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
335
- #: NavXT\trunk/breadcrumb_navxt_admin.php:543
336
- msgid "Link Current Item"
337
  msgstr ""
338
 
339
  #: C:\Documents
340
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
341
- #: NavXT\trunk/breadcrumb_navxt_admin.php:554
342
- msgid "Current Item URL Title"
343
  msgstr ""
344
 
345
  #: C:\Documents
346
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
347
- #: NavXT\trunk/breadcrumb_navxt_admin.php:562
348
- msgid "Current Item Style Prefix"
349
  msgstr ""
350
 
351
  #: C:\Documents
352
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
353
- #: NavXT\trunk/breadcrumb_navxt_admin.php:570
354
- msgid "Current Item Style Suffix"
355
  msgstr ""
356
 
357
  #: C:\Documents
358
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
359
- #: NavXT\trunk/breadcrumb_navxt_admin.php:578
360
- msgid "Display Paged Text"
361
  msgstr ""
362
 
363
  #: C:\Documents
364
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
365
- #: NavXT\trunk/breadcrumb_navxt_admin.php:583
366
- msgid "Show that the user is on a page other than the first on posts/archives with multiple pages."
367
  msgstr ""
368
 
369
  #: C:\Documents
370
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
371
- #: NavXT\trunk/breadcrumb_navxt_admin.php:589
372
- msgid "Paged Prefix"
373
  msgstr ""
374
 
375
  #: C:\Documents
376
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
377
- #: NavXT\trunk/breadcrumb_navxt_admin.php:597
378
- msgid "Paged Suffix"
 
 
 
 
 
 
379
  msgstr ""
380
 
381
  #: C:\Documents
382
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
383
- #: NavXT\trunk/breadcrumb_navxt_admin.php:606
384
- msgid "Single Post"
385
  msgstr ""
386
 
387
  #: C:\Documents
388
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
389
- #: NavXT\trunk/breadcrumb_navxt_admin.php:610
390
- msgid "Single Blogpost Prefix"
391
  msgstr ""
392
 
393
  #: C:\Documents
394
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
395
- #: NavXT\trunk/breadcrumb_navxt_admin.php:618
396
- msgid "Single Blogpost Suffix"
397
  msgstr ""
398
 
399
  #: C:\Documents
400
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
401
- #: NavXT\trunk/breadcrumb_navxt_admin.php:626
402
- msgid "Page Prefix"
403
  msgstr ""
404
 
405
  #: C:\Documents
406
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
407
- #: NavXT\trunk/breadcrumb_navxt_admin.php:634
408
- msgid "Page Suffix"
409
  msgstr ""
410
 
411
  #: C:\Documents
412
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
413
- #: NavXT\trunk/breadcrumb_navxt_admin.php:642
414
- msgid "Post Attachment Prefix"
415
  msgstr ""
416
 
417
  #: C:\Documents
418
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
419
- #: NavXT\trunk/breadcrumb_navxt_admin.php:650
420
- msgid "Post Attachment Suffix"
421
  msgstr ""
422
 
423
  #: C:\Documents
424
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
425
- #: NavXT\trunk/breadcrumb_navxt_admin.php:658
426
- msgid "Post Title Max Length"
427
  msgstr ""
428
 
429
  #: C:\Documents
430
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
431
- #: NavXT\trunk/breadcrumb_navxt_admin.php:667
432
- msgid "Taxonomy"
433
  msgstr ""
434
 
435
  #: C:\Documents
436
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
437
- #: NavXT\trunk/breadcrumb_navxt_admin.php:671
438
- msgid "Single Blog Post Taxonomy Display"
439
  msgstr ""
440
 
441
  #: C:\Documents
442
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
443
- #: NavXT\trunk/breadcrumb_navxt_admin.php:676
444
- msgid "Show the taxonomy leading to a post in the breadcrumb trail."
445
  msgstr ""
446
 
447
  #: C:\Documents
448
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
449
- #: NavXT\trunk/breadcrumb_navxt_admin.php:682
450
- msgid "Single Blog Post Taxonomy"
451
  msgstr ""
452
 
453
  #: C:\Documents
454
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
455
- #: NavXT\trunk/breadcrumb_navxt_admin.php:688
456
- msgid "Categories"
457
  msgstr ""
458
 
459
  #: C:\Documents
460
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
461
- #: NavXT\trunk/breadcrumb_navxt_admin.php:694
462
- msgid "Tags"
463
  msgstr ""
464
 
465
  #: C:\Documents
466
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
467
- #: NavXT\trunk/breadcrumb_navxt_admin.php:698
468
- msgid "The taxonomy which the breadcrumb trail will show."
 
 
 
 
 
 
469
  msgstr ""
470
 
471
  #: C:\Documents
472
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
473
- #: NavXT\trunk/breadcrumb_navxt_admin.php:704
474
- msgid "Single Blog Post Category Prefix"
475
  msgstr ""
476
 
477
  #: C:\Documents
478
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
479
- #: NavXT\trunk/breadcrumb_navxt_admin.php:712
480
- msgid "Single Blog Post Category Suffix"
481
  msgstr ""
482
 
483
  #: C:\Documents
484
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
485
- #: NavXT\trunk/breadcrumb_navxt_admin.php:720
486
- msgid "Single Blog Post Tag Prefix"
487
  msgstr ""
488
 
489
  #: C:\Documents
490
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
491
- #: NavXT\trunk/breadcrumb_navxt_admin.php:728
492
- msgid "Single Blog Post Tag Suffix"
493
  msgstr ""
494
 
495
  #: C:\Documents
496
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
497
- #: NavXT\trunk/breadcrumb_navxt_admin.php:737
498
  msgid "Save Changes"
499
  msgstr ""
500
 
2
  msgstr ""
3
  "Project-Id-Version: Breadcrumb NavXT\n"
4
  "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2008-08-24 15:22-0600\n"
6
+ "PO-Revision-Date: 2008-08-24 15:22-0600\n"
7
  "Last-Translator: John Havlik <mtekkmonkey@gmail.com>\n"
8
  "Language-Team: John Havlik <mtekkmonkey@gmail.com>\n"
9
  "MIME-Version: 1.0\n"
16
 
17
  #: C:\Documents
18
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
19
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:55
20
  msgid ""
21
  "<strong>Aborting: WordPress API Malfunction</strong><br /> For some reason the \n"
22
  "\t\t\t\tfunction get_currentuserinfo() did not behave as expected. Your user_level seems to be null.\n"
30
 
31
  #: C:\Documents
32
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
33
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:63
34
  msgid "WordPress version: "
35
  msgstr ""
36
 
37
  #: C:\Documents
38
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
39
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:65
40
  msgid "PHP version: "
41
  msgstr ""
42
 
43
  #: C:\Documents
44
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
45
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:67
46
  msgid "Plug-in version: "
47
  msgstr ""
48
 
49
  #: C:\Documents
50
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
51
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:73
52
  msgid "<strong>Aborting: Insufficient Privleges</strong><br /> Your User Level: "
53
  msgstr ""
54
 
55
  #: C:\Documents
56
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
57
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:75
58
  msgid "<br /> Required User Level: "
59
  msgstr ""
60
 
61
  #: C:\Documents
62
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
63
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:367
64
+ msgid "Settings"
65
+ msgstr ""
66
+
67
+ #: C:\Documents
68
+ #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
69
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:406
70
  msgid "Warning, your version of Breadcrumb NavXT does not match the version supported by this administrative interface. As a result, settings may not work as expected."
71
  msgstr ""
72
 
73
  #: C:\Documents
74
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
75
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:407
76
  msgid "Your Breadcrumb NavXT Administration interface version is "
77
  msgstr ""
78
 
79
  #: C:\Documents
80
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
81
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:408
82
  msgid "Your Breadcrumb NavXT version is "
83
  msgstr ""
84
 
85
  #: C:\Documents
86
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
87
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:414
88
  msgid "Breadcrumb NavXT Settings"
89
  msgstr ""
90
 
91
  #: C:\Documents
92
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
93
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:416
94
  #, php-format
95
+ msgid "Tips for the settings are located below select options. Please refer to the %sdocumentation%s for more detailed explanation of each setting."
 
 
 
 
 
96
  msgstr ""
97
 
98
  #: C:\Documents
99
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
100
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:423
101
  msgid "General"
102
  msgstr ""
103
 
104
  #: C:\Documents
105
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
106
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:427
107
+ msgid "Breadcrumbs Linked"
108
  msgstr ""
109
 
110
  #: C:\Documents
111
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
112
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:432
113
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:516
114
+ msgid "Yes"
115
  msgstr ""
116
 
117
  #: C:\Documents
118
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
119
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:434
120
+ msgid "Allow breadcrumbs in the trail to be linked."
121
  msgstr ""
122
 
123
  #: C:\Documents
124
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
125
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:439
126
+ msgid "Home Breadcrumb"
127
  msgstr ""
128
 
129
  #: C:\Documents
130
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
131
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:445
132
+ msgid "Leave the home breadcrumb out of the trail."
133
  msgstr ""
134
 
135
  #: C:\Documents
136
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
137
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:451
138
+ msgid "Place the home breadcrumb in the trail."
139
  msgstr ""
140
 
141
  #: C:\Documents
142
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
143
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:456
144
+ msgid "Home Title: "
145
  msgstr ""
146
 
147
  #: C:\Documents
148
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
149
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:466
150
+ msgid "Breadcrumb Separator"
151
  msgstr ""
152
 
153
  #: C:\Documents
154
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
155
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:470
156
+ msgid "Placed in between each breadcrumb."
157
  msgstr ""
158
 
159
  #: C:\Documents
160
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
161
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:475
162
+ msgid "Breadcrumb Max Title Length"
163
  msgstr ""
164
 
165
  #: C:\Documents
166
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
167
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:483
168
+ msgid "Home Anchor"
169
  msgstr ""
170
 
171
  #: C:\Documents
172
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
173
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:487
174
+ msgid "The anchor template for the home breadcrumb."
175
  msgstr ""
176
 
177
  #: C:\Documents
178
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
179
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:496
180
+ msgid "Blog Anchor"
181
  msgstr ""
182
 
183
  #: C:\Documents
184
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
185
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:500
186
+ msgid "The anchor template for the blog breadcrumb."
 
187
  msgstr ""
188
 
189
  #: C:\Documents
190
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
191
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:507
192
+ msgid "Current Item"
193
  msgstr ""
194
 
195
  #: C:\Documents
196
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
197
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:511
198
+ msgid "Link Current Item"
199
  msgstr ""
200
 
201
  #: C:\Documents
202
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
203
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:522
204
+ msgid "Current Item Prefix"
205
  msgstr ""
206
 
207
  #: C:\Documents
208
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
209
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:530
210
+ msgid "Current Item Suffix"
211
  msgstr ""
212
 
213
  #: C:\Documents
214
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
215
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:538
216
+ msgid "Current Item Anchor"
217
  msgstr ""
218
 
219
  #: C:\Documents
220
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
221
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:542
222
+ msgid "The anchor template for current item breadcrumbs."
223
  msgstr ""
224
 
225
  #: C:\Documents
226
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
227
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:547
228
+ msgid "Display Paged Text"
229
  msgstr ""
230
 
231
  #: C:\Documents
232
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
233
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:552
234
+ msgid "Show that the user is on a page other than the first on posts/archives with multiple pages."
 
235
  msgstr ""
236
 
237
  #: C:\Documents
238
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
239
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:558
240
+ msgid "Paged Prefix"
241
  msgstr ""
242
 
243
  #: C:\Documents
244
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
245
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:566
246
+ msgid "Paged Suffix"
247
  msgstr ""
248
 
249
  #: C:\Documents
250
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
251
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:575
252
+ msgid "Posts & Pages"
253
  msgstr ""
254
 
255
  #: C:\Documents
256
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
257
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:579
258
+ msgid "Post Prefix"
259
  msgstr ""
260
 
261
  #: C:\Documents
262
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
263
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:587
264
+ msgid "Post Suffix"
265
  msgstr ""
266
 
267
  #: C:\Documents
268
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
269
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:595
270
+ msgid "Post Anchor"
271
  msgstr ""
272
 
273
  #: C:\Documents
274
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
275
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:599
276
+ msgid "The anchor template for post breadcrumbs."
277
  msgstr ""
278
 
279
  #: C:\Documents
280
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
281
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:604
282
+ msgid "Post Taxonomy Display"
283
  msgstr ""
284
 
285
  #: C:\Documents
286
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
287
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:609
288
+ msgid "Show the taxonomy leading to a post in the breadcrumb trail."
289
  msgstr ""
290
 
291
  #: C:\Documents
292
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
293
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:615
294
+ msgid "Post Taxonomy"
295
  msgstr ""
296
 
297
  #: C:\Documents
298
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
299
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:621
300
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:679
301
+ msgid "Categories"
302
  msgstr ""
303
 
304
  #: C:\Documents
305
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
306
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:627
307
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:725
308
+ msgid "Tags"
309
  msgstr ""
310
 
311
  #: C:\Documents
312
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
313
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:631
314
+ msgid "The taxonomy which the breadcrumb trail will show."
315
  msgstr ""
316
 
317
  #: C:\Documents
318
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
319
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:637
320
+ msgid "Page Prefix"
321
  msgstr ""
322
 
323
  #: C:\Documents
324
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
325
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:645
326
+ msgid "Page Suffix"
327
  msgstr ""
328
 
329
  #: C:\Documents
330
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
331
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:653
332
+ msgid "Page Anchor"
333
  msgstr ""
334
 
335
  #: C:\Documents
336
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
337
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:657
338
+ msgid "The anchor template for page breadcrumbs."
339
  msgstr ""
340
 
341
  #: C:\Documents
342
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
343
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:662
344
+ msgid "Attachment Prefix"
345
  msgstr ""
346
 
347
  #: C:\Documents
348
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
349
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:670
350
+ msgid "Attachment Suffix"
351
  msgstr ""
352
 
353
  #: C:\Documents
354
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
355
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:683
356
+ msgid "Archive by Category Prefix"
357
  msgstr ""
358
 
359
  #: C:\Documents
360
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
361
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:691
362
+ msgid "Archive by Category Suffix"
363
  msgstr ""
364
 
365
  #: C:\Documents
366
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
367
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:699
368
+ msgid "Category Prefix"
369
  msgstr ""
370
 
371
  #: C:\Documents
372
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
373
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:707
374
+ msgid "Category Suffix"
375
  msgstr ""
376
 
377
  #: C:\Documents
378
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
379
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:715
380
+ msgid "Category Anchor"
381
+ msgstr ""
382
+
383
+ #: C:\Documents
384
+ #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
385
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:719
386
+ msgid "The anchor template for category breadcrumbs."
387
  msgstr ""
388
 
389
  #: C:\Documents
390
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
391
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:729
392
+ msgid "Archive by Tag Prefix"
393
  msgstr ""
394
 
395
  #: C:\Documents
396
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
397
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:737
398
+ msgid "Archive by Tag Suffix"
399
  msgstr ""
400
 
401
  #: C:\Documents
402
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
403
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:745
404
+ msgid "Tag Prefix"
405
  msgstr ""
406
 
407
  #: C:\Documents
408
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
409
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:753
410
+ msgid "Tag Suffix"
411
  msgstr ""
412
 
413
  #: C:\Documents
414
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
415
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:761
416
+ msgid "Tag Anchor"
417
  msgstr ""
418
 
419
  #: C:\Documents
420
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
421
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:765
422
+ msgid "The anchor template for tag breadcrumbs."
423
  msgstr ""
424
 
425
  #: C:\Documents
426
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
427
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:771
428
+ msgid "Date Archives"
429
  msgstr ""
430
 
431
  #: C:\Documents
432
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
433
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:775
434
+ msgid "Archive by Date Prefix"
435
  msgstr ""
436
 
437
  #: C:\Documents
438
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
439
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:783
440
+ msgid "Archive by Date Suffix"
441
  msgstr ""
442
 
443
  #: C:\Documents
444
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
445
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:791
446
+ msgid "Date Anchor"
447
  msgstr ""
448
 
449
  #: C:\Documents
450
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
451
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:795
452
+ msgid "The anchor template for date breadcrumbs."
453
  msgstr ""
454
 
455
  #: C:\Documents
456
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
457
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:801
458
+ msgid "Miscellaneous"
459
  msgstr ""
460
 
461
  #: C:\Documents
462
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
463
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:805
464
+ msgid "Author Prefix"
465
  msgstr ""
466
 
467
  #: C:\Documents
468
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
469
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:813
470
+ msgid "Author Suffix"
471
  msgstr ""
472
 
473
  #: C:\Documents
474
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
475
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:821
476
+ msgid "Author Display Format"
477
+ msgstr ""
478
+
479
+ #: C:\Documents
480
+ #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
481
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:831
482
+ msgid "Search Prefix"
483
  msgstr ""
484
 
485
  #: C:\Documents
486
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
487
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:839
488
+ msgid "Search Suffix"
489
  msgstr ""
490
 
491
  #: C:\Documents
492
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
493
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:847
494
+ msgid "404 Title"
495
  msgstr ""
496
 
497
  #: C:\Documents
498
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
499
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:855
500
+ msgid "404 Prefix"
501
  msgstr ""
502
 
503
  #: C:\Documents
504
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
505
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:863
506
+ msgid "404 Suffix"
507
  msgstr ""
508
 
509
  #: C:\Documents
510
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
511
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:872
512
  msgid "Save Changes"
513
  msgstr ""
514
 
breadcrumb_navxt_admin.php CHANGED
@@ -3,958 +3,957 @@
3
  Plugin Name: Breadcrumb NavXT - Adminstration Interface
4
  Plugin URI: http://mtekk.weblogs.us/code/breadcrumb-navxt/
5
  Description: Adds a breadcrumb navigation showing the visitor&#39;s path to their current location. This enables the administrative interface for specifying the output of the breadcrumb. For details on how to use this plugin visit <a href="http://mtekk.weblogs.us/code/breadcrumb-navxt/">Breadcrumb NavXT</a>.
6
- Version: 2.1.4
7
  Author: John Havlik
8
  Author URI: http://mtekk.weblogs.us/
9
  */
10
- /*
11
- *
12
- * @author John Havlik
13
- * @author Tom Klingenberg
14
- *
15
- * @todo remove static frontpage options
16
- * @todo put main admin panel logic into one class to better seperate from
17
- * global namespace and to provide better modularization for upgrades.
18
- */
19
-
20
- //Configuration
21
-
22
- $bcn_admin_version = "2.1.4";
23
- $bcn_admin_req = 8;
24
-
25
- //Includes
26
-
27
  //Include the breadcrumb class (if needed)
28
  if(!class_exists('bcn_breadcrumb'))
29
  {
30
- require(dirname(__FILE__) . '/breadcrumb_navxt_class.php');
31
  }
32
  //Include the supplemental functions
33
- require(dirname(__FILE__) . '/breadcrumb_navxt_api.php');
34
-
35
- //Main
36
 
37
- /**
38
- * Ensure the user has the proper permissions. Dies on failure.
39
- *
40
- * @return void
41
- */
42
- function bcn_security()
43
  {
44
- global $userdata, $bcn_admin_req, $bcn_version, $wp_version;
45
- //Make sure $userdata is filled
46
- get_currentuserinfo();
47
- //If the user_levels aren't proper and the user is not an administrator via capabilities
48
- if($userdata->user_level < $bcn_admin_req && $userdata->wp_capabilities['administrator'] != true)
 
 
 
49
  {
50
- //If user_level is null which tends to cause problems for everyone
51
- if($userdata->user_level == NULL)
 
 
 
 
 
 
 
 
 
 
52
  {
53
- _e('<strong>Aborting: WordPress API Malfunction</strong><br /> For some reason the
54
- function get_currentuserinfo() did not behave as expected. Your user_level seems to be null.
55
- This can be resolved by navigationg to the Users section of the WordPress administrative interface.
56
- In this section check the user that you use for administrative purposes. Then under the drop down
57
- labled "change role to..." select administrator. Now click the change button. Should you still
58
- recieve this error please report this bug to the plug-in author. In your report please specify
59
- your WordPress version, PHP version, Apache (or whatever HTTP server you are using) verion, and
60
- the version of the plug-in you are using.<br />', 'breadcrumb_navxt');
61
- _e('WordPress version: ', 'breadcrumb_navxt');
62
- echo $wp_version . '<br />';
63
- _e('PHP version: ', 'breadcrumb_navxt');
64
- echo phpversion() . '<br />';
65
- _e('Plug-in version: ', 'breadcrumb_navxt');
66
- echo $bcn_version . "<br />";
67
  }
68
- //Otherwise we have an anauthorized acess attempt
69
- else
 
 
 
 
 
 
 
 
70
  {
71
- _e('<strong>Aborting: Insufficient Privleges</strong><br /> Your User Level: ', 'breadcrumb_navxt');
72
- echo $userdata->user_level;
73
- _e('<br /> Required User Level: ', 'breadcrumb_navxt');
74
- echo $bcn_admin_req . '<br />';
75
  }
76
- die();
77
  }
78
- }
79
- /**
80
- * Initilizes the administrative interface options if it is a new install, or an upgrade from an incompatible version
81
- *
82
- * @return void
83
- */
84
- function bcn_install()
85
- {
86
- global $bcn_admin_req, $bcn_version;
87
-
88
- bcn_security();
89
- //Check if the database settings are for an old version
90
- if(get_option('bcn_version') != $bcn_admin_version)
91
  {
92
- //First we should clean up old options we don't use anymore
93
- list($major, $minor, $release) = explode('.', get_option('bcn_version'));
94
- //If the old DB version was prior to 2.1.3
95
- if($major <= 2 && $minor <= 1 && $release <= 3)
 
 
96
  {
97
- //Remove old crap
98
- delete_option('bcn_preserve');
99
- delete_option('bcn_static_frontpage');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
100
  }
101
- //No need for using API hacks, we fully controol things here
102
- //We always want to update to our current version
103
- update_option('bcn_version', $bcn_admin_version);
104
- //Add in options if they didn't exist before, load defaults into them
105
- add_option('bcn_url_blog', '');
106
- add_option('bcn_home_display', 'true');
107
- add_option('bcn_home_link', 'true');
108
- add_option('bcn_title_home', 'Home');
109
- add_option('bcn_title_blog', 'Blog');
110
- add_option('bcn_separator', '&nbsp;&gt;&nbsp;');
111
- add_option('bcn_search_prefix', 'Search results for &#39;');
112
- add_option('bcn_search_suffix', '&#39;');
113
- add_option('bcn_author_prefix', 'Posts by ');
114
- add_option('bcn_author_suffix', '');
115
- add_option('bcn_author_display', 'display_name');
116
- add_option('bcn_singleblogpost_prefix', 'Blog article:&nbsp;');
117
- add_option('bcn_singleblogpost_suffix', '');
118
- add_option('bcn_page_prefix', '');
119
- add_option('bcn_page_suffix', '');
120
- add_option('bcn_urltitle_prefix', 'Browse to:&nbsp;');
121
- add_option('bcn_urltitle_suffix', '');
122
- add_option('bcn_archive_category_prefix', 'Archive by category &#39;');
123
- add_option('bcn_archive_category_suffix', '&#39;');
124
- add_option('bcn_archive_date_prefix', 'Archive: ');
125
- add_option('bcn_archive_date_suffix', '');
126
- add_option('bcn_archive_date_format', 'EU');
127
- add_option('bcn_attachment_prefix', 'Attachment:&nbsp;');
128
- add_option('bcn_attachment_suffix', '');
129
- add_option('bcn_archive_tag_prefix', 'Archive by tag &#39;');
130
- add_option('bcn_archive_tag_suffix', '&#39;');
131
- add_option('bcn_title_404', '404');
132
- add_option('bcn_link_current_item', 'false');
133
- add_option('bcn_current_item_urltitle', 'Link of current page (click to refresh)');
134
- add_option('bcn_current_item_style_prefix', '');
135
- add_option('bcn_current_item_style_suffix', '');
136
- add_option('bcn_posttitle_maxlen', 0);
137
- add_option('bcn_paged_display', 'false');
138
- add_option('bcn_paged_prefix', ', Page&nbsp;');
139
- add_option('bcn_paged_suffix', '');
140
- add_option('bcn_singleblogpost_taxonomy', 'category');
141
- add_option('bcn_singleblogpost_taxonomy_display', 'true');
142
- add_option('bcn_singleblogpost_category_prefix', '');
143
- add_option('bcn_singleblogpost_category_suffix', '');
144
- add_option('bcn_singleblogpost_tag_prefix', '');
145
- add_option('bcn_singleblogpost_tag_suffix', '');
146
  }
147
- }
148
- /**
149
- * An alias of bcn_display, exists for legacy compatibility. Use bcn_display instead of this.
150
- *
151
- * @see bcn_display
152
- */
153
- function breadcrumb_nav_xt_display()
154
- {
155
- if(function_exists('_deprecated_function'))
156
  {
157
- _deprecated_function('breadcrumb_nav_xt_display','2.1','bcn_display');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
158
  }
159
- bcn_display();
160
- }
161
- /**
162
- * Creates a bcn_breadcrumb object, sets the options per user specification in the
163
- * administration interface and outputs the breadcrumb
164
- */
165
- function bcn_display()
166
- {
167
- //Playing things really safe here
168
- if(class_exists('bcn_breadcrumb'))
169
  {
170
- //Make new breadcrumb object
171
- $breadcrumb = new bcn_breadcrumb;
172
- //Set the settings
173
- // @todo clean removed in 2.1.3 $breadcrumb->opt['static_frontpage'] = get_option('bcn_static_frontpage');
174
- $breadcrumb->opt['url_blog'] = get_option('bcn_url_blog');
175
- $breadcrumb->opt['home_display'] = get_option('bcn_home_display');
176
- $breadcrumb->opt['home_link'] = get_option('bcn_home_link');
177
- $breadcrumb->opt['title_home'] = get_option('bcn_title_home');
178
- $breadcrumb->opt['title_blog'] = get_option('bcn_title_blog');
179
- $breadcrumb->opt['separator'] = get_option('bcn_separator');
180
- $breadcrumb->opt['search_prefix'] = get_option('bcn_search_prefix');
181
- $breadcrumb->opt['search_suffix'] = get_option('bcn_search_suffix');
182
- $breadcrumb->opt['author_prefix'] = get_option('bcn_author_prefix');
183
- $breadcrumb->opt['author_suffix'] = get_option('bcn_author_suffix');
184
- $breadcrumb->opt['author_display'] = get_option('bcn_author_display');
185
- $breadcrumb->opt['attachment_prefix'] = get_option('bcn_attachment_prefix');
186
- $breadcrumb->opt['attachment_suffix'] = get_option('bcn_attachment_suffix');
187
- $breadcrumb->opt['singleblogpost_prefix'] = get_option('bcn_singleblogpost_prefix');
188
- $breadcrumb->opt['singleblogpost_suffix'] = get_option('bcn_singleblogpost_suffix');
189
- $breadcrumb->opt['page_prefix'] = get_option('bcn_page_prefix');
190
- $breadcrumb->opt['page_suffix'] = get_option('bcn_page_suffix');
191
- $breadcrumb->opt['urltitle_prefix'] = get_option('bcn_urltitle_prefix');
192
- $breadcrumb->opt['urltitle_suffix'] = get_option('bcn_urltitle_suffix');
193
- $breadcrumb->opt['archive_category_prefix'] = get_option('bcn_archive_category_prefix');
194
- $breadcrumb->opt['archive_category_suffix'] = get_option('bcn_archive_category_suffix');
195
- $breadcrumb->opt['archive_date_prefix'] = get_option('bcn_archive_date_prefix');
196
- $breadcrumb->opt['archive_date_suffix'] = get_option('bcn_archive_date_suffix');
197
- $breadcrumb->opt['archive_date_format'] = get_option('bcn_archive_date_format');
198
- $breadcrumb->opt['archive_tag_prefix'] = get_option('bcn_archive_tag_prefix');
199
- $breadcrumb->opt['archive_tag_suffix'] = get_option('bcn_archive_tag_suffix');
200
- $breadcrumb->opt['title_404'] = get_option('bcn_title_404');
201
- $breadcrumb->opt['link_current_item'] = get_option('bcn_link_current_item', 'false');
202
- $breadcrumb->opt['current_item_urltitle'] = get_option('bcn_current_item_urltitle');
203
- $breadcrumb->opt['current_item_style_prefix'] = get_option('bcn_current_item_style_prefix');
204
- $breadcrumb->opt['current_item_style_suffix'] = get_option('bcn_current_item_style_suffix');
205
- $breadcrumb->opt['posttitle_maxlen'] = get_option('bcn_posttitle_maxlen');
206
- $breadcrumb->opt['paged_display'] = get_option('bcn_paged_display');
207
- $breadcrumb->opt['paged_prefix'] = get_option('bcn_paged_prefix');
208
- $breadcrumb->opt['paged_suffix'] = get_option('bcn_paged_suffix');
209
- $breadcrumb->opt['singleblogpost_taxonomy'] = get_option('bcn_singleblogpost_taxonomy');
210
- $breadcrumb->opt['singleblogpost_taxonomy_display'] = get_option('bcn_singleblogpost_taxonomy_display', 'false');
211
- $breadcrumb->opt['singleblogpost_category_prefix'] = get_option('bcn_singleblogpost_category_prefix');
212
- $breadcrumb->opt['singleblogpost_category_suffix'] = get_option('bcn_singleblogpost_category_suffix');
213
- $breadcrumb->opt['singleblogpost_tag_prefix'] = get_option('bcn_singleblogpost_tag_prefix');
214
- $breadcrumb->opt['singleblogpost_tag_suffix'] = get_option('bcn_singleblogpost_tag_suffix');
215
- //Generate the breadcrumb
216
- $breadcrumb->assemble();
217
- //Display the breadcrumb
218
- $breadcrumb->display();
219
  }
220
- }
221
- /**
222
- * bcn_admin_options
223
- *
224
- * Grabs and cleans updates to the settings from the administrative interface
225
- */
226
- function bcn_admin_options()
227
- {
228
- global $wpdb, $bcn_admin_req;
229
-
230
- bcn_security();
231
-
232
- //Do a nonce check, prevent malicious link/form problems
233
- check_admin_referer('bcn_admin_options');
234
-
235
- // @todo clean removed in 2.1.3 update_option('bcn_static_frontpage', bcn_get('static_frontpage'));
236
- bcn_update_option('bcn_url_blog', bcn_get('url_blog'));
237
- bcn_update_option('bcn_home_display', bcn_get('home_display', 'false'));
238
- bcn_update_option('bcn_home_link', bcn_get('home_link', 'false'));
239
- bcn_update_option('bcn_title_home', bcn_get('title_home'));
240
- bcn_update_option('bcn_title_blog', bcn_get('title_blog'));
241
- bcn_update_option('bcn_separator', bcn_get('separator'));
242
- bcn_update_option('bcn_search_prefix', bcn_get('search_prefix'));
243
- bcn_update_option('bcn_search_suffix', bcn_get('search_suffix'));
244
- bcn_update_option('bcn_author_prefix', bcn_get('author_prefix'));
245
- bcn_update_option('bcn_author_suffix', bcn_get('author_suffix'));
246
- bcn_update_option('bcn_author_display', bcn_get('author_display'));
247
- bcn_update_option('bcn_attachment_prefix', bcn_get('attachment_prefix'));
248
- bcn_update_option('bcn_attachment_suffix', bcn_get('attachment_suffix'));
249
- bcn_update_option('bcn_singleblogpost_prefix', bcn_get('singleblogpost_prefix'));
250
- bcn_update_option('bcn_singleblogpost_suffix', bcn_get('singleblogpost_suffix'));
251
- bcn_update_option('bcn_page_prefix', bcn_get('page_prefix'));
252
- bcn_update_option('bcn_page_suffix', bcn_get('page_suffix'));
253
- bcn_update_option('bcn_urltitle_prefix', bcn_get('urltitle_prefix'));
254
- bcn_update_option('bcn_urltitle_suffix', bcn_get('urltitle_suffix'));
255
- bcn_update_option('bcn_archive_category_prefix', bcn_get('archive_category_prefix'));
256
- bcn_update_option('bcn_archive_category_suffix', bcn_get('archive_category_suffix'));
257
- bcn_update_option('bcn_archive_date_prefix', bcn_get('archive_date_prefix'));
258
- bcn_update_option('bcn_archive_date_suffix', bcn_get('archive_date_suffix'));
259
- bcn_update_option('bcn_archive_date_format', bcn_get('archive_date_format'));
260
- bcn_update_option('bcn_archive_tag_prefix', bcn_get('archive_tag_prefix'));
261
- bcn_update_option('bcn_archive_tag_suffix', bcn_get('archive_tag_suffix'));
262
- bcn_update_option('bcn_title_404', bcn_get('title_404'));
263
- bcn_update_option('bcn_link_current_item', bcn_get('link_current_item', 'false'));
264
- bcn_update_option('bcn_current_item_urltitle', bcn_get('current_item_urltitle'));
265
- bcn_update_option('bcn_current_item_style_prefix', bcn_get('current_item_style_prefix'));
266
- bcn_update_option('bcn_current_item_style_suffix', bcn_get('current_item_style_suffix'));
267
- bcn_update_option('bcn_posttitle_maxlen', bcn_get('posttitle_maxlen'));
268
- bcn_update_option('bcn_paged_display', bcn_get('paged_display'));
269
- bcn_update_option('bcn_paged_prefix', bcn_get('paged_prefix'));
270
- bcn_update_option('bcn_paged_suffix', bcn_get('paged_suffix'));
271
- bcn_update_option('bcn_singleblogpost_taxonomy', bcn_get('singleblogpost_taxonomy'));
272
- bcn_update_option('bcn_singleblogpost_taxonomy_display', bcn_get('singleblogpost_taxonomy_display'));
273
- bcn_update_option('bcn_singleblogpost_category_prefix', bcn_get('singleblogpost_category_prefix'));
274
- bcn_update_option('bcn_singleblogpost_category_suffix', bcn_get('singleblogpost_category_suffix'));
275
- bcn_update_option('bcn_singleblogpost_tag_prefix', bcn_get('singleblogpost_tag_prefix'));
276
- bcn_update_option('bcn_singleblogpost_tag_suffix', bcn_get('singleblogpost_tag_suffix'));
277
- }
278
- /**
279
- * bcn_add_page
280
- *
281
- * Creates link to admin interface
282
- */
283
- function bcn_add_page()
284
- {
285
- global $bcn_admin_req;
286
- add_options_page('Breadcrumb NavXT Settings', 'Breadcrumb NavXT', $bcn_admin_req, 'breadcrumb-nav-xt', 'bcn_admin');
287
- }
288
- /**
289
- * bcn_admin
290
- *
291
- * The actual administration interface
292
- */
293
- function bcn_admin()
294
- {
295
- global $bcn_admin_req, $bcn_admin_version, $bcn_version;
296
-
297
- //Makes sure the user has the proper permissions. Dies on failure.
298
- bcn_security();
299
-
300
- //Initilizes l10n domain
301
- bcn_local();
302
-
303
- /*
304
- * compare breadcrumb plugin and breadcrumb admin version with each other
305
- * major and minor version numbering must both match, revision numbers are ignored
306
- */
307
- list($bcn_plugin_major, $bcn_plugin_minor, $bcn_plugin_bugfix) = explode('.', $bcn_version);
308
- list($bcn_admin_major, $bcn_admin_minor, $bcn_admin_bugfix) = explode('.', $bcn_admin_version);
309
- if($bcn_plugin_major != $bcn_admin_major || $bcn_plugin_minor != $bcn_admin_minor)
310
  {
311
- ?>
312
- <div id="message" class="updated fade">
313
- <p><?php _e('Warning, your version of Breadcrumb NavXT does not match the version supported by this administrative interface. As a result, settings may not work as expected.', 'breadcrumb_navxt'); ?></p>
314
- <p><?php _e('Your Breadcrumb NavXT Administration interface version is ', 'breadcrumb_navxt'); echo $bcn_version; ?>.</p>
315
- <p><?php _e('Your Breadcrumb NavXT version is ', 'breadcrumb_navxt'); echo $bcn_admin_version; ?>.</p>
316
- </div>
317
- <?php
 
 
 
 
 
 
 
318
  }
319
- //Output the administration panel (until end of function)
320
- ?>
321
- <div class="wrap"><h2><?php _e('Breadcrumb NavXT Settings', 'breadcrumb_navxt'); ?></h2>
322
- <form action="options-general.php?page=breadcrumb-nav-xt" method="post" id="bcn_admin_options">
323
- <?php wp_nonce_field('bcn_admin_options');?>
324
- <div id="hasadmintabs">
325
- <fieldset id="general" class="bcn_options">
326
- <p><?php
327
- printf(__( 'This administration interface allows the full customization of the breadcrumb output with no loss
328
- of functionality when compared to manual configuration. Each setting is the same as the corresponding
329
- class option, please refer to the
330
- %sdocumentation%s
331
- for more detailed explanation of each setting.', 'breadcrumb_navxt'), '<a title="Go to the Breadcrumb NavXT online documentation" href="http://mtekk.weblogs.us/code/breadcrumb-navxt/breadcrumb-navxt-doc/">', '</a>');
332
- ?></p>
333
- <h3><?php _e('General', 'breadcrumb_navxt'); ?></h3>
334
- <table class="form-table">
335
- <tr valign="top">
336
- <th scope="row">
337
- <label for="title_blog"><?php _e('Blog Title', 'breadcrumb_navxt'); ?></label>
338
- </th>
339
- <td>
340
- <input type="text" name="title_blog" id="title_blog" value="<?php echo bcn_get_option_inputvalue('bcn_title_blog'); ?>" size="32" /><br />
341
- <?php _e('Will be displayed on the home page (when not using a static front page), always links to the main post page.', 'breadcrumb_navxt'); ?>
342
- </td>
343
- </tr>
344
- <tr valign="top">
345
- <th scope="row">
346
- <label for="separator"><?php _e('Breadcrumb Separator', 'breadcrumb_navxt'); ?></label>
347
- </th>
348
- <td>
349
- <input type="text" name="separator" id="separator" value="<?php echo bcn_get_option_inputvalue('bcn_separator'); ?>" size="32" /><br />
350
- <?php _e('Placed in between each breadcrumb.', 'breadcrumb_navxt'); ?>
351
- </td>
352
- </tr>
353
- <tr valign="top">
354
- <th scope="row">
355
- <label for="urltitle_prefix"><?php _e('URL Title Prefix', 'breadcrumb_navxt'); ?></label>
356
- </th>
357
- <td>
358
- <input type="text" name="urltitle_prefix" id="urltitle_prefix" value="<?php echo bcn_get_option_inputvalue('bcn_urltitle_prefix'); ?>" size="32" /><br />
359
- <?php _e('The prefix applied globally to the title field in the breadcrumb links.', 'breadcrumb_navxt'); ?>
360
- </tr>
361
- <tr valign="top">
362
- <th scope="row">
363
- <label for="urltitle_suffix"><?php _e('URL Title Suffix', 'breadcrumb_navxt'); ?></label>
364
- </th>
365
- <td>
366
- <input type="text" name="urltitle_suffix" id="urltitle_suffix" value="<?php echo bcn_get_option_inputvalue('bcn_urltitle_suffix'); ?>" size="32" /><br />
367
- <?php _e('The suffix applied globally to the title field in the breadcrumb links.', 'breadcrumb_navxt'); ?>
368
- </td>
369
- </tr>
370
- <tr valign="top">
371
- <th scope="row">
372
- <label for="search_prefix"><?php _e('Search Prefix', 'breadcrumb_navxt'); ?></label>
373
- </th>
374
- <td>
375
- <input type="text" name="search_prefix" id="search_prefix" value="<?php echo bcn_get_option_inputvalue('bcn_search_prefix'); ?>" size="32" />
376
- </td>
377
- </tr>
378
- <tr valign="top">
379
- <th scope="row">
380
- <label for="search_suffix"><?php _e('Search Suffix', 'breadcrumb_navxt'); ?></label>
381
- </th>
382
- <td>
383
- <input type="text" name="search_suffix" id="search_suffix" value="<?php echo bcn_get_option_inputvalue('bcn_search_suffix'); ?>" size="32" />
384
- </td>
385
- </tr>
386
- <tr valign="top">
387
- <th scope="row">
388
- <label for="title_404"><?php _e('404 Title', 'breadcrumb_navxt'); ?></label>
389
- </th>
390
- <td>
391
- <input type="text" name="title_404" id="title_404" value="<?php echo bcn_get_option_inputvalue('bcn_title_404'); ?>" size="32" />
392
- </td>
393
- </tr>
394
- </table>
395
- </fieldset>
396
- <fieldset id="static_front_page" class="bcn_options">
397
- <h3><?php _e('Front Page', 'breadcrumb_navxt'); ?></h3>
398
- <table class="form-table">
399
- <tr valign="top">
400
- <th scope="row">
401
- <?php _e('Static Front Page', 'breadcrumb_navxt'); ?>
402
- </th>
403
- <td>
404
- <span id="static_frontpage_ex"><?php echo __(bcn_wp_has_static_frontpage() ? 'Yes': 'No'); ?></span>
405
- </td>
406
- </tr>
407
- <tr valign="top">
408
- <th scope="row">
409
- <label for="url_blog"><?php _e('Relative Blog URL', 'breadcrumb_navxt'); ?></label>
410
- </th>
411
- <td>
412
- <input type="text" name="url_blog" id="url_blog" value="<?php echo bcn_get_option_inputvalue('bcn_url_blog'); ?>" size="32" /><br />
413
- <?php _e('The location of the page that contains posts relative to the WordPress Blog address.', 'breadcrumb_navxt'); ?>
414
- </td>
415
- </tr>
416
- <tr valign="top">
417
- <th scope="row">
418
- <?php _e('Home Breadcrumb', 'breadcrumb_navxt'); ?>
419
- </th>
420
- <td>
421
- <label for="home_display">
422
- <input name="home_display" type="checkbox" id="home_display" value="true" <?php checked('true', get_option('bcn_home_display')); ?> />
423
- <?php _e('Is in trail', 'breadcrumb_navxt') ?> - <?php _e('Should the "Home" crumb be placed in the breadcrumb trail?', 'breadcrumb_navxt'); ?>
424
- </label><br />
425
- <label for="home_link">
426
- <input name="home_link" type="checkbox" id="home_link" value="true" <?php checked('true', get_option('bcn_home_link')); ?> />
427
- <?php _e('Links to Homepage', 'breadcrumb_navxt') ?> - <?php _e('Should the "Home" crumb link to the home page?', 'breadcrumb_navxt'); ?>
428
- </label><br />
429
- <?php printf(__('URL of the Homepage is %s', 'breadcrumb_navxt'), sprintf('<em>%s</em>', bcn_wp_url_home())) ?>
430
- </td>
431
- </tr>
432
- <tr valign="top">
433
- <th scope="row">
434
- <label for="title_home"><?php _e('Home Title', 'breadcrumb_navxt'); ?></label>
435
- </th>
436
- <td>
437
- <input type="text" name="title_home" id="title_home" value="<?php echo bcn_get_option_inputvalue('bcn_title_home'); ?>" size="32" /><br />
438
- <?php _e('The title applied to the link to the static home page.', 'breadcrumb_navxt'); ?>
439
- </td>
440
- </tr>
441
- </table>
442
- </fieldset>
443
- <fieldset id="author" class="bcn_options">
444
- <h3><?php _e('Author Page', 'breadcrumb_navxt'); ?></h3>
445
- <table class="form-table">
446
- <tr valign="top">
447
- <th scope="row">
448
- <label for="author_prefix"><?php _e('Author Prefix', 'breadcrumb_navxt'); ?></label>
449
- </th>
450
- <td>
451
- <input type="text" name="author_prefix" id="author_prefix" value="<?php echo bcn_get_option_inputvalue('bcn_author_prefix'); ?>" size="32" />
452
- </td>
453
- </tr>
454
- <tr valign="top">
455
- <th scope="row">
456
- <label for="author_suffix"><?php _e('Author Suffix', 'breadcrumb_navxt'); ?></label>
457
- </th>
458
- <td>
459
- <input type="text" name="author_suffix" id="author_suffix" value="<?php echo bcn_get_option_inputvalue('bcn_author_suffix'); ?>" size="32" />
460
- </td>
461
- </tr>
462
- <tr valign="top">
463
- <th scope="row">
464
- <label for="author_display"><?php _e('Author Display Format', 'breadcrumb_navxt'); ?></label>
465
- </th>
466
- <td>
467
- <select name="author_display" id="author_display">
468
- <?php bcn_select_options('bcn_author_display', array("display_name", "nickname", "first_name", "last_name")); ?>
469
- </select>
470
- </td>
471
- </tr>
472
- </table>
473
- </fieldset>
474
- <fieldset id="category" class="bcn_options">
475
- <h3><?php _e('Archive Display', 'breadcrumb_navxt'); ?></h3>
476
- <table class="form-table">
477
- <tr valign="top">
478
- <th scope="row">
479
- <label for="archive_category_prefix"><?php _e('Archive by Category Prefix', 'breadcrumb_navxt'); ?></label>
480
- </th>
481
- <td>
482
- <input type="text" name="archive_category_prefix" id="archive_category_prefix" value="<?php echo bcn_get_option_inputvalue('bcn_archive_category_prefix'); ?>" size="32" />
483
- </td>
484
- </tr>
485
- <tr valign="top">
486
- <th scope="row">
487
- <label for="archive_category_suffix"><?php _e('Archive by Category Suffix', 'breadcrumb_navxt'); ?></label>
488
- </th>
489
- <td>
490
- <input type="text" name="archive_category_suffix" id="archive_category_suffix" value="<?php echo bcn_get_option_inputvalue('bcn_archive_category_suffix'); ?>" size="32" />
491
- </td>
492
- </tr>
493
- <tr valign="top">
494
- <th scope="row">
495
- <label for="archive_date_prefix"><?php _e('Archive by Date Prefix', 'breadcrumb_navxt'); ?></label>
496
- </th>
497
- <td>
498
- <input type="text" name="archive_date_prefix" id="archive_date_prefix" value="<?php echo bcn_get_option_inputvalue('bcn_archive_date_prefix'); ?>" size="32" />
499
- </td>
500
- </tr>
501
- <tr valign="top">
502
- <th scope="row">
503
- <label for="archive_date_suffix"><?php _e('Archive by Date Suffix', 'breadcrumb_navxt'); ?></label>
504
- </th>
505
- <td>
506
- <input type="text" name="archive_date_suffix" id="archive_date_suffix" value="<?php echo bcn_get_option_inputvalue('bcn_archive_date_suffix'); ?>" size="32" />
507
- </td>
508
- </tr>
509
- <tr valign="top">
510
- <th scope="row">
511
- <label for="archive_date_format"><?php _e('Archive by Date Format', 'breadcrumb_navxt'); ?></label>
512
- </th>
513
- <td>
514
- <select name="archive_date_format" id="archive_date_format">
515
- <?php bcn_select_options('bcn_archive_date_format', array("EU", "US", "ISO")); ?>
516
- </select><br />
517
- <?php _e('e.g. EU: 14 May 2008, US: May 14, 2008, ISO: 2008 May 14', 'breadcrumb_navxt'); ?>
518
- </td>
519
- </tr>
520
- <tr valign="top">
521
- <th scope="row">
522
- <label for="archive_tag_prefix"><?php _e('Archive by Tag Prefix', 'breadcrumb_navxt'); ?></label>
523
- </th>
524
- <td>
525
- <input type="text" name="archive_tag_prefix" id="archive_tag_prefix" value="<?php echo bcn_get_option_inputvalue('bcn_archive_tag_prefix'); ?>" size="32" />
526
- </td>
527
- </tr>
528
- <tr valign="top">
529
- <th scope="row">
530
- <label for="archive_tag_suffix"><?php _e('Archive by Tag Suffix', 'breadcrumb_navxt'); ?></label>
531
- </th>
532
- <td>
533
- <input type="text" name="archive_tag_suffix" id="archive_tag_suffix" value="<?php echo bcn_get_option_inputvalue('bcn_archive_tag_suffix'); ?>" size="32" />
534
- </td>
535
- </tr>
536
- </table>
537
- </fieldset>
538
- <fieldset id="current" class="bcn_options">
539
- <h3><?php _e('Current Item', 'breadcrumb_navxt'); ?></h3>
540
- <table class="form-table">
541
- <tr valign="top">
542
- <th scope="row">
543
- <label for="link_current_item"><?php _e('Link Current Item', 'breadcrumb_navxt'); ?></label>
544
- </th>
545
- <td>
546
- <label>
547
- <input name="link_current_item" type="checkbox" id="link_current_item" value="true" <?php checked('true', bcn_get_option('bcn_link_current_item')); ?> />
548
- <?php _e('Yes'); ?>
549
- </label>
550
- </td>
551
- </tr>
552
- <tr valign="top">
553
- <th scope="row">
554
- <label for="current_item_urltitle"><?php _e('Current Item URL Title', 'breadcrumb_navxt'); ?></label>
555
- </th>
556
- <td>
557
- <input type="text" name="current_item_urltitle" id="current_item_urltitle" value="<?php echo bcn_get_option_inputvalue('bcn_current_item_urltitle'); ?>" size="32" />
558
- </td>
559
- </tr>
560
- <tr valign="top">
561
- <th scope="row">
562
- <label for="current_item_style_prefix"><?php _e('Current Item Style Prefix', 'breadcrumb_navxt'); ?></label>
563
- </th>
564
- <td>
565
- <input type="text" name="current_item_style_prefix" id="current_item_style_prefix" value="<?php echo bcn_get_option_inputvalue('bcn_current_item_style_prefix'); ?>" size="32" />
566
- </td>
567
- </tr>
568
- <tr valign="top">
569
- <th scope="row">
570
- <label for="current_item_style_suffix"><?php _e('Current Item Style Suffix', 'breadcrumb_navxt'); ?></label>
571
- </th>
572
- <td>
573
- <input type="text" name="current_item_style_suffix" id="current_item_style_suffix" value="<?php echo bcn_get_option_inputvalue('bcn_current_item_style_suffix'); ?>" size="32" />
574
- </td>
575
- </tr>
576
- <tr valign="top">
577
- <th scope="row">
578
- <label for="paged_display"><?php _e('Display Paged Text', 'breadcrumb_navxt'); ?></label>
579
- </th>
580
- <td>
581
- <label>
582
- <input name="paged_display" type="checkbox" id="paged_display" value="true" <?php checked('true', bcn_get_option('bcn_paged_display')); ?> />
583
- <?php _e('Show that the user is on a page other than the first on posts/archives with multiple pages.', 'breadcrumb_navxt'); ?>
584
- </label>
585
- </td>
586
- </tr>
587
- <tr valign="top">
588
- <th scope="row">
589
- <label for="paged_prefix"><?php _e('Paged Prefix', 'breadcrumb_navxt'); ?></label>
590
- </th>
591
- <td>
592
- <input type="text" name="paged_prefix" id="paged_prefix" value="<?php echo bcn_get_option_inputvalue('bcn_paged_prefix'); ?>" size="32" />
593
- </td>
594
- </tr>
595
- <tr valign="top">
596
- <th scope="row">
597
- <label for="paged_suffix"><?php _e('Paged Suffix', 'breadcrumb_navxt'); ?></label>
598
- </th>
599
- <td>
600
- <input type="text" name="paged_suffix" id="paged_suffix" value="<?php echo bcn_get_option_inputvalue('bcn_paged_suffix'); ?>" size="32" />
601
- </td>
602
- </tr>
603
- </table>
604
- </fieldset>
605
- <fieldset id="single" class="bcn_options">
606
- <h3><?php _e('Single Post', 'breadcrumb_navxt'); ?></h3>
607
- <table class="form-table">
608
- <tr valign="top">
609
- <th scope="row">
610
- <label for="singleblogpost_prefix"><?php _e('Single Blogpost Prefix', 'breadcrumb_navxt'); ?></label>
611
- </th>
612
- <td>
613
- <input type="text" name="singleblogpost_prefix" id="singleblogpost_prefix" value="<?php echo bcn_get_option_inputvalue('bcn_singleblogpost_prefix'); ?>" size="32" />
614
- </td>
615
- </tr>
616
- <tr valign="top">
617
- <th scope="row">
618
- <label for="singleblogpost_suffix"><?php _e('Single Blogpost Suffix', 'breadcrumb_navxt'); ?></label>
619
- </th>
620
- <td>
621
- <input type="text" name="singleblogpost_suffix" id="singleblogpost_suffix" value="<?php echo bcn_get_option_inputvalue('bcn_singleblogpost_suffix'); ?>" size="32" />
622
- </td>
623
- </tr>
624
- <tr valign="top">
625
- <th scope="row">
626
- <label for="page_prefix"><?php _e('Page Prefix', 'breadcrumb_navxt'); ?></label>
627
- </th>
628
- <td>
629
- <input type="text" name="page_prefix" id="page_prefix" value="<?php echo bcn_get_option_inputvalue('bcn_page_prefix'); ?>" size="32" />
630
- </td>
631
- </tr>
632
- <tr valign="top">
633
- <th scope="row">
634
- <label for="page_suffix"><?php _e('Page Suffix', 'breadcrumb_navxt'); ?></label>
635
- </th>
636
- <td>
637
- <input type="text" name="page_suffix" id="page_suffix" value="<?php echo bcn_get_option_inputvalue('bcn_page_suffix'); ?>" size="32" />
638
- </td>
639
- </tr>
640
- <tr valign="top">
641
- <th scope="row">
642
- <label for="attachment_prefix"><?php _e('Post Attachment Prefix', 'breadcrumb_navxt'); ?></label>
643
- </th>
644
- <td>
645
- <input type="text" name="attachment_prefix" id="attachment_prefix" value="<?php echo bcn_get_option_inputvalue('bcn_attachment_prefix'); ?>" size="32" />
646
- </td>
647
- </tr>
648
- <tr valign="top">
649
- <th scope="row">
650
- <label for="attachment_suffix"><?php _e('Post Attachment Suffix', 'breadcrumb_navxt'); ?></label>
651
- </th>
652
- <td>
653
- <input type="text" name="attachment_suffix" id="attachment_suffix" value="<?php echo bcn_get_option_inputvalue('bcn_attachment_suffix'); ?>" size="32" />
654
- </td>
655
- </tr>
656
- <tr valign="top">
657
- <th scope="row">
658
- <label for="title_home"><?php _e('Post Title Max Length', 'breadcrumb_navxt'); ?></label>
659
- </th>
660
- <td>
661
- <input type="text" name="posttitle_maxlen" id="posttitle_maxlen" value="<?php echo bcn_get_option_inputvalue('bcn_posttitle_maxlen'); ?>" size="10" />
662
- </td>
663
- </tr>
664
- </table>
665
- </fieldset>
666
- <fieldset id="taxonomy" class="bcn_options">
667
- <h3><?php _e('Taxonomy', 'breadcrumb_navxt'); ?></h3>
668
- <table class="form-table">
669
- <tr valign="top">
670
- <th scope="row">
671
- <?php _e('Single Blog Post Taxonomy Display', 'breadcrumb_navxt'); ?>
672
- </th>
673
- <td>
674
- <label for="singleblogpost_taxonomy_display">
675
- <input name="singleblogpost_taxonomy_display" type="checkbox" id="singleblogpost_taxonomy_display" value="true" <?php checked('true', bcn_get_option('bcn_singleblogpost_taxonomy_display')); ?> />
676
- <?php _e('Show the taxonomy leading to a post in the breadcrumb trail.', 'breadcrumb_navxt'); ?>
677
- </label>
678
- </td>
679
- </tr>
680
- <tr valign="top">
681
- <th scope="row">
682
- <p><?php _e('Single Blog Post Taxonomy', 'breadcrumb_navxt'); ?></p>
683
- </th>
684
- <td>
685
- <p>
686
- <label>
687
- <input name="singleblogpost_taxonomy" type="radio" value="category" class="togx" <?php checked('category', bcn_get_option('bcn_singleblogpost_taxonomy')); ?> />
688
- <?php _e('Categories'); ?>
689
- </label>
690
- </p>
691
- <p>
692
- <label>
693
- <input name="singleblogpost_taxonomy" type="radio" value="tag" class="togx" <?php checked('tag', bcn_get_option('bcn_singleblogpost_taxonomy')); ?> />
694
- <?php _e('Tags'); ?>
695
- </label>
696
- </p>
697
- <p>
698
- <?php _e('The taxonomy which the breadcrumb trail will show.', 'breadcrumb_navxt'); ?>
699
- </p>
700
- </td>
701
- </tr>
702
- <tr valign="top">
703
- <th scope="row">
704
- <label for="singleblogpost_category_prefix"><?php _e('Single Blog Post Category Prefix', 'breadcrumb_navxt'); ?></label>
705
- </th>
706
- <td>
707
- <input type="text" name="singleblogpost_category_prefix" id="singleblogpost_category_prefix" value="<?php echo bcn_get_option_inputvalue('bcn_singleblogpost_category_prefix'); ?>" size="32" />
708
- </td>
709
- </tr>
710
- <tr valign="top">
711
- <th scope="row">
712
- <label for="singleblogpost_category_suffix"><?php _e('Single Blog Post Category Suffix', 'breadcrumb_navxt'); ?></label>
713
- </th>
714
- <td>
715
- <input type="text" name="singleblogpost_category_suffix" id="singleblogpost_category_suffix" value="<?php echo bcn_get_option_inputvalue('bcn_singleblogpost_category_suffix'); ?>" size="32" />
716
- </td>
717
- </tr>
718
- <tr valign="top">
719
- <th scope="row">
720
- <label for="singleblogpost_tag_prefix"><?php _e('Single Blog Post Tag Prefix', 'breadcrumb_navxt'); ?></label>
721
- </th>
722
- <td>
723
- <input type="text" name="singleblogpost_tag_prefix" id="singleblogpost_tag_prefix" value="<?php echo bcn_get_option_inputvalue('bcn_singleblogpost_tag_prefix'); ?>" size="32" />
724
- </td>
725
- </tr>
726
- <tr valign="top">
727
- <th scope="row">
728
- <label for="singleblogpost_tag_suffix"><?php _e('Single Blog Post Tag Suffix', 'breadcrumb_navxt'); ?></label>
729
- </th>
730
- <td>
731
- <input type="text" name="singleblogpost_tag_suffix" id="singleblogpost_tag_suffix" value="<?php echo bcn_get_option_inputvalue('bcn_singleblogpost_tag_suffix'); ?>" size="32" />
732
- </td>
733
- </tr>
734
- </table>
735
- </fieldset>
736
- </div>
737
- <p class="submit"><input type="submit" name="bcn_admin_options" value="<?php _e('Save Changes') ?>" /></p>
738
- </form>
739
- </div>
740
- <?php
741
- }
742
- /**
743
- * bcn_select_options
744
- *
745
- * displays wordpress options as <seclect> options defaults to true/false
746
- *
747
- * @param (string) optionname name of wordpress options store
748
- * @param (array) options array of options defaults to array('true','false')
749
- */
750
- function bcn_select_options($optionname, $options = array('true','false'))
751
- {
752
- $value = get_option($optionname);
753
- //First output the current value
754
- if ($value)
755
  {
756
- printf('<option>%s</option>', $value);
 
 
 
 
 
 
 
 
757
  }
758
- //Now do the rest
759
- foreach($options as $option)
 
 
 
 
 
760
  {
761
- //Don't want multiple occurance of the current value
762
- if($option != $value)
 
 
 
 
 
 
 
 
763
  {
764
- printf('<option>%s</option>', $option);
765
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
766
  }
767
- }
768
- /**
769
- * Additional styles and scripts for admin interface
770
- *
771
- * @todo do not add to any admin page
772
- */
773
- function bcn_options_style()
774
- {
775
- //wp_version is needed for version checks performed in this function
776
- global $wp_version;
777
-
778
- //setup styles for admn and tabbed admin page
779
- ?>
780
- <style type="text/css">
781
- .bcn_options{border: none;}
782
- .form-table .form-table-inner td {border:none; height:normal; line-height:normal; margin:0; padding:0 8px 0 0; vertical-align: top;}
783
- .form-table .form-table-inner tr.spaced td {padding-bottom:6px;}
784
  /**
785
- * Tabbed Admin Page (CSS)
786
- *
787
- * unobtrusive approach to add tabbed forms into
788
- * the wordpress admin panel
789
  *
790
- * @note unstable
791
- * @see http://www.artnorm.de/this-morning-in-bleeding,105,2008-06.html
792
- * @see breadcrumb navxt
793
- * @author Tom Klingenberg
794
- * @cssdoc 1.0-pre
795
- * @colordef #fff white (tab background)
796
- * @colordef #c6d9e9 grey-blue (tab line)
797
- * @colordef #d54e21 orange (tab text of active tab)
798
- * @colordef #d54e21 orange (tab text of inactive tab hovered) external
799
- * @colordef #2583ad dark-blue (tab text of inactive tab) external
800
  */
801
- ul.ui-tabs-nav {background:#fff; border-bottom:1px solid #c6d9e9; font-size:12px; height:29px; margin:13px 0 0; padding:0; padding-left:8px; list-style:none;}
802
- ul.ui-tabs-nav li {display:inline; line-height: 200%; list-style:none; margin: 0; padding:0; position:relative; top:1px; text-align:center; white-space:nowrap;}
803
- ul.ui-tabs-nav li a {background:transparent none no-repeat scroll 0%; border:1px transparent #fff; border-bottom:1px solid #c6d9e9; display:block; float:left; line-height:28px; padding:1px 13px 0; position:relative; text-decoration:none;}
804
- ul.ui-tabs-nav li.ui-tabs-selected a {-moz-border-radius-topleft:4px; -moz-border-radius-topright:4px; background:#fff; border:1px solid #c6d9e9; border-bottom-color:#fff; color:#d54e21; font-weight:normal; padding:0 12px;}
805
- ul.ui-tabs-nav a:focus, a:active {outline: none;}
806
- #hasadmintabs fieldset {clear:both;}
807
- </style>
808
- <?php
809
- /*
810
- * needed javascript libraries are included now
811
- * add own javascript code now
812
- */
813
- ?>
814
- <script type="text/javascript">
815
- /* <![CDATA[ */
816
  /**
817
- * Tabbed Admin Page (jQuery)
818
  *
819
- * unobtrusive approach to add tabbed forms into
820
- * the wordpress admin panel
821
- *
822
- * @note unstable
823
- * @see http://www.artnorm.de/this-morning-in-bleeding,105,2008-06.html
824
- * @see breadcrumb navxt
825
- * @author Tom Klingenberg
826
- * @uses jQuery
827
- * @uses ui.core
828
- * @uses ui.tabs
829
  */
830
-
831
- jQuery(document).ready(function()
832
  {
833
- bcn_tabulator_init();
834
- });
835
-
836
  /**
837
- * Tabulator Bootup
 
 
838
  */
839
- function bcn_tabulator_init()
840
  {
841
- bcn_admin_init_tabs();
842
- bcn_admin_gobal_tabs(); // comment out this like to disable tabs in admin
843
-
844
  }
845
-
846
  /**
847
- * inittialize tabs for admin panel pages (wordpress core)
 
 
848
  *
849
- * @todo add uniqueid somehow
850
- */
851
- function bcn_admin_gobal_tabs()
852
- {
853
- /* if has already a special id quit the global try here */
854
- if (jQuery('#hasadmintabs').length > 0) return;
855
-
856
- jQuery('#wpbody .wrap form').each(function(f)
857
- {
858
- var $formEle = jQuery(this).children();
859
-
860
- var $eleSets = new Array();
861
- var $eleSet = new Array();
862
- var $eleSetIgnore = new Array();
863
-
864
- for (var i = 0; i < $formEle.size(); i++)
865
  {
866
- var curr = $formEle.get(i);
867
- var $curr = jQuery(curr);
868
- // cut condition: h3 or stop
869
- // stop: p.submit
870
- if ($curr.is('p.submit') || $curr.is('h3'))
871
- {
872
- if ($eleSet.length)
873
- {
874
- if ($eleSets.length == 0 && $eleSet.length == 1 && jQuery($eleSet).is('p')) {
875
- $eleSetIgnore = $eleSetIgnore.concat($eleSet);
876
- } else {
877
- $eleSets.push($eleSet);
878
- }
879
- $eleSet = new Array();
880
- }
881
- if ($curr.is('p.submit')) break;
882
- $eleSet.push(curr);
883
- } else {
884
- // handle ingnore bag - works only before the first set is created
885
- var pushto = $eleSet;
886
- if ($eleSets.length == 0 && $curr.is("input[type='hidden']"))
887
- {
888
- pushto = $eleSetIgnore;
889
- }
890
- pushto.push(curr);
891
- }
892
- }
893
-
894
- // if the page has only one set, quit
895
- if ($eleSets.length < 2) return;
896
-
897
- // tabify
898
- formid = 'tabulator-tabs-form-' + f;
899
- jQuery($eleSetIgnore).filter(':last').after('<div id="' + formid + '"></div>');
900
- jQuery('#'+formid).prepend("<ul><\/ul>");
901
- var tabcounter = 0;
902
- jQuery.each($eleSets, function() {
903
- tabcounter++;
904
- id = formid + '-tab-' + tabcounter;
905
- hash3 = true;
906
- h3probe = jQuery(this).filter('h3').eq(0);
907
- if (h3probe.is('h3')) {
908
- caption = h3probe.text();
909
- } else {
910
- hash3 = false;
911
- caption = jQuery('#wpbody .wrap h2').eq(0).text();
912
- }
913
- if (caption == ''){
914
- caption = 'FALLBACK';
915
- }
916
- tabdiv = jQuery(this).wrapAll('<span id="'+id+'"></span>');
917
- jQuery('#'+formid+' > ul').append('<li><a href="#'+id+'"><span>'+caption+"<\/span><\/a><\/li>");
918
- if (hash3) h3probe.hide();
919
- });
920
- jQuery('#'+formid+' > ul').tabs();
921
- });
922
  }
923
-
924
  /**
925
- * inittialize tabs for breadcrumb navxt admin panel
926
- */
927
- function bcn_admin_init_tabs()
 
 
 
 
 
928
  {
929
- jQuery('#hasadmintabs').prepend("<ul><\/ul>");
930
- jQuery('#hasadmintabs > fieldset').each(function(i)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
931
  {
932
- id = jQuery(this).attr('id');
933
- caption = jQuery(this).find('h3').text();
934
- jQuery('#hasadmintabs > ul').append('<li><a href="#'+id+'"><span>'+caption+"<\/span><\/a><\/li>");
935
- jQuery(this).find('h3').hide();
936
- });
937
- jQuery("#hasadmintabs > ul").tabs();
938
  }
939
- /* ]]> */
940
- </script>
941
- <?php
942
  }
943
-
944
- //WordPress hooks
945
- if(function_exists('add_action')){
946
- //Installation Script hook
947
- add_action('activate_breadcrumb-navxt/breadcrumb_navxt_admin.php','bcn_install');
948
- //WordPress Admin interface hook
949
- add_action('admin_menu', 'bcn_add_page');
950
- //add_action('admin_head', 'bcn_options_style');
951
- //Enque javscript dependencies
952
- //wp_enqueue_script('jquery-ui-tabs');
953
- //Admin Options hook
954
- if(isset($_POST['bcn_admin_options']))
955
- {
956
- add_action('init', 'bcn_admin_options');
957
- }
 
 
 
958
  }
959
-
960
  ?>
3
  Plugin Name: Breadcrumb NavXT - Adminstration Interface
4
  Plugin URI: http://mtekk.weblogs.us/code/breadcrumb-navxt/
5
  Description: Adds a breadcrumb navigation showing the visitor&#39;s path to their current location. This enables the administrative interface for specifying the output of the breadcrumb. For details on how to use this plugin visit <a href="http://mtekk.weblogs.us/code/breadcrumb-navxt/">Breadcrumb NavXT</a>.
6
+ Version: 2.1.99
7
  Author: John Havlik
8
  Author URI: http://mtekk.weblogs.us/
9
  */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10
  //Include the breadcrumb class (if needed)
11
  if(!class_exists('bcn_breadcrumb'))
12
  {
13
+ require_once(dirname(__FILE__) . '/breadcrumb_navxt_class.php');
14
  }
15
  //Include the supplemental functions
16
+ require_once(dirname(__FILE__) . '/breadcrumb_navxt_api.php');
 
 
17
 
18
+ //The administrative interface class
19
+ class bcn_admin
 
 
 
 
20
  {
21
+ private $version;
22
+ private $breadcrumb_trail;
23
+ /**
24
+ * bcn_admin
25
+ *
26
+ * Administrative interface class default constructor
27
+ */
28
+ function bcn_admin()
29
  {
30
+ //Setup our internal version
31
+ $this->version = "3.0.0";
32
+ //We'll let the fail fataly if the class isn't there as we depend on it
33
+ $this->breadcrumb_trail = new bcn_breadcrumb_trail;
34
+ //Installation Script hook
35
+ add_action('activate_breadcrumb-navxt/breadcrumb_navxt_admin.php', array(&$this, 'install'));
36
+ //WordPress Admin interface hook
37
+ add_action('admin_menu', array(&$this, 'add_page'));
38
+ //WordPress Hook for the widget
39
+ add_action('plugins_loaded', array(&$this, 'register_widget'));
40
+ //Admin Options hook
41
+ if(isset($_POST['bcn_admin_options']))
42
  {
43
+ add_action('init', array(&$this, 'update'));
 
 
 
 
 
 
 
 
 
 
 
 
 
44
  }
45
+ }
46
+ /**
47
+ * security
48
+ *
49
+ * Makes sure the current user can manage options to proceed
50
+ */
51
+ function security()
52
+ {
53
+ //If the user can not manage options we will die on them
54
+ if(!current_user_can('manage_options'))
55
  {
56
+ _e('Insufficient privileges to proceed.', 'breadcrumb_navxt');
57
+ die();
 
 
58
  }
 
59
  }
60
+ /**
61
+ * install
62
+ *
63
+ * This setsup and upgrades the database settings, runs on every activation
64
+ */
65
+ function install()
 
 
 
 
 
 
 
66
  {
67
+ //Call our little security function
68
+ $this->security();
69
+ //Reduce db queries by saving this
70
+ $db_version = get_option('bcn_version');
71
+ //If our version is not the same as in the db, time to update
72
+ if($db_version !== $this->version)
73
  {
74
+ //Split up the db version into it's components
75
+ list($major, $minor, $release) = explode('.', $db_version);
76
+ //For upgrading from 2.2.x betas
77
+ if($major < 3 && $major > 1)
78
+ {
79
+ //Migrate over stuff
80
+ $this->breadcrumb_trail->opt['home_display'] = str2bool(get_option('bcn_home_display'));
81
+ $this->breadcrumb_trail->opt['home_title'] = get_option('bcn_home_title');
82
+ $this->breadcrumb_trail->opt['home_anchor'] = get_option('bcn_home_anchor');
83
+ $this->breadcrumb_trail->opt['blog_anchor'] = get_option('bcn_blog_anchor');
84
+ $this->breadcrumb_trail->opt['separator'] = get_option('bcn_separator');
85
+ $this->breadcrumb_trail->opt['max_title_length'] = get_option('bcn_max_title_length');
86
+ $this->breadcrumb_trail->opt['current_item_linked'] = str2bool(get_option('bcn_current_item_linked'));
87
+ $this->breadcrumb_trail->opt['current_item_anchor'] = get_option('bcn_current_item_anchor');
88
+ $this->breadcrumb_trail->opt['current_item_prefix'] = get_option('bcn_current_item_prefix');
89
+ $this->breadcrumb_trail->opt['current_item_suffix'] = get_option('bcn_current_item_suffix');
90
+ $this->breadcrumb_trail->opt['paged_prefix'] = get_option('bcn_paged_prefix');
91
+ $this->breadcrumb_trail->opt['paged_suffix'] = get_option('bcn_paged_suffix');
92
+ $this->breadcrumb_trail->opt['paged_display'] = str2bool(get_option('bcn_paged_display'));
93
+ $this->breadcrumb_trail->opt['page_prefix'] = get_option('bcn_page_prefix');
94
+ $this->breadcrumb_trail->opt['page_suffix'] = get_option('bcn_page_suffix');
95
+ $this->breadcrumb_trail->opt['page_anchor'] = get_option('bcn_page_anchor');
96
+ $this->breadcrumb_trail->opt['post_prefix'] = get_option('bcn_post_prefix');
97
+ $this->breadcrumb_trail->opt['post_suffix'] = get_option('bcn_post_suffix');
98
+ $this->breadcrumb_trail->opt['post_anchor'] = get_option('bcn_post_anchor');
99
+ $this->breadcrumb_trail->opt['post_taxonomy_display'] = str2bool(get_option('bcn_post_taxonomy_display'));
100
+ $this->breadcrumb_trail->opt['post_taxonomy_type'] = get_option('bcn_post_taxonomy_type');
101
+ $this->breadcrumb_trail->opt['attachment_prefix'] = get_option('bcn_attachment_prefix');
102
+ $this->breadcrumb_trail->opt['attachment_suffix'] = get_option('bcn_attachment_suffix');
103
+ $this->breadcrumb_trail->opt['404_prefix'] = get_option('bcn_404_prefix');
104
+ $this->breadcrumb_trail->opt['404_suffix'] = get_option('bcn_404_suffix');
105
+ $this->breadcrumb_trail->opt['404_title'] = get_option('bcn_404_title');
106
+ $this->breadcrumb_trail->opt['search_prefix'] = get_option('bcn_search_prefix');
107
+ $this->breadcrumb_trail->opt['search_suffix'] = get_option('bcn_search_suffix');
108
+ $this->breadcrumb_trail->opt['tag_prefix'] = get_option('bcn_tag_prefix');
109
+ $this->breadcrumb_trail->opt['tag_suffix'] = get_option('bcn_tag_suffix');
110
+ $this->breadcrumb_trail->opt['tag_anchor'] = get_option('bcn_tag_anchor');
111
+ $this->breadcrumb_trail->opt['author_prefix'] = get_option('bcn_author_prefix');
112
+ $this->breadcrumb_trail->opt['author_suffix'] = get_option('bcn_author_suffix');
113
+ $this->breadcrumb_trail->opt['author_display'] = get_option('bcn_author_display');
114
+ $this->breadcrumb_trail->opt['category_prefix'] = get_option('bcn_category_prefix');
115
+ $this->breadcrumb_trail->opt['category_suffix'] = get_option('bcn_category_suffix');
116
+ $this->breadcrumb_trail->opt['category_anchor'] = get_option('bcn_category_anchor');
117
+ $this->breadcrumb_trail->opt['archive_category_prefix'] = get_option('bcn_archive_category_prefix');
118
+ $this->breadcrumb_trail->opt['archive_category_suffix'] = get_option('bcn_archive_category_suffix');
119
+ $this->breadcrumb_trail->opt['archive_tag_prefix'] = get_option('bcn_archive_tag_prefix');
120
+ $this->breadcrumb_trail->opt['archive_tag_suffix'] = get_option('bcn_archive_tag_suffix');
121
+ $this->breadcrumb_trail->opt['date_anchor'] = get_option('bcn_date_anchor');
122
+ $this->breadcrumb_trail->opt['archive_date_prefix'] = get_option('bcn_archive_date_prefix');
123
+ $this->breadcrumb_trail->opt['archive_date_suffix'] = get_option('bcn_archive_date_suffix');
124
+ //Now remove the old options
125
+ delete_option('bcn_trail_linked');
126
+ delete_option('bcn_home_display');
127
+ delete_option('bcn_home_title');
128
+ delete_option('bcn_home_anchor');
129
+ delete_option('bcn_blog_anchor');
130
+ delete_option('bcn_max_title_length');
131
+ delete_option('bcn_separator');
132
+ delete_option('bcn_search_prefix');
133
+ delete_option('bcn_search_suffix');
134
+ delete_option('bcn_author_prefix');
135
+ delete_option('bcn_author_suffix');
136
+ delete_option('bcn_author_display');
137
+ delete_option('bcn_page_prefix');
138
+ delete_option('bcn_page_suffix');
139
+ delete_option('bcn_page_anchor');
140
+ delete_option('bcn_archive_category_prefix');
141
+ delete_option('bcn_archive_category_suffix');
142
+ delete_option('bcn_archive_tag_prefix');
143
+ delete_option('bcn_archive_tag_suffix');
144
+ delete_option('bcn_attachment_prefix');
145
+ delete_option('bcn_attachment_suffix');
146
+ delete_option('bcn_404_prefix');
147
+ delete_option('bcn_404_suffix');
148
+ delete_option('bcn_404_title');
149
+ delete_option('bcn_current_item_linked');
150
+ delete_option('bcn_current_item_anchor');
151
+ delete_option('bcn_current_item_prefix');
152
+ delete_option('bcn_current_item_suffix');
153
+ delete_option('bcn_paged_display');
154
+ delete_option('bcn_paged_prefix');
155
+ delete_option('bcn_paged_suffix');
156
+ delete_option('bcn_post_prefix');
157
+ delete_option('bcn_post_suffix');
158
+ delete_option('bcn_post_taxonomy_type');
159
+ delete_option('bcn_post_taxonomy_display');
160
+ delete_option('bcn_post_anchor');
161
+ delete_option('bcn_category_prefix');
162
+ delete_option('bcn_category_suffix');
163
+ delete_option('bcn_category_anchor');
164
+ delete_option('bcn_tag_prefix');
165
+ delete_option('bcn_tag_suffix');
166
+ delete_option('bcn_tag_anchor');
167
+ delete_option('bcn_archive_date_prefix');
168
+ delete_option('bcn_archive_date_suffix');
169
+ delete_option('bcn_date_anchor');
170
+ }
171
+ //For upgrading from 2.1.x
172
+ if($major <= 2 && $minor <= 1 && $release <= 4)
173
+ {
174
+ //Upgrade to a current option
175
+ $this->breadcrumb_trail->opt['home_title'] = get_option('bcn_title_blog');
176
+ $this->breadcrumb_trail->opt['home_display'] = get_option('bcn_home_display');
177
+ $this->breadcrumb_trail->opt['404_title'] = get_option('bcn_title_404');
178
+ $this->breadcrumb_trail->opt['post_taxonomy_type'] = get_option('bcn_singleblogpost_taxonomy');
179
+ $this->breadcrumb_trail->opt['post_taxonomy_display'] = get_option('bcn_singleblogpost_taxonomy_display');
180
+ $this->breadcrumb_trail->opt['category_prefix'] = get_option('bcn_singleblogpost_category_prefix');
181
+ $this->breadcrumb_trail->opt['category_suffix'] = get_option('bcn_singleblogpost_category_suffix');
182
+ $this->breadcrumb_trail->opt['tag_prefix'] = get_option('bcn_singleblogpost_tag_prefix');
183
+ $this->breadcrumb_trail->opt['tag_suffix'] = get_option('bcn_singleblogpost_tag_suffix');
184
+ $this->breadcrumb_trail->opt['current_item_linked'] = get_option('bcn_link_current_item');
185
+ $this->breadcrumb_trail->opt['post_prefix'] = get_option('bcn_singleblogpost_prefix');
186
+ $this->breadcrumb_trail->opt['post_suffix'] = get_option('bcn_singleblogpost_suffix');
187
+ $this->breadcrumb_trail->opt['current_item_prefix'] = get_option('bcn_singleblogpost_style_prefix');
188
+ $this->breadcrumb_trail->opt['current_item_suffix'] = get_option('bcn_singleblogpost_style_suffix');
189
+ $this->breadcrumb_trail->opt['max_title_length'] = get_option('bcn_posttitle_maxlen');
190
+ delete_option('bcn_preserve');
191
+ delete_option('bcn_static_frontpage');
192
+ delete_option('bcn_url_blog');
193
+ delete_option('bcn_home_display');
194
+ delete_option('bcn_home_link');
195
+ delete_option('bcn_title_home');
196
+ delete_option('bcn_title_blog');
197
+ delete_option('bcn_separator');
198
+ delete_option('bcn_search_prefix');
199
+ delete_option('bcn_search_suffix');
200
+ delete_option('bcn_author_prefix');
201
+ delete_option('bcn_author_suffix');
202
+ delete_option('bcn_author_display');
203
+ delete_option('bcn_singleblogpost_prefix');
204
+ delete_option('bcn_singleblogpost_suffix');
205
+ delete_option('bcn_page_prefix');
206
+ delete_option('bcn_page_suffix');
207
+ delete_option('bcn_urltitle_prefix');
208
+ delete_option('bcn_urltitle_suffix');
209
+ delete_option('bcn_archive_category_prefix');
210
+ delete_option('bcn_archive_category_suffix');
211
+ delete_option('bcn_archive_date_prefix');
212
+ delete_option('bcn_archive_date_suffix');
213
+ delete_option('bcn_archive_date_format');
214
+ delete_option('bcn_attachment_prefix');
215
+ delete_option('bcn_attachment_suffix');
216
+ delete_option('bcn_archive_tag_prefix');
217
+ delete_option('bcn_archive_tag_suffix');
218
+ delete_option('bcn_title_404');
219
+ delete_option('bcn_link_current_item');
220
+ delete_option('bcn_current_item_urltitle');
221
+ delete_option('bcn_current_item_style_prefix');
222
+ delete_option('bcn_current_item_style_suffix');
223
+ delete_option('bcn_posttitle_maxlen');
224
+ delete_option('bcn_paged_display');
225
+ delete_option('bcn_paged_prefix');
226
+ delete_option('bcn_paged_suffix');
227
+ delete_option('bcn_singleblogpost_taxonomy');
228
+ delete_option('bcn_singleblogpost_taxonomy_display');
229
+ delete_option('bcn_singleblogpost_category_prefix');
230
+ delete_option('bcn_singleblogpost_category_suffix');
231
+ delete_option('bcn_singleblogpost_tag_prefix');
232
+ delete_option('bcn_singleblogpost_tag_suffix');
233
+ }
234
+ //Always have to update the version
235
+ update_option('bcn_version', $this->version);
236
+ //Store the options
237
+ add_option('bcn_options', $this->breadcrumb_trail->opt);
238
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
239
  }
240
+ /**
241
+ * update
242
+ *
243
+ * Updates the database settings from the webform
244
+ */
245
+ function update()
 
 
 
246
  {
247
+ $this->security();
248
+ //Do a nonce check, prevent malicious link/form problems
249
+ check_admin_referer('bcn_admin_options');
250
+ //Grab the options from the from post
251
+ //Home page settings
252
+ $this->breadcrumb_trail->opt['home_display'] = str2bool(bcn_get('home_display', 'false'));
253
+ $this->breadcrumb_trail->opt['home_title'] = bcn_get('home_title');
254
+ $this->breadcrumb_trail->opt['home_anchor'] = bcn_get('home_anchor');
255
+ $this->breadcrumb_trail->opt['blog_anchor'] = bcn_get('blog_anchor');
256
+ $this->breadcrumb_trail->opt['separator'] = bcn_get('separator');
257
+ $this->breadcrumb_trail->opt['max_title_length'] = bcn_get('max_title_length');
258
+ //Current item settings
259
+ $this->breadcrumb_trail->opt['current_item_linked'] = str2bool(bcn_get('current_item_linked', 'false'));
260
+ $this->breadcrumb_trail->opt['current_item_anchor'] = bcn_get('current_item_anchor');
261
+ $this->breadcrumb_trail->opt['current_item_prefix'] = bcn_get('current_item_prefix');
262
+ $this->breadcrumb_trail->opt['current_item_suffix'] = bcn_get('current_item_suffix');
263
+ //Paged settings
264
+ $this->breadcrumb_trail->opt['paged_prefix'] = bcn_get('paged_prefix');
265
+ $this->breadcrumb_trail->opt['paged_suffix'] = bcn_get('paged_suffix');
266
+ $this->breadcrumb_trail->opt['paged_display'] = str2bool(bcn_get('paged_display', 'false'));
267
+ //Page settings
268
+ $this->breadcrumb_trail->opt['page_prefix'] = bcn_get('page_prefix');
269
+ $this->breadcrumb_trail->opt['page_suffix'] = bcn_get('page_suffix');
270
+ $this->breadcrumb_trail->opt['page_anchor'] = bcn_get('page_anchor');
271
+ //Post related options
272
+ $this->breadcrumb_trail->opt['post_prefix'] = bcn_get('post_prefix');
273
+ $this->breadcrumb_trail->opt['post_suffix'] = bcn_get('post_suffix');
274
+ $this->breadcrumb_trail->opt['post_anchor'] = bcn_get('post_anchor');
275
+ $this->breadcrumb_trail->opt['post_taxonomy_display'] = str2bool(bcn_get('post_taxonomy_display', 'false'));
276
+ $this->breadcrumb_trail->opt['post_taxonomy_type'] = bcn_get('post_taxonomy_type');
277
+ //Attachment settings
278
+ $this->breadcrumb_trail->opt['attachment_prefix'] = bcn_get('attachment_prefix');
279
+ $this->breadcrumb_trail->opt['attachment_suffix'] = bcn_get('attachment_suffix');
280
+ //404 page settings
281
+ $this->breadcrumb_trail->opt['404_prefix'] = bcn_get('404_prefix');
282
+ $this->breadcrumb_trail->opt['404_suffix'] = bcn_get('404_suffix');
283
+ $this->breadcrumb_trail->opt['404_title'] = bcn_get('404_title');
284
+ //Search page settings
285
+ $this->breadcrumb_trail->opt['search_prefix'] = bcn_get('search_prefix');
286
+ $this->breadcrumb_trail->opt['search_suffix'] = bcn_get('search_suffix');
287
+ //Tag settings
288
+ $this->breadcrumb_trail->opt['tag_prefix'] = bcn_get('tag_prefix');
289
+ $this->breadcrumb_trail->opt['tag_suffix'] = bcn_get('tag_suffix');
290
+ $this->breadcrumb_trail->opt['tag_anchor'] = bcn_get('tag_anchor');
291
+ //Author page settings
292
+ $this->breadcrumb_trail->opt['author_prefix'] = bcn_get('author_prefix');
293
+ $this->breadcrumb_trail->opt['author_suffix'] = bcn_get('author_suffix');
294
+ $this->breadcrumb_trail->opt['author_display'] = bcn_get('author_display');
295
+ //Category settings
296
+ $this->breadcrumb_trail->opt['category_prefix'] = bcn_get('category_prefix');
297
+ $this->breadcrumb_trail->opt['category_suffix'] = bcn_get('category_suffix');
298
+ $this->breadcrumb_trail->opt['category_anchor'] = bcn_get('category_anchor');
299
+ //Archive settings
300
+ $this->breadcrumb_trail->opt['archive_category_prefix'] = bcn_get('archive_category_prefix');
301
+ $this->breadcrumb_trail->opt['archive_category_suffix'] = bcn_get('archive_category_suffix');
302
+ $this->breadcrumb_trail->opt['archive_tag_prefix'] = bcn_get('archive_tag_prefix');
303
+ $this->breadcrumb_trail->opt['archive_tag_suffix'] = bcn_get('archive_tag_suffix');
304
+ //Archive by date settings
305
+ $this->breadcrumb_trail->opt['date_anchor'] = bcn_get('date_anchor');
306
+ $this->breadcrumb_trail->opt['archive_date_prefix'] = bcn_get('archive_date_prefix');
307
+ $this->breadcrumb_trail->opt['archive_date_suffix'] = bcn_get('archive_date_suffix');
308
+ //bcn_update_option('bcn_trail_linked', bcn_get('trail_linked', 'false'));
309
+ //Commit the option changes
310
+ update_option('bcn_options', $this->breadcrumb_trail->opt);
311
  }
312
+ /**
313
+ * display
314
+ *
315
+ * Outputs the breadcrumb trail
316
+ *
317
+ * @param (bool) $linked Whether to allow hyperlinks in the trail or not.
318
+ */
319
+ function display($linked = true)
 
 
320
  {
321
+ //Update our internal settings
322
+ $this->breadcrumb_trail->opt = get_option('bcn_options');
323
+ //Generate the breadcrumb trail
324
+ $this->breadcrumb_trail->fill();
325
+ //Display the breadcrumb trail
326
+ $this->breadcrumb_trail->display(false, $linked);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
327
  }
328
+ /**
329
+ * filter_plugin_actions
330
+ *
331
+ * Places in a link to the settings page on the plugins listing
332
+ *
333
+ * @param (array) $links An array of links that are output in the listing
334
+ * @param (string) $file The file that is currently in processing
335
+ */
336
+ function filter_plugin_actions($links, $file)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
337
  {
338
+ static $this_plugin;
339
+ if(!$this_plugin)
340
+ {
341
+ $this_plugin = plugin_basename(__FILE__);
342
+ }
343
+ //Make sure we are adding only for Breadcrumb NavXT
344
+ if($file == $this_plugin)
345
+ {
346
+ //Setup the link string
347
+ $settings_link = '<a href="options-general.php?page=breadcrumb-navxt">' . __('Settings') . '</a>';
348
+ //Add it to the beginning of the array
349
+ array_unshift($links, $settings_link);
350
+ }
351
+ return $links;
352
  }
353
+ /**
354
+ * add_page
355
+ *
356
+ * Adds the adminpage the menue and the nice little settings link
357
+ *
358
+ */
359
+ function add_page()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
360
  {
361
+ global $bcn_admin_req;
362
+ //We did away with bcn_security in favor of this nice thing
363
+ if(current_user_can('manage_options'))
364
+ {
365
+ //Add the submenu page to "settings", more robust than previous method
366
+ add_submenu_page('options-general.php', 'Breadcrumb NavXT Settings', 'Breadcrumb NavXT', 'manage_options', 'breadcrumb-navxt', array(&$this, 'admin_panel'));
367
+ //Add in the nice "settings" link to the plugins page
368
+ add_filter('plugin_action_links', array(&$this, 'filter_plugin_actions'), 10, 2);
369
+ }
370
  }
371
+ /**
372
+ * admin_panel
373
+ *
374
+ * The administrative panel for Breadcrumb NavXT
375
+ *
376
+ */
377
+ function admin_panel()
378
  {
379
+ $this->security();
380
+ //Update our internal options array, use form safe function
381
+ $this->breadcrumb_trail->opt = $this->get_option('bcn_options');
382
+ //var_dump($this->breadcrumb_trail->opt);
383
+ //Initilizes l10n domain
384
+ $this->local();
385
+ //See if the administrative interface matches versions with the class, if not then warn the user
386
+ list($bcn_plugin_major, $bcn_plugin_minor, $bcn_plugin_bugfix) = explode('.', $this->breadcrumb_trail->version);
387
+ list($bcn_admin_major, $bcn_admin_minor, $bcn_admin_bugfix) = explode('.', $this->version);
388
+ if($bcn_plugin_major != $bcn_admin_major || $bcn_plugin_minor != $bcn_admin_minor)
389
  {
390
+ ?>
391
+ <div id="message" class="updated fade">
392
+ <p><?php _e('Warning, your version of Breadcrumb NavXT does not match the version supported by this administrative interface. As a result, settings may not work as expected.', 'breadcrumb_navxt'); ?></p>
393
+ <p><?php _e('Your Breadcrumb NavXT Administration interface version is ', 'breadcrumb_navxt'); echo $this->version; ?>.</p>
394
+ <p><?php _e('Your Breadcrumb NavXT version is ', 'breadcrumb_navxt'); echo $this->breadcrumb_trail->version; ?>.</p>
395
+ </div>
396
+ <?php
397
+ } ?>
398
+ <div class="wrap"><h2><?php _e('Breadcrumb NavXT Settings', 'breadcrumb_navxt'); ?></h2>
399
+ <p><?php
400
+ printf(__('Tips for the settings are located below select options. Please refer to the %sdocumentation%s for more detailed explanation of each setting.', 'breadcrumb_navxt'),
401
+ '<a title="Go to the Breadcrumb NavXT online documentation" href="http://mtekk.weblogs.us/code/breadcrumb-navxt/breadcrumb-navxt-doc/">', '</a>');
402
+ ?></p>
403
+ <form action="options-general.php?page=breadcrumb-navxt" method="post" id="bcn_admin_options">
404
+ <?php wp_nonce_field('bcn_admin_options');?>
405
+ <div id="hasadmintabs">
406
+ <fieldset id="general" class="bcn_options">
407
+ <h3><?php _e('General', 'breadcrumb_navxt'); ?></h3>
408
+ <table class="form-table">
409
+ <tr valign="top">
410
+ <th scope="row">
411
+ <?php _e('Home Breadcrumb', 'breadcrumb_navxt'); ?>
412
+ </th>
413
+ <td>
414
+ <p>
415
+ <label>
416
+ <input name="home_display" type="radio" value="false" class="togx" <?php checked(false, $this->breadcrumb_trail->opt['home_display']); ?> />
417
+ <?php _e('Leave the home breadcrumb out of the trail.', 'breadcrumb_navxt'); ?>
418
+ </label>
419
+ </p>
420
+ <p>
421
+ <label>
422
+ <input name="home_display" type="radio" value="true" class="togx" <?php checked(true, $this->breadcrumb_trail->opt['home_display']); ?> />
423
+ <?php _e('Place the home breadcrumb in the trail.', 'breadcrumb_navxt'); ?>
424
+ </label>
425
+ <ul>
426
+ <li>
427
+ <label for="home_title">
428
+ <?php _e('Home Title: ','breadcrumb_navxt');?>
429
+ <input type="text" name="home_title" id="home_title" value="<?php echo $this->breadcrumb_trail->opt['home_title']; ?>" size="20" />
430
+ </label>
431
+ </li>
432
+ </ul>
433
+ </p>
434
+ </td>
435
+ </tr>
436
+ <tr valign="top">
437
+ <th scope="row">
438
+ <label for="separator"><?php _e('Breadcrumb Separator', 'breadcrumb_navxt'); ?></label>
439
+ </th>
440
+ <td>
441
+ <input type="text" name="separator" id="separator" value="<?php echo $this->breadcrumb_trail->opt['separator']; ?>" size="32" /><br />
442
+ <?php _e('Placed in between each breadcrumb.', 'breadcrumb_navxt'); ?>
443
+ </td>
444
+ </tr>
445
+ <tr valign="top">
446
+ <th scope="row">
447
+ <label for="max_title_length"><?php _e('Breadcrumb Max Title Length', 'breadcrumb_navxt'); ?></label>
448
+ </th>
449
+ <td>
450
+ <input type="text" name="max_title_length" id="max_title_length" value="<?php echo $this->breadcrumb_trail->opt['max_title_length'];?>" size="10" />
451
+ </td>
452
+ </tr>
453
+ <tr valign="top">
454
+ <th scope="row">
455
+ <label for="home_anchor"><?php _e('Home Anchor', 'breadcrumb_navxt'); ?></label>
456
+ </th>
457
+ <td>
458
+ <input type="text" name="home_anchor" id="home_anchor" value="<?php echo $this->breadcrumb_trail->opt['home_anchor']; ?>" size="60" /><br />
459
+ <?php _e('The anchor template for the home breadcrumb.', 'breadcrumb_navxt'); ?>
460
+ </td>
461
+ </tr>
462
+ <?php
463
+ //We only need this if in a static front page condition
464
+ if(get_option('show_on_front') == "page")
465
+ {?>
466
+ <tr valign="top">
467
+ <th scope="row">
468
+ <label for="blog_anchor"><?php _e('Blog Anchor', 'breadcrumb_navxt'); ?></label>
469
+ </th>
470
+ <td>
471
+ <input type="text" name="blog_anchor" id="blog_anchor" value="<?php echo $this->breadcrumb_trail->opt['blog_anchor']; ?>" size="60" /><br />
472
+ <?php _e('The anchor template for the blog breadcrumb.', 'breadcrumb_navxt'); ?>
473
+ </td>
474
+ </tr>
475
+ <?php } ?>
476
+ </table>
477
+ </fieldset>
478
+ <fieldset id="current" class="bcn_options">
479
+ <h3><?php _e('Current Item', 'breadcrumb_navxt'); ?></h3>
480
+ <table class="form-table">
481
+ <tr valign="top">
482
+ <th scope="row">
483
+ <label for="current_item_linked"><?php _e('Link Current Item', 'breadcrumb_navxt'); ?></label>
484
+ </th>
485
+ <td>
486
+ <label>
487
+ <input name="current_item_linked" type="checkbox" id="current_item_linked" value="true" <?php checked(true, $this->breadcrumb_trail->opt['current_item_linked']); ?> />
488
+ <?php _e('Yes'); ?>
489
+ </label>
490
+ </td>
491
+ </tr>
492
+ <tr valign="top">
493
+ <th scope="row">
494
+ <label for="current_item_prefix"><?php _e('Current Item Prefix', 'breadcrumb_navxt'); ?></label>
495
+ </th>
496
+ <td>
497
+ <input type="text" name="current_item_prefix" id="current_item_prefix" value="<?php echo $this->breadcrumb_trail->opt['current_item_prefix']; ?>" size="32" />
498
+ </td>
499
+ </tr>
500
+ <tr valign="top">
501
+ <th scope="row">
502
+ <label for="current_item_suffix"><?php _e('Current Item Suffix', 'breadcrumb_navxt'); ?></label>
503
+ </th>
504
+ <td>
505
+ <input type="text" name="current_item_suffix" id="current_item_suffix" value="<?php echo $this->breadcrumb_trail->opt['current_item_suffix']; ?>" size="32" />
506
+ </td>
507
+ </tr>
508
+ <tr valign="top">
509
+ <th scope="row">
510
+ <label for="current_item_anchor"><?php _e('Current Item Anchor', 'breadcrumb_navxt'); ?></label>
511
+ </th>
512
+ <td>
513
+ <input type="text" name="current_item_anchor" id="current_item_anchor" value="<?php echo $this->breadcrumb_trail->opt['current_item_anchor']; ?>" size="60" /><br />
514
+ <?php _e('The anchor template for current item breadcrumbs.', 'breadcrumb_navxt'); ?>
515
+ </td>
516
+ </tr>
517
+ <tr valign="top">
518
+ <th scope="row">
519
+ <label for="paged_display"><?php _e('Display Paged Text', 'breadcrumb_navxt'); ?></label>
520
+ </th>
521
+ <td>
522
+ <label>
523
+ <input name="paged_display" type="checkbox" id="paged_display" value="true" <?php checked(true, $this->breadcrumb_trail->opt['paged_display']); ?> />
524
+ <?php _e('Show that the user is on a page other than the first on posts/archives with multiple pages.', 'breadcrumb_navxt'); ?>
525
+ </label>
526
+ </td>
527
+ </tr>
528
+ <tr valign="top">
529
+ <th scope="row">
530
+ <label for="paged_prefix"><?php _e('Paged Prefix', 'breadcrumb_navxt'); ?></label>
531
+ </th>
532
+ <td>
533
+ <input type="text" name="paged_prefix" id="paged_prefix" value="<?php echo $this->breadcrumb_trail->opt['paged_prefix']; ?>" size="32" />
534
+ </td>
535
+ </tr>
536
+ <tr valign="top">
537
+ <th scope="row">
538
+ <label for="paged_suffix"><?php _e('Paged Suffix', 'breadcrumb_navxt'); ?></label>
539
+ </th>
540
+ <td>
541
+ <input type="text" name="paged_suffix" id="paged_suffix" value="<?php echo $this->breadcrumb_trail->opt['paged_suffix']; ?>" size="32" />
542
+ </td>
543
+ </tr>
544
+ </table>
545
+ </fieldset>
546
+ <fieldset id="single" class="bcn_options">
547
+ <h3><?php _e('Posts & Pages', 'breadcrumb_navxt'); ?></h3>
548
+ <table class="form-table">
549
+ <tr valign="top">
550
+ <th scope="row">
551
+ <label for="post_prefix"><?php _e('Post Prefix', 'breadcrumb_navxt'); ?></label>
552
+ </th>
553
+ <td>
554
+ <input type="text" name="post_prefix" id="post_prefix" value="<?php echo $this->breadcrumb_trail->opt['post_prefix']; ?>" size="32" />
555
+ </td>
556
+ </tr>
557
+ <tr valign="top">
558
+ <th scope="row">
559
+ <label for="post_suffix"><?php _e('Post Suffix', 'breadcrumb_navxt'); ?></label>
560
+ </th>
561
+ <td>
562
+ <input type="text" name="post_suffix" id="post_suffix" value="<?php echo $this->breadcrumb_trail->opt['post_suffix']; ?>" size="32" />
563
+ </td>
564
+ </tr>
565
+ <tr valign="top">
566
+ <th scope="row">
567
+ <label for="post_anchor"><?php _e('Post Anchor', 'breadcrumb_navxt'); ?></label>
568
+ </th>
569
+ <td>
570
+ <input type="text" name="post_anchor" id="post_anchor" value="<?php echo $this->breadcrumb_trail->opt['post_anchor']; ?>" size="60" /><br />
571
+ <?php _e('The anchor template for post breadcrumbs.', 'breadcrumb_navxt'); ?>
572
+ </td>
573
+ </tr>
574
+ <tr valign="top">
575
+ <th scope="row">
576
+ <?php _e('Post Taxonomy Display', 'breadcrumb_navxt'); ?>
577
+ </th>
578
+ <td>
579
+ <label for="post_taxonomy_display">
580
+ <input name="post_taxonomy_display" type="checkbox" id="post_taxonomy_display" value="true" <?php checked(true, $this->breadcrumb_trail->opt['post_taxonomy_display']); ?> />
581
+ <?php _e('Show the taxonomy leading to a post in the breadcrumb trail.', 'breadcrumb_navxt'); ?>
582
+ </label>
583
+ </td>
584
+ </tr>
585
+ <tr valign="top">
586
+ <th scope="row">
587
+ <p><?php _e('Post Taxonomy', 'breadcrumb_navxt'); ?></p>
588
+ </th>
589
+ <td>
590
+ <p>
591
+ <label>
592
+ <input name="post_taxonomy_type" type="radio" value="category" class="togx" <?php checked('category', $this->breadcrumb_trail->opt['post_taxonomy_type']); ?> />
593
+ <?php _e('Categories'); ?>
594
+ </label>
595
+ </p>
596
+ <p>
597
+ <label>
598
+ <input name="post_taxonomy_type" type="radio" value="tag" class="togx" <?php checked('tag', $this->breadcrumb_trail->opt['post_taxonomy_type']); ?> />
599
+ <?php _e('Tags'); ?>
600
+ </label>
601
+ </p>
602
+ <p>
603
+ <?php _e('The taxonomy which the breadcrumb trail will show.', 'breadcrumb_navxt'); ?>
604
+ </p>
605
+ </td>
606
+ </tr>
607
+ <tr valign="top">
608
+ <th scope="row">
609
+ <label for="page_prefix"><?php _e('Page Prefix', 'breadcrumb_navxt'); ?></label>
610
+ </th>
611
+ <td>
612
+ <input type="text" name="page_prefix" id="page_prefix" value="<?php echo $this->breadcrumb_trail->opt['page_prefix']; ?>" size="32" />
613
+ </td>
614
+ </tr>
615
+ <tr valign="top">
616
+ <th scope="row">
617
+ <label for="page_suffix"><?php _e('Page Suffix', 'breadcrumb_navxt'); ?></label>
618
+ </th>
619
+ <td>
620
+ <input type="text" name="page_suffix" id="page_suffix" value="<?php echo $this->breadcrumb_trail->opt['page_suffix']; ?>" size="32" />
621
+ </td>
622
+ </tr>
623
+ <tr valign="top">
624
+ <th scope="row">
625
+ <label for="page_anchor"><?php _e('Page Anchor', 'breadcrumb_navxt'); ?></label>
626
+ </th>
627
+ <td>
628
+ <input type="text" name="page_anchor" id="page_anchor" value="<?php echo $this->breadcrumb_trail->opt['page_anchor']; ?>" size="60" /><br />
629
+ <?php _e('The anchor template for page breadcrumbs.', 'breadcrumb_navxt'); ?>
630
+ </td>
631
+ </tr>
632
+ <tr valign="top">
633
+ <th scope="row">
634
+ <label for="attachment_prefix"><?php _e('Attachment Prefix', 'breadcrumb_navxt'); ?></label>
635
+ </th>
636
+ <td>
637
+ <input type="text" name="attachment_prefix" id="attachment_prefix" value="<?php echo $this->breadcrumb_trail->opt['attachment_prefix']; ?>" size="32" />
638
+ </td>
639
+ </tr>
640
+ <tr valign="top">
641
+ <th scope="row">
642
+ <label for="attachment_suffix"><?php _e('Attachment Suffix', 'breadcrumb_navxt'); ?></label>
643
+ </th>
644
+ <td>
645
+ <input type="text" name="attachment_suffix" id="attachment_suffix" value="<?php echo $this->breadcrumb_trail->opt['attachment_suffix']; ?>" size="32" />
646
+ </td>
647
+ </tr>
648
+ </table>
649
+ </fieldset>
650
+ <fieldset id="category" class="bcn_options">
651
+ <h3><?php _e('Categories', 'breadcrumb_navxt'); ?></h3>
652
+ <table class="form-table">
653
+ <tr valign="top">
654
+ <th scope="row">
655
+ <label for="archive_category_prefix"><?php _e('Archive by Category Prefix', 'breadcrumb_navxt'); ?></label>
656
+ </th>
657
+ <td>
658
+ <input type="text" name="archive_category_prefix" id="archive_category_prefix" value="<?php echo $this->breadcrumb_trail->opt['archive_category_prefix']; ?>" size="32" />
659
+ </td>
660
+ </tr>
661
+ <tr valign="top">
662
+ <th scope="row">
663
+ <label for="archive_category_suffix"><?php _e('Archive by Category Suffix', 'breadcrumb_navxt'); ?></label>
664
+ </th>
665
+ <td>
666
+ <input type="text" name="archive_category_suffix" id="archive_category_suffix" value="<?php echo $this->breadcrumb_trail->opt['archive_category_suffix']; ?>" size="32" />
667
+ </td>
668
+ </tr>
669
+ <tr valign="top">
670
+ <th scope="row">
671
+ <label for="category_prefix"><?php _e('Category Prefix', 'breadcrumb_navxt'); ?></label>
672
+ </th>
673
+ <td>
674
+ <input type="text" name="category_prefix" id="category_prefix" value="<?php echo $this->breadcrumb_trail->opt['category_prefix']; ?>" size="32" />
675
+ </td>
676
+ </tr>
677
+ <tr valign="top">
678
+ <th scope="row">
679
+ <label for="category_suffix"><?php _e('Category Suffix', 'breadcrumb_navxt'); ?></label>
680
+ </th>
681
+ <td>
682
+ <input type="text" name="category_suffix" id="category_suffix" value="<?php echo $this->breadcrumb_trail->opt['category_suffix']; ?>" size="32" />
683
+ </td>
684
+ </tr>
685
+ <tr valign="top">
686
+ <th scope="row">
687
+ <label for="category_anchor"><?php _e('Category Anchor', 'breadcrumb_navxt'); ?></label>
688
+ </th>
689
+ <td>
690
+ <input type="text" name="category_anchor" id="category_anchor" value="<?php echo $this->breadcrumb_trail->opt['category_anchor']; ?>" size="60" /><br />
691
+ <?php _e('The anchor template for category breadcrumbs.', 'breadcrumb_navxt'); ?>
692
+ </td>
693
+ </tr>
694
+ </table>
695
+ </fieldset>
696
+ <fieldset id="tag" class="bcn_options">
697
+ <h3><?php _e('Tags', 'breadcrumb_navxt'); ?></h3>
698
+ <table class="form-table">
699
+ <tr valign="top">
700
+ <th scope="row">
701
+ <label for="archive_tag_prefix"><?php _e('Archive by Tag Prefix', 'breadcrumb_navxt'); ?></label>
702
+ </th>
703
+ <td>
704
+ <input type="text" name="archive_tag_prefix" id="archive_tag_prefix" value="<?php echo $this->breadcrumb_trail->opt['archive_tag_prefix']; ?>" size="32" />
705
+ </td>
706
+ </tr>
707
+ <tr valign="top">
708
+ <th scope="row">
709
+ <label for="archive_tag_suffix"><?php _e('Archive by Tag Suffix', 'breadcrumb_navxt'); ?></label>
710
+ </th>
711
+ <td>
712
+ <input type="text" name="archive_tag_suffix" id="archive_tag_suffix" value="<?php echo $this->breadcrumb_trail->opt['archive_tag_suffix']; ?>" size="32" />
713
+ </td>
714
+ </tr>
715
+ <tr valign="top">
716
+ <th scope="row">
717
+ <label for="tag_prefix"><?php _e('Tag Prefix', 'breadcrumb_navxt'); ?></label>
718
+ </th>
719
+ <td>
720
+ <input type="text" name="tag_prefix" id="tag_prefix" value="<?php echo $this->breadcrumb_trail->opt['tag_prefix']; ?>" size="32" />
721
+ </td>
722
+ </tr>
723
+ <tr valign="top">
724
+ <th scope="row">
725
+ <label for="tag_suffix"><?php _e('Tag Suffix', 'breadcrumb_navxt'); ?></label>
726
+ </th>
727
+ <td>
728
+ <input type="text" name="tag_suffix" id="tag_suffix" value="<?php echo $this->breadcrumb_trail->opt['tag_suffix']; ?>" size="32" />
729
+ </td>
730
+ </tr>
731
+ <tr valign="top">
732
+ <th scope="row">
733
+ <label for="tag_anchor"><?php _e('Tag Anchor', 'breadcrumb_navxt'); ?></label>
734
+ </th>
735
+ <td>
736
+ <input type="text" name="tag_anchor" id="tag_anchor" value="<?php echo $this->breadcrumb_trail->opt['tag_anchor']; ?>" size="60" /><br />
737
+ <?php _e('The anchor template for tag breadcrumbs.', 'breadcrumb_navxt'); ?>
738
+ </td>
739
+ </tr>
740
+ </table>
741
+ </fieldset>
742
+ <fieldset id="date" class="bcn_options">
743
+ <h3><?php _e('Date Archives', 'breadcrumb_navxt'); ?></h3>
744
+ <table class="form-table">
745
+ <tr valign="top">
746
+ <th scope="row">
747
+ <label for="archive_date_prefix"><?php _e('Archive by Date Prefix', 'breadcrumb_navxt'); ?></label>
748
+ </th>
749
+ <td>
750
+ <input type="text" name="archive_date_prefix" id="archive_date_prefix" value="<?php echo $this->breadcrumb_trail->opt['archive_date_prefix']; ?>" size="32" />
751
+ </td>
752
+ </tr>
753
+ <tr valign="top">
754
+ <th scope="row">
755
+ <label for="archive_date_suffix"><?php _e('Archive by Date Suffix', 'breadcrumb_navxt'); ?></label>
756
+ </th>
757
+ <td>
758
+ <input type="text" name="archive_date_suffix" id="archive_date_suffix" value="<?php echo $this->breadcrumb_trail->opt['archive_date_suffix']; ?>" size="32" />
759
+ </td>
760
+ </tr>
761
+ <tr valign="top">
762
+ <th scope="row">
763
+ <label for="date_anchor"><?php _e('Date Anchor', 'breadcrumb_navxt'); ?></label>
764
+ </th>
765
+ <td>
766
+ <input type="text" name="date_anchor" id="date_anchor" value="<?php echo $this->breadcrumb_trail->opt['date_anchor']; ?>" size="60" /><br />
767
+ <?php _e('The anchor template for date breadcrumbs.', 'breadcrumb_navxt'); ?>
768
+ </td>
769
+ </tr>
770
+ </table>
771
+ </fieldset>
772
+ <fieldset id="miscellaneous" class="bcn_options">
773
+ <h3><?php _e('Miscellaneous', 'breadcrumb_navxt'); ?></h3>
774
+ <table class="form-table">
775
+ <tr valign="top">
776
+ <th scope="row">
777
+ <label for="author_prefix"><?php _e('Author Prefix', 'breadcrumb_navxt'); ?></label>
778
+ </th>
779
+ <td>
780
+ <input type="text" name="author_prefix" id="author_prefix" value="<?php echo $this->breadcrumb_trail->opt['author_prefix']; ?>" size="32" />
781
+ </td>
782
+ </tr>
783
+ <tr valign="top">
784
+ <th scope="row">
785
+ <label for="author_suffix"><?php _e('Author Suffix', 'breadcrumb_navxt'); ?></label>
786
+ </th>
787
+ <td>
788
+ <input type="text" name="author_suffix" id="author_suffix" value="<?php echo $this->breadcrumb_trail->opt['author_suffix']; ?>" size="32" />
789
+ </td>
790
+ </tr>
791
+ <tr valign="top">
792
+ <th scope="row">
793
+ <label for="author_display"><?php _e('Author Display Format', 'breadcrumb_navxt'); ?></label>
794
+ </th>
795
+ <td>
796
+ <select name="author_display" id="author_display">
797
+ <?php $this->select_options('author_display', array("display_name", "nickname", "first_name", "last_name")); ?>
798
+ </select>
799
+ </td>
800
+ </tr>
801
+ <tr valign="top">
802
+ <th scope="row">
803
+ <label for="search_prefix"><?php _e('Search Prefix', 'breadcrumb_navxt'); ?></label>
804
+ </th>
805
+ <td>
806
+ <input type="text" name="search_prefix" id="search_prefix" value="<?php echo $this->breadcrumb_trail->opt['search_prefix']; ?>" size="32" />
807
+ </td>
808
+ </tr>
809
+ <tr valign="top">
810
+ <th scope="row">
811
+ <label for="search_suffix"><?php _e('Search Suffix', 'breadcrumb_navxt'); ?></label>
812
+ </th>
813
+ <td>
814
+ <input type="text" name="search_suffix" id="search_suffix" value="<?php echo $this->breadcrumb_trail->opt['search_suffix']; ?>" size="32" />
815
+ </td>
816
+ </tr>
817
+ <tr valign="top">
818
+ <th scope="row">
819
+ <label for="404_title"><?php _e('404 Title', 'breadcrumb_navxt'); ?></label>
820
+ </th>
821
+ <td>
822
+ <input type="text" name="404_title" id="404_title" value="<?php echo $this->breadcrumb_trail->opt['404_title']; ?>" size="32" />
823
+ </td>
824
+ </tr>
825
+ <tr valign="top">
826
+ <th scope="row">
827
+ <label for="404_prefix"><?php _e('404 Prefix', 'breadcrumb_navxt'); ?></label>
828
+ </th>
829
+ <td>
830
+ <input type="text" name="404_prefix" id="404_prefix" value="<?php echo $this->breadcrumb_trail->opt['404_prefix']; ?>" size="32" />
831
+ </td>
832
+ </tr>
833
+ <tr valign="top">
834
+ <th scope="row">
835
+ <label for="404_suffix"><?php _e('404 Suffix', 'breadcrumb_navxt'); ?></label>
836
+ </th>
837
+ <td>
838
+ <input type="text" name="404_suffix" id="404_suffix" value="<?php echo $this->breadcrumb_trail->opt['404_suffix']; ?>" size="32" />
839
+ </td>
840
+ </tr>
841
+ </table>
842
+ </fieldset>
843
+ </div>
844
+ <p class="submit"><input type="submit" name="bcn_admin_options" value="<?php _e('Save Changes') ?>" /></p>
845
+ </form>
846
+ </div>
847
+ <?php
848
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
849
  /**
850
+ * widget
 
 
 
851
  *
852
+ * The sidebar widget
 
 
 
 
 
 
 
 
 
853
  */
854
+ function widget($args)
855
+ {
856
+ extract($args);
857
+ //Manditory before widget junk
858
+ echo $before_widget;
859
+ //Display the breadcrumb trial
860
+ bcn_display();
861
+ //Manditory after widget junk
862
+ echo $after_widget;
863
+ }
 
 
 
 
 
864
  /**
865
+ * register_widget
866
  *
867
+ * Registers the sidebar widget
 
 
 
 
 
 
 
 
 
868
  */
869
+ function register_widget()
 
870
  {
871
+ register_sidebar_widget('Breadcrumb NavXT', array(&$this, 'widget'));
872
+ }
 
873
  /**
874
+ * local
875
+ *
876
+ * Initilizes localization domain
877
  */
878
+ function local()
879
  {
880
+ //Load breadcrumb-navxt translation
881
+ load_plugin_textdomain($domain = 'breadcrumb_navxt', $path = PLUGINDIR . '/breadcrumb-navxt');
 
882
  }
 
883
  /**
884
+ * select_options
885
+ *
886
+ * Displays wordpress options as <seclect> options defaults to true/false
887
  *
888
+ * @param (string) optionname name of wordpress options store
889
+ * @param (array) options array of options defaults to array('true','false')
890
+ */
891
+ function select_options($optionname, $options = array('true','false'))
892
+ {
893
+ $value = $this->breadcrumb_trail->opt[$optionname];
894
+ //First output the current value
895
+ if ($value)
896
+ {
897
+ printf('<option>%s</option>', $value);
898
+ }
899
+ //Now do the rest
900
+ foreach($options as $option)
901
+ {
902
+ //Don't want multiple occurance of the current value
903
+ if($option != $value)
904
  {
905
+ printf('<option>%s</option>', $option);
906
+ }
907
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
908
  }
 
909
  /**
910
+ * get_option
911
+ *
912
+ * This grabs the the data from the db and places it in a form safe manner
913
+ *
914
+ * @param (string) option name of wordpress option to get
915
+ * @return (mixed)
916
+ */
917
+ function get_option($option)
918
  {
919
+ $db_data = get_option($option);
920
+ //If we get an array, we should loop through all of its members
921
+ if(is_array($db_data))
922
+ {
923
+ //Loop through all the members
924
+ foreach($db_data as $key=>$item)
925
+ {
926
+ //We ignore anything but strings
927
+ if(is_string($item))
928
+ {
929
+ $db_data[$key] = htmlentities($item);
930
+ }
931
+ }
932
+ return $db_data;
933
+ }
934
+ else
935
  {
936
+ return htmlentities($db_data);
937
+ }
 
 
 
 
938
  }
 
 
 
939
  }
940
+ //Let's make an instance of our object takes care of everything
941
+ $bcn_admin = new bcn_admin;
942
+ /**
943
+ * Exists for legacy compatibility. Tells user to use bcn_display, function slated for removal in 3.1.
944
+ */
945
+ function breadcrumb_nav_xt_display()
946
+ {
947
+ echo "Please use bcn_display instead of breadcrumb_nav_xt_display";
948
+ }
949
+ /**
950
+ * A wrapper for the internal function in the class, please directly acess the admin class instead
951
+ *
952
+ * @param (bool) $linked Whether to allow hyperlinks in the trail or not.
953
+ */
954
+ function bcn_display($linked = true)
955
+ {
956
+ global $bcn_admin;
957
+ $bcn_admin->display($linked);
958
  }
 
959
  ?>
breadcrumb_navxt_api.php CHANGED
@@ -22,57 +22,69 @@
22
  * Get Option, get_option Replacement
23
  *
24
  * @param string optionname name of the wordpress option
 
25
  */
26
- function bcn_get_option($optionname)
27
  {
28
  //Retrieve the option value
29
  $bcn_value = get_option($optionname);
30
-
31
- //Remove &nbsp; so that it looks correct (string problem)
32
- $bcn_value = str_replace("&nbsp;", " ", $bcn_value);
33
-
34
- return $bcn_value;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
35
  }
36
-
37
  /**
38
  * Update Option, update_option Replacement
39
  *
40
- * @param unknown_type $optionname
41
- * @param unknown_type $value
42
  * @see bcn_get_option
43
  */
44
  function bcn_update_option($optionname, $value)
45
  {
46
  $bcn_value = $value;
47
-
48
- /*
49
- * Only if we have a string should we check for spaces
50
- *
51
- * @note since $value is from $_POST[] this will return true ever^^
52
- *
53
- *
54
- * @todo Instead of poking blindly around and inventing stupid algos:
55
- * enclose the whole string sothat everything is preserved automatically
56
- * bcn_get_option can remove the enclosure then again with ease 100% transparent
57
- */
58
- if(is_string($bcn_value))
59
- {
60
- //Preserving the front space if exists
61
- if(strpos($bcn_value, " ") === 0)
62
- {
63
- $bcn_value = "&nbsp;" . ltrim($bcn_value);
64
- }
65
- //Preserv the end space if exists
66
- $bcn_length = strlen($bcn_value) - 1;
67
- if($bcn_length > 0)
68
  {
69
- if(strpos($bcn_value, " ", $bcn_length - 1) === $bcn_length)
70
- {
71
- $bcn_value = rtrim($bcn_value) . "&nbsp;";
72
- }
73
  }
74
  }
75
-
76
  return update_option($optionname, $bcn_value);
77
  }
78
 
@@ -139,66 +151,4 @@ function bcn_get($varname, $default = "")
139
  //Return unslashed value
140
  return $bcn_value;
141
  }
142
- /**
143
- * bcn_local
144
- *
145
- * Initilizes localization domain
146
- */
147
- function bcn_local()
148
- {
149
- //Load breadcrumb-navxt translation
150
- load_plugin_textdomain($domain = 'breadcrumb_navxt', $path = PLUGINDIR . '/breadcrumb-navxt');
151
- }
152
-
153
- /**
154
- * bcn_wp_static_frontpage
155
- *
156
- * does this wordpress installation uses a static page as frontpage
157
- * or the standard listing of latest posts?
158
- *
159
- * @return bool true if wordpress uses a static frontpage
160
- * @since 2.1.3
161
- */
162
- function bcn_wp_has_static_frontpage()
163
- {
164
- /*
165
- * the option is taken directly from wordpress configuraion
166
- *
167
- * wp option: get_option('show_on_front')
168
- *
169
- * @see http://codex.wordpress.org/Option_Reference
170
- *
171
- * page_on_front
172
- *
173
- * The ID of the page that should be displayed on the front page.
174
- * Requires show_on_front's value to be page.
175
- * Data type: Integer
176
- *
177
- * show_on_front
178
- *
179
- * What to show on the front page
180
- * 'posts' : Your latest posts
181
- * 'page' : A static page (see page_on_front)
182
- * Data type: String
183
- */
184
-
185
- $blog_has_static_frontpage = (bool) (get_option('show_on_front') == 'page');
186
-
187
- return $blog_has_static_frontpage;
188
- }
189
-
190
- /**
191
- * Get Wordpress Homepage
192
- *
193
- * @return string URL of wordpress homepage
194
- * @since 2.1.3
195
- */
196
- function bcn_wp_url_home()
197
- {
198
- $url_home = get_option('home') . '/';
199
-
200
- return $url_home;
201
- }
202
-
203
-
204
  ?>
22
  * Get Option, get_option Replacement
23
  *
24
  * @param string optionname name of the wordpress option
25
+ * @param bool foradmin wheter or not we are returning for the admin interface or for the class
26
  */
27
+ function bcn_get_option($optionname, $foradmin = true)
28
  {
29
  //Retrieve the option value
30
  $bcn_value = get_option($optionname);
31
+ if($foradmin)
32
+ {
33
+ //Remove &nbsp; so that it looks correct (string problem)
34
+ return str_replace("&nbsp;", " ", $bcn_value);
35
+
36
+ }
37
+ else
38
+ {
39
+ //We use entity_decode as that's the inverse of what wpdb->escape() uses
40
+ return html_entity_decode($bcn_value);
41
+ }
42
+ }
43
+ /**
44
+ * str2bool converts string of "true" to true and "false" to false
45
+ *
46
+ * Probably could be moved to bcn_get_option, we'll see
47
+ *
48
+ * @param string $input
49
+ * @return bool
50
+ */
51
+ function str2bool($input)
52
+ {
53
+ if($input === "true")
54
+ {
55
+ return true;
56
+ }
57
+ else
58
+ {
59
+ return false;
60
+ }
61
  }
 
62
  /**
63
  * Update Option, update_option Replacement
64
  *
65
+ * @param string $optionname
66
+ * @param string $value
67
  * @see bcn_get_option
68
  */
69
  function bcn_update_option($optionname, $value)
70
  {
71
  $bcn_value = $value;
72
+ //We want to make sure we handle html entities correctly first
73
+ //$bcn_value = htmlspecialchars($bcn_value);
74
+ //Preserving the front space if exists
75
+ if(strpos($bcn_value, " ") === 0)
76
+ {
77
+ $bcn_value = "&nbsp;" . ltrim($bcn_value);
78
+ }
79
+ //Preserv the end space if exists
80
+ $bcn_length = strlen($bcn_value) - 1;
81
+ if($bcn_length > 0)
82
+ {
83
+ if(strpos($bcn_value, " ", $bcn_length - 1) === $bcn_length)
 
 
 
 
 
 
 
 
 
84
  {
85
+ $bcn_value = rtrim($bcn_value) . "&nbsp;";
 
 
 
86
  }
87
  }
 
88
  return update_option($optionname, $bcn_value);
89
  }
90
 
151
  //Return unslashed value
152
  return $bcn_value;
153
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
154
  ?>
breadcrumb_navxt_class.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Breadcrumb NavXT - Core
4
  Plugin URI: http://mtekk.weblogs.us/code/breadcrumb-navxt/
5
  Description: Adds a breadcrumb navigation showing the visitor&#39;s path to their current location. This plug-in provides direct access to the bcn_breadcrumb class without using the administrative interface. For details on how to use this plugin visit <a href="http://mtekk.weblogs.us/code/breadcrumb-navxt/">Breadcrumb NavXT</a>.
6
- Version: 2.1.4
7
  Author: John Havlik
8
  Author URI: http://mtekk.weblogs.us/
9
  */
@@ -23,570 +23,819 @@ Author URI: http://mtekk.weblogs.us/
23
  along with this program; if not, write to the Free Software
24
  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25
  */
26
- $bcn_version = "2.1.4";
27
- //The main class
 
28
  class bcn_breadcrumb
29
  {
30
- var $opt;
31
- var $breadcrumb;
32
- //Class Constructor
33
- function bcn_breadcrumb()
 
 
 
 
 
 
 
 
 
34
  {
35
- //Setting array
36
- $this->opt = array(
37
- 'static_frontpage' => 'false',
38
- //*** only used if 'static_frontpage' => true
39
- //Relative URL for your blog's address that is used for the Weblog link.
40
- //Use it if your blog is available at http://www.site.com/myweblog/,
41
- //and at http://www.site.com/ a Wordpress page is being displayed:
42
- //In this case apply '/myweblog/'.
43
- 'url_blog' => '',
44
- //Display HOME? If set to false, HOME is not being displayed.
45
- 'home_display' => 'true',
46
- //URL for the home link
47
- 'url_home' => get_option('home') . "/",
48
- //Apply a link to HOME? If set to false, only plain text is being displayed.
49
- 'home_link' => 'true',
50
- //Text displayed for the home link, if you don't want to call it home then just change this.
51
- //Also, it is being checked if the current page title = this variable. If yes, only the Home link is being displayed,
52
- //but not a weird "Home / Home" breadcrumb.
53
- 'title_home' => 'Home',
54
- //Text displayed for the weblog. If "'static_frontpage' => false", you
55
- //might want to change this value to "Home"
56
- 'title_blog' => 'Blog',
57
- //Separator that is placed between each item in the breadcrumb navigation, but not placed before
58
- //the first and not after the last element. You also can use images here,
59
- //e.g. '<img src="separator.gif" title="separator" width="10" height="8" />'
60
- 'separator' => ' &gt; ',
61
- //Prefix for a search page
62
- 'search_prefix' => 'Search results for &#39;',
63
- //Suffix for a search page
64
- 'search_suffix' => '&#39;',
65
- //Prefix for a author page
66
- 'author_prefix' => 'Posts by ',
67
- //Suffix for a author page
68
- 'author_suffix' => '',
69
- //Prefix for an attachment post
70
- 'attachment_prefix' => 'Attachment: ',
71
- //Suffix for an attachment post
72
- 'attachment_suffix' => '',
73
- //Name format to display for author (e.g., nickname, first_name, last_name, display_name)
74
- 'author_display' => 'display_name',
75
- //Prefix for a single blog article.
76
- 'singleblogpost_prefix' => 'Blog article: ',
77
- //Suffix for a single blog article.
78
- 'singleblogpost_suffix' => '',
79
- //Prefix for a page.
80
- 'page_prefix' => '',
81
- //Suffix for a page.
82
- 'page_suffix' => '',
83
- //The prefix that is used for mouseover link (e.g.: "Browse to: Archive")
84
- 'urltitle_prefix' => 'Browse to: ',
85
- //The suffix that is used for mouseover link
86
- 'urltitle_suffix' => '',
87
- //Prefix for categories.
88
- 'archive_category_prefix' => 'Archive by category &#39;',
89
- //Suffix for categories.
90
- 'archive_category_suffix' => '&#39;',
91
- //Prefix for archive by year/month/day
92
- 'archive_date_prefix' => 'Archive for ',
93
- //Suffix for archive by year/month/day
94
- 'archive_date_suffix' => '',
95
- //Archive date format (e.g., ISO (yy/mm/dd), US (mm/dd/yy), EU (dd/mm/yy))
96
- 'archive_date_format' => 'EU',
97
- //Prefix for tags.
98
- 'archive_tag_prefix' => 'Archive by tag &#39;',
99
- //Suffix for tags.
100
- 'archive_tag_suffix' => '&#39;',
101
- //Text displayed for a 404 error page, , only being used if 'use404' => true
102
- 'title_404' => '404',
103
- //Display the paged information on pages that are paged
104
- 'paged_display' => 'false',
105
- //Prefix to be displayed before the page number
106
- 'paged_prefix' => ', Page ',
107
- //Suffix to be displayed after the page number
108
- 'paged_suffix' => '',
109
- //Display current item as link?
110
- 'link_current_item' => 'false',
111
- //URL title of current item, only being used if 'link_current_item' => true
112
- 'current_item_urltitle' => 'Link of current page (click to refresh)', //
113
- //Style or prefix being applied as prefix to current item. E.g. <span class="bc_current">
114
- 'current_item_style_prefix' => '',
115
- //Style or prefix being applied as suffix to current item. E.g. </span>
116
- 'current_item_style_suffix' => '',
117
- //Maximum number of characters of post title to be displayed? 0 means no limit.
118
- 'posttitle_maxlen' => 0,
119
- //Display category or tag when displaying single blog post (e.g., tag or category)
120
- 'singleblogpost_taxonomy' => 'category',
121
- //Display category/tag when displaying single blog post
122
- 'singleblogpost_taxonomy_display' => 'true',
123
- //Prefix for single blog post category, only being used if 'singleblogpost_taxonomy_display' => true
124
- 'singleblogpost_category_prefix' => '',
125
- //Suffix for single blog post category, only being used if 'singleblogpost_taxonomy_display' => true
126
- 'singleblogpost_category_suffix' => '',
127
- //Prefix for single blog post category, only being used if 'singleblogpost_taxonomy_display' => true
128
- 'singleblogpost_tag_prefix' => '',
129
- //Suffix for single blog post tag, only being used if 'singleblogpost_taxonomy_display' => true
130
- 'singleblogpost_tag_suffix' => '',
131
- );
132
- //Initilize breadcrumb stream
133
- $this->breadcrumb = array
134
- (
135
- //Used for the blog title
136
- 'title' => NULL,
137
- //Used for the category/page hierarchy
138
- 'middle' => NULL,
139
- //Used for the current tiem
140
- 'last' => array
141
- (
142
- 'prefix' => NULL,
143
- 'item' => NULL,
144
- 'suffix' => NULL
145
- )
146
- );
147
  }
148
- //Handle the home page or the first link part
149
- function do_home()
 
 
 
 
 
 
150
  {
151
- //Static front page
152
- if(get_option('show_on_front') == 'page')
153
  {
154
- //If we're displaying the home
155
- if($this->opt['home_display'] === 'true')
 
 
156
  {
157
- //Should we display the home link or not
158
- if($this->opt['home_link'] === 'true')
159
- {
160
- //If so, let's set it up
161
- $this->breadcrumb['title'] = '<a title="' . $this->opt['urltitle_prefix'] . $this->opt['title_home'] . $this->opt['urltitle_suffix'] . '" href="' . $this->opt['url_home'] . '">' . $this->opt['title_home'] . '</a>';
162
- }
163
- else
164
  {
165
- //Otherwise just the specified 'title_home' will do
166
- $this->breadcrumb['title'] = $this->opt['title_home'];
167
  }
168
  }
169
- }
170
- //If it's paged, we'll want to link it to the first page
171
- else if(is_paged() && $this->opt['paged_display'] === 'true')
172
- {
173
- $this->breadcrumb['title'] = '<a title="' . $this->opt['urltitle_prefix'] . $this->opt['title_blog'] . $this->opt['urltitle_suffix'] . '" href="' . get_option('home') . '">' . $this->opt['title_blog'] . '</a>';
174
- }
175
- //Non-static front page, if link current item is off
176
- else if($this->opt['link_current_item'] === 'false')
177
- {
178
- $this->breadcrumb['title'] = $this->opt['title_blog'];
179
- }
180
- //Default to linking this is kinda hackish as we usually don't build links for the current item outside of the assembler
181
- else
182
- {
183
- $this->breadcrumb['title'] = '<a title="' . $this->opt['current_item_urltitle'] . '" href="' . get_option('home') . '">' . $this->opt['title_blog'] . '</a>';
184
  }
185
  }
186
- function do_title()
 
 
 
 
 
 
 
 
 
 
 
187
  {
188
- //If there are static front pages we need to make sure that link shows up as well as the blog title.
189
- if(get_option('show_on_front') == 'page' && $this->opt['home_display'] === 'true')
190
- {
191
- //Single posts, archives of all types, and the author pages are descendents of "blog"
192
- if(is_page())
193
- {
194
- $this->breadcrumb['title'] = '<a title="' . $this->opt['urltitle_prefix'] . $this->opt['title_home'] . $this->opt['urltitle_suffix'] . '" href="' . $this->opt['url_home'] . '">' . $this->opt['title_home'] . '</a>';
195
- }
196
- else if(is_single() || is_archive() || is_author() || (is_home() && $this->opt['link_current_item'] === 'true'))
197
- {
198
- $this->breadcrumb['title'] = array();
199
- $this->breadcrumb['title'][] = '<a title="' . $this->opt['urltitle_prefix'] . $this->opt['title_home'] . $this->opt['urltitle_suffix'] . '" href="' . $this->opt['url_home'] . '">' . $this->opt['title_home'] . '</a>';
200
- $this->breadcrumb['title'][] = '<a title="' . $this->opt['urltitle_prefix'] . $this->opt['title_blog'] . $this->opt['urltitle_suffix'] . '" href="' . $this->opt['url_home'] . $this->opt['url_blog'] . '">' . $this->opt['title_blog'] . '</a>';
201
- }
202
- //If it's on the blog page but we don't link current
203
- else if(is_home())
204
- {
205
- $this->breadcrumb['title'] = array();
206
- $this->breadcrumb['title'][] = '<a title="' . $this->opt['urltitle_prefix'] . $this->opt['title_blog'] . $this->opt['urltitle_suffix'] . '" href="' . $this->opt['url_home'] . '">' . $this->opt['title_home'] . '</a>';
207
- $this->breadcrumb['title'][] = $this->opt['title_blog'];
208
- }
209
- }
210
- else
211
- {
212
- $this->breadcrumb['title'] = '<a title="' . $this->opt['urltitle_prefix'] . $this->opt['title_blog'] . $this->opt['urltitle_suffix'] . '" href="' . get_option('home') . '">' . $this->opt['title_blog'] . '</a>';
213
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
214
  }
215
- //Handle search pages
 
 
 
 
 
 
 
216
  function do_search()
217
  {
218
- Global $s;
219
- //Get the search prefix
220
- $this->breadcrumb['last']['prefix'] = $this->opt['search_prefix'];
221
- //Get the searched text
222
- $this->breadcrumb['last']['item'] = wp_specialchars($s, 1);
223
- //Get the search suffix
224
- $this->breadcrumb['last']['suffix'] = $this->opt['search_suffix'];
 
 
 
 
225
  }
226
- //Handle "static" pages
227
- function do_page()
 
 
 
 
 
 
228
  {
229
  global $post;
230
- //Get the post title, this is a more robust method than using $post
231
- $bcn_page_title = trim(wp_title('', false));
 
 
 
 
 
 
 
 
 
232
  $bcn_parent_id = $post->post_parent;
233
- $bcn_middle = array();
234
- if($bcn_parent_id != 0)
 
 
235
  {
236
- //Fill the initial page
237
- //Use WordPress API, though a bit heavier than the old method, this will ensure compatibility with other plug-ins
238
- $bcn_parent = get_post($bcn_parent_id);
239
- $bcn_middle[] = '<a href="' . get_permalink($bcn_parent_id) . '" title="' . $this->opt['urltitle_prefix'] . $bcn_parent->post_title . $this->opt['urltitle_suffix'] . '">' . $bcn_parent->post_title . '</a>';
240
- $bcn_parent_id = $bcn_parent->post_parent;
241
- while(is_numeric($bcn_parent_id) && $bcn_parent_id != 0)
242
- {
243
- $bcn_parent = get_post($bcn_parent_id);
244
- //Pushback a page into the array
245
- $bcn_middle[] = '<a href="' . get_permalink($bcn_parent_id) . '" title="' . $this->opt['urltitle_prefix'] . $bcn_parent->post_title . $this->opt['urltitle_suffix'] . '">' . $bcn_parent->post_title . '</a>';
246
- $bcn_parent_id = $bcn_parent->post_parent;
247
- }
248
- krsort($bcn_middle);
249
  }
250
- //Check to advoid Home > Home condition, has quick fallout for non-static conditions
251
- if(get_option('page_on_front') == 0 || !$this->opt['static_frontpage'] || (strtolower($bcn_page_title) != strtolower($this->opt['title_home'])))
252
  {
253
- $this->breadcrumb['middle'] = $bcn_middle;
254
- $this->breadcrumb['last']['prefix'] = $this->opt['page_prefix'];
255
- $this->breadcrumb['last']['item'] = $bcn_page_title;
256
- $this->breadcrumb['last']['suffix'] = $this->opt['page_suffix'];
257
- }
 
 
 
 
 
 
 
 
 
 
 
 
258
  }
259
- //Handle attachment pages
260
- function do_attachment()
 
 
 
 
 
 
261
  {
262
- global $post;
263
- //Blog link and parent page
264
- $bcn_parent_id = $post->post_parent;
265
- //Get the parent information
266
- $bcn_parent = get_post($bcn_parent_id);
267
- //If the parent is a page we treat attachments like pages
268
- if($bcn_parent->post_type == "page")
 
 
 
 
 
 
 
269
  {
270
- $this->do_page();
 
271
  }
272
- //Otherwise we treat them like attachments
273
- else
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
274
  {
275
- //Setup the attachment's parent link
276
- $bcn_parents = '<a title="' . $this->opt['urltitle_prefix'] .
277
- $bcn_parent->post_title . $this->opt['urltitle_suffix'] . '" href="' . get_permalink($bcn_parent_id) . '">' . $bcn_parent->post_title . '</a>';
278
- $this->breadcrumb['middle'] = $bcn_parents;
279
- //Attachment prefix text
280
- $this->breadcrumb['last']['prefix'] = $this->opt['attachment_prefix'];
281
- //Get attachment name
282
- $this->breadcrumb['last']['item'] = trim(wp_title('', false));
283
- //Attachment suffix text
284
- $this->breadcrumb['last']['suffix'] = $this->opt['attachment_suffix'];
285
- }
286
  }
287
- //Figure out the categories leading up to the post
288
- function single_categories()
 
 
 
 
 
 
289
  {
290
  global $post;
291
- $this->breadcrumb['middle'] = array();
292
- //Fills the object to get
293
- $bcn_object = get_the_category();
294
- //Now find which one has a parrent, pick the first one that does
295
- $i = 0;
296
- $bcn_use_category = 0;
297
- foreach($bcn_object as $object)
298
- {
299
- //We want the first category hiearchy
300
- if($object->category_parent > 0 && $bcn_use_category == 0)
301
- {
302
- $bcn_use_category = $i;
303
- }
304
- $i++;
 
 
305
  }
306
- //Get parents of current category
307
- $bcn_category = $bcn_object[$bcn_use_category];
308
- //Fill the initial category
309
- $this->breadcrumb['middle'][] = $this->opt['singleblogpost_category_prefix'] . '<a href="' . get_category_link($bcn_category->cat_ID) . '" title="' . $this->opt['urltitle_prefix'] . $bcn_category->cat_name . $this->opt['urltitle_suffix'] . '">' . $bcn_category->cat_name . '</a>'. $this->opt['singleblogpost_category_suffix'];
310
- $bcn_parent_id = $bcn_category->category_parent;
311
- while($bcn_parent_id)
312
- {
313
- $bcn_category = get_category($bcn_parent_id);
314
- //Pushback a category into the array
315
- $this->breadcrumb['middle'][] = $this->opt['singleblogpost_category_prefix'] . '<a href="' . get_category_link($bcn_category->cat_ID) . '" title="' . $this->opt['urltitle_prefix'] . $bcn_category->cat_name . $this->opt['urltitle_suffix'] . '">' . $bcn_category->cat_name . '</a>' . $this->opt['singleblogpost_category_suffix'];
316
- $bcn_parent_id = $bcn_category->category_parent;
317
- }
318
- //We need to reverse the order (by key) to get the proper output
319
- krsort($this->breadcrumb['middle']);
320
  }
321
- //Figure out the tags leading up to the post
322
- function single_tags()
 
 
 
 
 
 
 
 
323
  {
324
  global $post;
325
- //Fills the object with the tags for the post
 
 
 
 
326
  $bcn_object = get_the_tags($post->ID);
327
- $i = 0;
328
  //Only process if we have tags
329
  if(is_array($bcn_object))
330
  {
 
331
  foreach($bcn_object as $tag)
332
  {
 
 
333
  //On the first run we don't need a separator
334
- if($i == 0)
335
  {
336
- $bcn_tags = $this->opt['singleblogpost_tag_prefix'] . '<a href="' . get_tag_link($tag->term_id) . '" title="' . $this->opt['urltitle_prefix'] . $tag->name . $this->opt['urltitle_suffix'] . '">' . $tag->name . '</a>'. $this->opt['singleblogpost_tag_suffix'];
337
- $i = 2;
338
  }
339
  else
340
  {
341
- $bcn_tags .= ', ' .$this->opt['singleblogpost_tag_prefix'] . '<a href="' . get_tag_link($tag->term_id) . '" title="' . $this->opt['urltitle_prefix'] . $tag->name . $this->opt['urltitle_suffix'] . '">' . $tag->name . '</a>'. $this->opt['singleblogpost_tag_suffix'];
342
-
343
  }
344
  }
345
  }
346
  else
347
  {
348
- $bcn_tags = "Untaged";
349
  }
350
- $this->breadcrumb['middle'] = $bcn_tags;
351
  }
352
- //Handle single posts
353
- function do_post()
 
 
 
 
 
 
 
354
  {
355
  global $post;
356
- //Get the post title, this is a more robust method than using $post
357
- $bcn_post_title = trim(wp_title('', false));
358
- //Add categories if told to
359
- if($this->opt['singleblogpost_taxonomy_display'] === 'true')
360
- {
361
- //If we're supposed to do tag hiearchy do that instead of category
362
- if($this->opt['singleblogpost_taxonomy'] == 'tag')
363
- {
364
- $this->single_tags();
365
- }
366
- else
367
- {
368
- $this->single_categories();
369
- }
370
- }
371
- //Trim post title if needed
372
- if($this->opt['posttitle_maxlen'] > 0 && (strlen($bcn_post_title) + 3) > $this->opt['posttitle_maxlen'])
373
- {
374
- $bcn_post_title = substr($bcn_post_title, 0, $this->opt['posttitle_maxlen'] - 1);
375
- $bcn_count = $this->opt['posttitle_maxlen'];
376
- //Make sure we can split at a space, but we want to limmit to cutting at max an additional 25%
377
- if(strpos($bcn_post_title, " ", 3 * $this->opt['posttitle_maxlen'] / 4) > 0)
378
- {
379
- //Don't split mid word
380
- while(substr($bcn_post_title,-1) != " ")
381
- {
382
- $bcn_post_title = substr($bcn_post_title, 0, -1);
383
- }
384
- }
385
- //remove the whitespace at the end and add the hellip
386
- $bcn_post_title = rtrim($bcn_post_title) . '&hellip;';
387
- }
388
- //Place it all in the array
389
- $this->breadcrumb['last']['prefix'] = $this->opt['singleblogpost_prefix'];
390
- $this->breadcrumb['last']['item'] = $bcn_post_title;
391
- $this->breadcrumb['last']['suffix'] = $this->opt['singleblogpost_suffix'];
392
- }
393
- //Handle author pages
394
- function do_author()
395
- {
396
- //Author prefix text
397
- $this->breadcrumb['last']['prefix'] = $this->opt['author_prefix'];
398
- //Get the Author name, note it is an array
399
- $bcn_curauth = (get_query_var('author_name')) ? get_userdatabylogin(get_query_var('author_name')) : get_userdata(get_query_var('author'));
400
- //Get the Author display type
401
- $bcn_authdisp = $this->opt['author_display'];
402
- //Make sure user picks only safe values
403
- if($bcn_authdisp == 'nickname' || $bcn_authdisp == 'nickname' || $bcn_authdisp == 'first_name' || $bcn_authdisp == 'last_name' || $bcn_authdisp == 'display_name')
404
  {
405
- $this->breadcrumb['last']['item'] = $bcn_curauth->$bcn_authdisp;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
406
  }
407
- $this->breadcrumb['last']['suffix'] = $this->opt['author_suffix'];
408
  }
409
- //Handle category based archives
 
 
 
 
 
 
410
  function do_archive_by_category()
411
  {
412
  global $wp_query;
 
 
 
 
 
 
 
 
 
 
413
  //Simmilar to using $post, but for things $post doesn't cover
414
  $bcn_object = $wp_query->get_queried_object();
415
  //Get parents of current category
416
- $bcn_parent_id = $bcn_object->category_parent;
417
- $cat_breadcrumbs = '';
418
- while($bcn_parent_id)
419
- {
420
- $bcn_category = get_category($bcn_parent_id);
421
- $cat_breadcrumbs = '<a href="' . get_category_link($bcn_category->cat_ID) . '" title="' . $this->opt['urltitle_prefix'] . $bcn_category->cat_name . $this->opt['urltitle_suffix'] . '">' . $bcn_category->cat_name . '</a>' . $this->opt['separator'] . $cat_breadcrumbs;
422
- $bcn_parent_id = $bcn_category->category_parent;
423
- }
424
- //New hiearchy dictates that cateories look like parent pages, and thus
425
- $this->breadcrumb['last']['prefix'] = $cat_breadcrumbs;
426
- $this->breadcrumb['last']['prefix'] .= $this->opt['archive_category_prefix'];
427
- //Current Category, uses WP API to get the title of the page, hopefully itis more robust than the old method
428
- $this->breadcrumb['last']['item'] = trim(wp_title('', false));
429
- $this->breadcrumb['last']['suffix'] = $this->opt['archive_category_suffix'];
430
  }
431
- //Handle date based archives
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
432
  function do_archive_by_date()
433
  {
434
- //If it's archives by day
 
 
 
 
435
  if(is_day())
436
  {
437
- //If the date format is US style
438
- if($this->opt['archive_date_format'] == 'US')
439
- {
440
- $this->breadcrumb['last']['prefix'] = $this->opt['archive_date_prefix'] .
441
- '<a title="Browse to the ' . get_the_time('F') . ' ' . get_the_time('Y') .
442
- ' archive" href="' . get_year_link(get_the_time('Y')) . get_the_time('m') .
443
- '">' . get_the_time('F') . '</a>' . ' ';
444
- $this->breadcrumb['last']['item'] = get_the_time('jS');
445
- $this->breadcrumb['last']['suffix'] = ', ' . ' <a title="Browse to the ' .
446
- get_the_time('Y') . ' archive" href="' . get_year_link(get_the_time('Y')) .
447
- '">' . get_the_time('Y') . '</a>' . $this->opt['archive_date_suffix'];
448
- }
449
- //If the date format is ISO style
450
- else if($this->opt['archive_date_format'] == 'ISO')
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
451
  {
452
- $this->breadcrumb['last']['prefix'] = $this->opt['archive_date_prefix'] .
453
- ' <a title="Browse to the ' . get_the_time('Y') . ' archive" href="' .
454
- get_year_link(get_the_time('Y')) . '">' . get_the_time('Y') .
455
- '</a> <a title="Browse to the ' . get_the_time('F') . ' ' . get_the_time('Y') .
456
- ' archive" href="' . get_year_link(get_the_time('Y')) . get_the_time('m') .
457
- '">' . get_the_time('F') . '</a>' . ' ';
458
- $this->breadcrumb['last']['item'] = get_the_time('d');
459
- $this->breadcrumb['last']['suffix'] = $this->opt['archive_date_suffix'];
460
  }
461
- //If the date format is European style
462
  else
463
  {
464
- $this->breadcrumb['last']['prefix'] = $this->opt['archive_date_prefix'];
465
- $this->breadcrumb['last']['item'] = get_the_time('d');
466
- $this->breadcrumb['last']['suffix'] = ' ' .'<a title="Browse to the ' .
467
- get_the_time('F') . ' ' . get_the_time('Y') . ' archive" href="' .
468
- get_year_link(get_the_time('Y')) . get_the_time('m') . '">' .
469
- get_the_time('F') . '</a>' . ' <a title="Browse to the ' . get_the_time('Y') .
470
- ' archive" href="' . get_year_link(get_the_time('Y')) . '">' .
471
- get_the_time('Y') . '</a>' . $this->opt['archive_date_suffix'];
 
 
 
 
 
 
 
 
472
  }
473
  }
474
- //If it's archives by month
475
- else if(is_month())
476
- {
477
- $this->breadcrumb['last']['prefix'] = $this->opt['archive_date_prefix'];
478
- $this->breadcrumb['last']['item'] = get_the_time('F');
479
- $this->breadcrumb['last']['suffix'] = ' ' . '<a title="Browse to the ' .
480
- get_the_time('Y') . ' archive" href="' . get_year_link(get_the_time('Y')) . '">' .
481
- get_the_time('Y') . '</a>' . $this->opt['archive_date_suffix'];
482
- }
483
- //If it's archives by year
484
- else if(is_year())
485
  {
486
- $this->breadcrumb['last']['prefix'] = $this->opt['archive_date_prefix'];
487
- $this->breadcrumb['last']['item'] = get_the_time('Y');
488
- $this->breadcrumb['last']['suffix'] = $this->opt['archive_date_suffix'];
489
  }
490
  }
491
- //Handle tag based archives
492
- function do_archive_by_tag()
 
 
 
 
 
 
493
  {
494
- $this->breadcrumb['last']['prefix'] = $this->opt['archive_tag_prefix'];
495
- //Use the WordPress API for the page title, should hook better than the other method
496
- $this->breadcrumb['last']['item'] = trim(wp_title('', false));
497
- $this->breadcrumb['last']['suffix'] = $this->opt['archive_tag_suffix'];
 
 
 
 
 
 
 
498
  }
499
- //Handled paged items
500
- function do_paged()
 
 
 
 
 
 
501
  {
502
- global $paged;
503
- //For home pages
504
- if(is_home())
505
  {
506
- $this->breadcrumb['title'] .= $this->opt['paged_prefix'] . $paged . $this->opt['paged_suffix'];
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
507
  }
508
- //For archive/search pages
509
- else
510
  {
511
- $this->breadcrumb['last']['suffix'] .= $this->opt['paged_prefix'] . $paged . $this->opt['paged_suffix'];
 
 
 
 
 
 
 
 
 
 
 
 
 
512
  }
513
  }
514
- //This function assembles the breadcrumb for the current page
515
- function assemble()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
516
  {
517
  global $wpdb, $post, $wp_query, $bcn_version, $paged;
518
  ////////////////////////////////////
519
  //Do specific opperations for the various page types
520
  ////////////////////////////////////
521
- //For the home/front page
522
- if(is_front_page())
523
  {
524
- $this->do_home();
525
  }
526
- //Otherwise we dosomething slightly different
527
- else
528
  {
529
- $this->do_title();
530
- //For searches
531
- if(is_search())
532
- {
533
- $this->do_search();
534
- }
535
- ////////////////////////////////////
536
- //For pages
537
- else if(is_page())
538
- {
539
- $this->do_page();
540
- }
541
- ////////////////////////////////////
542
- //For post/page attachments
543
- else if(is_attachment())
544
- {
545
- $this->do_attachment();
546
- }
547
- ////////////////////////////////////
548
- //For blog posts
549
- else if(is_single())
550
- {
551
- $this->do_post();
552
- }
553
- ////////////////////////////////////
554
- //For author pages
555
- else if(is_author())
556
- {
557
- $this->do_author();
558
- }
559
- ////////////////////////////////////
560
- //For category based archives
561
- else if(is_archive() && is_category())
562
- {
563
- $this->do_archive_by_category();
564
- }
565
- ////////////////////////////////////
566
- //For date based archives
567
- else if(is_archive() && is_date())
568
  {
569
- $this->do_archive_by_date();
570
- }
571
- ////////////////////////////////////
572
- //For tag based archives
573
- else if(is_archive() && is_tag())
574
- {
575
- $this->do_archive_by_tag();
576
- }
577
- ////////////////////////////////////
578
- //For 404 pages
579
- else if(is_404())
580
- {
581
- $this->breadcrumb['last']['item'] = $this->opt['title_404'];
582
- }
583
- ////////////////////////////////////
584
- //For paged items
585
- if(is_paged() && $this->opt['paged_display'] === 'true')
586
- {
587
- $this->do_paged();
588
  }
589
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
590
  }
591
  /**
592
  * display
@@ -595,76 +844,55 @@ class bcn_breadcrumb
595
  *
596
  * This functions outputs or returns the breadcrumb trail.
597
  *
598
- * @param (bool) $bcn_return Wether to return data or to echo it
599
- *
 
600
  * @return (void) Void if Option to print out breadcrumb trail was chosen.
601
  * @return (string) String-Data of breadcrumb trail.
602
  */
603
- function display($bcn_return = false)
604
  {
605
  global $bcn_version;
606
- ////////////////////////////////////
607
- //Assemble the breadcrumb
608
- $bcn_output = '';
609
- if($this->breadcrumb['title'])
610
  {
611
- if(is_array($this->breadcrumb['title']))
 
612
  {
613
- //If the title is an array we only allow two entries, so manually unrolling the loop is ok here
614
- //Should end up containing 'home'
615
- $bcn_output .= $this->breadcrumb['title'][0];
616
- //Should end up displaying 'blog'
617
- $bcn_output .= $this->opt['separator'] . $this->breadcrumb['title'][1];
618
  }
619
- else
 
620
  {
621
- $bcn_output .= $this->breadcrumb['title'];
622
- }
623
- if(is_array($this->breadcrumb['middle']))
624
- {
625
- foreach($this->breadcrumb['middle'] as $bcn_mitem)
626
- {
627
- $bcn_output .= $this->opt['separator'] . $bcn_mitem;
628
- }
629
  }
630
- else if($this->breadcrumb['middle'])
 
 
 
631
  {
632
- $bcn_output .= $this->opt['separator'] . $this->breadcrumb['middle'];
633
  }
634
- if($this->breadcrumb['last']['item'] != NULL)
 
635
  {
636
- if($this->opt['link_current_item'] === 'true')
637
- {
638
- $this->breadcrumb['last']['item'] = '<a title="' . $this->opt['current_item_urltitle'] .
639
- '" href="' . '">' .
640
- $this->breadcrumb['last']['item'] . '</a>';
641
- }
642
- $bcn_output .= $this->opt['separator'] . $this->opt['current_item_style_prefix'] .
643
- $this->breadcrumb['last']['prefix'] . $this->breadcrumb['last']['item'] .
644
- $this->breadcrumb['last']['suffix'] . $this->opt['current_item_style_suffix'];
645
  }
 
646
  }
647
- //Polyglot compatibility filter
648
- if(function_exists('polyglot_filter'))
649
- {
650
- $bcn_output = polyglot_filter($bcn_output);
651
- }
652
- //qTranslate compatibility filter
653
- if(function_exists('qtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage'))
654
- {
655
- $bcn_output = qtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage($bcn_output);
656
- }
657
- //Return it or echo it?
658
  if($bcn_return)
659
  {
660
- return $bcn_output;
661
  }
662
  else
663
  {
664
  //Giving credit where credit is due, please don't remove it
665
  $bcn_tag = "<!-- \nBreadcrumb, generated by Breadcrumb NavXT " . $bcn_version . " - http://mtekk.weblogs.us/code \n-->";
666
- echo $bcn_tag . $bcn_output;
667
  }
668
  }
669
- }
670
- ?>
3
  Plugin Name: Breadcrumb NavXT - Core
4
  Plugin URI: http://mtekk.weblogs.us/code/breadcrumb-navxt/
5
  Description: Adds a breadcrumb navigation showing the visitor&#39;s path to their current location. This plug-in provides direct access to the bcn_breadcrumb class without using the administrative interface. For details on how to use this plugin visit <a href="http://mtekk.weblogs.us/code/breadcrumb-navxt/">Breadcrumb NavXT</a>.
6
+ Version: 2.1.99
7
  Author: John Havlik
8
  Author URI: http://mtekk.weblogs.us/
9
  */
23
  along with this program; if not, write to the Free Software
24
  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25
  */
26
+ //Internal version number, may differ from above
27
+ $bcn_version = "2.2.0";
28
+ //The breadcrumb class
29
  class bcn_breadcrumb
30
  {
31
+ //Our member variables
32
+ //The main text that will be shown
33
+ var $title;
34
+ //Boolean, is this element linked
35
+ var $linked;
36
+ //Linked anchor contents, null if $linked == false
37
+ var $anchor;
38
+ //Global prefix, outside of link tags
39
+ var $prefix;
40
+ //Global suffix, outside of link tags
41
+ var $suffix;
42
+ //Default constructor
43
+ function breadcrumb()
44
  {
45
+ //Default state of unlinked
46
+ $this->linked = false;
47
+ //Always NULL if unlinked
48
+ $this->anchor = NULL;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
49
  }
50
+ /**
51
+ * title_trim
52
+ *
53
+ * This function will intelligently trim the title to the value passed in through $max_length.
54
+ *
55
+ * @param (int) max_length of the title.
56
+ */
57
+ function title_trim($max_length)
58
  {
59
+ //Make sure that we are not making it longer with that ellipse
60
+ if((strlen($this->title) + 3) > $max_length)
61
  {
62
+ //Trim the title
63
+ $this->title = substr($this->title, 0, $max_length - 1);
64
+ //Make sure we can split at a space, but we want to limmit to cutting at max an additional 25%
65
+ if(strpos($this->title, " ", .75 * $max_length) > 0)
66
  {
67
+ //Don't split mid word
68
+ while(substr($this->title,-1) != " ")
 
 
 
 
 
69
  {
70
+ $this->title = substr($this->title, 0, -1);
 
71
  }
72
  }
73
+ //Remove the whitespace at the end and add the hellip
74
+ $this->title = rtrim($this->title) . '&hellip;';
 
 
 
 
 
 
 
 
 
 
 
 
 
75
  }
76
  }
77
+ }
78
+
79
+ //The trail class
80
+ class bcn_breadcrumb_trail
81
+ {
82
+ //Our member variables
83
+ //An array of breadcrumbs
84
+ var $trail;
85
+ //The options
86
+ var $opt;
87
+ //Default constructor
88
+ function bcn_breadcrumb_trail()
89
  {
90
+ //Initilize the trail as an array
91
+ $this->trail = array();
92
+ //Initilize with default option values
93
+ $this->opt = array
94
+ (
95
+ //Should the home page be shown
96
+ 'home_display' => true,
97
+ //Title displayed when is_home() returns true
98
+ 'home_title' => 'Blog',
99
+ //The anchor template for the home page, this is global, two keywords are available %link% and %title%
100
+ 'home_anchor' => '<a title="Go to %title%." href="%link%">',
101
+ //The anchor template for the blog page only in static front page mode, this is global, two keywords are available %link% and %title%
102
+ 'blog_anchor' => '<a title="Go to %title%." href="%link%">',
103
+ //Separator that is placed between each item in the breadcrumb trial, but not placed before
104
+ //the first and not after the last breadcrumb
105
+ 'separator' => ' &gt; ',
106
+ //The maximum title lenght
107
+ 'max_title_length' => 0,
108
+ //Current item options, really only applies to static pages and posts unless other current items are linked
109
+ 'current_item_linked' => false,
110
+ //The anchor template for current items, this is global, two keywords are available %link% and %title%
111
+ 'current_item_anchor' => '<a title="Reload the current page." href="%link%">',
112
+ //The prefix for current items allows separate styling of the current location breadcrumb
113
+ 'current_item_prefix' => '',
114
+ //The suffix for current items allows separate styling of the current location breadcrumb
115
+ 'current_item_suffix' => '',
116
+ //Static page options
117
+ //The prefix for page breadcrumbs, place on all page elements and inside of current_item prefix
118
+ 'page_prefix' => '',
119
+ //The suffix for page breadcrumbs, place on all page elements and inside of current_item suffix
120
+ 'page_suffix' => '',
121
+ //The anchor template for page breadcrumbs, two keywords are available %link% and %title%
122
+ 'page_anchor' => '<a title="Go to %title%." href="%link%">',
123
+ //Paged options
124
+ //The prefix for paged breadcrumbs, place on all page elements and inside of current_item prefix
125
+ 'paged_prefix' => '',
126
+ //The suffix for paged breadcrumbs, place on all page elements and inside of current_item suffix
127
+ 'paged_suffix' => '',
128
+ //Should we try filling out paged information
129
+ 'paged_display' => false,
130
+ //The post options previously singleblogpost
131
+ //The prefix for post breadcrumbs, place on all page elements and inside of current_item prefix
132
+ 'post_prefix' => '',
133
+ //The suffix for post breadcrumbs, place on all page elements and inside of current_item suffix
134
+ 'post_suffix' => '',
135
+ //The anchor template for post breadcrumbs, two keywords are available %link% and %title%
136
+ 'post_anchor' => '<a title="Go to %title%." href="%link%">',
137
+ //Should the trail include the taxonomy of the post
138
+ 'post_taxonomy_display' => true,
139
+ //What taxonomy should be shown leading to the post, tag or category
140
+ 'post_taxonomy_type' => 'category',
141
+ //Attachment settings
142
+ //The prefix for attachment breadcrumbs, place on all page elements and inside of current_item prefix
143
+ 'attachment_prefix' => '',
144
+ //The suffix for attachment breadcrumbs, place on all page elements and inside of current_item suffix
145
+ 'attachment_suffix' => '',
146
+ //404 page settings
147
+ //The prefix for 404 breadcrumbs, place on all page elements and inside of current_item prefix
148
+ '404_prefix' => '',
149
+ //The suffix for 404 breadcrumbs, place on all page elements and inside of current_item suffix
150
+ '404_suffix' => '',
151
+ //The text to be shown in the breadcrumb for a 404 page
152
+ '404_title' => '404',
153
+ //Search page options
154
+ //The prefix for search breadcrumbs, place on all page elements and inside of current_item prefix
155
+ 'search_prefix' => 'Search results for &#39;',
156
+ //The suffix for search breadcrumbs, place on all page elements and inside of current_item suffix
157
+ 'search_suffix' => '&#39;',
158
+ //Tag related stuff
159
+ //The prefix for tag breadcrumbs, place on all page elements and inside of current_item prefix
160
+ 'tag_prefix' => '',
161
+ //The suffix for tag breadcrumbs, place on all page elements and inside of current_item suffix
162
+ 'tag_suffix' => '',
163
+ //The anchor template for tag breadcrumbs, two keywords are available %link% and %title%
164
+ 'tag_anchor' => '<a title="Go to the %title% tag archives." href="%link%">',
165
+ //Author page stuff
166
+ //The prefix for author breadcrumbs, place on all page elements and inside of current_item prefix
167
+ 'author_prefix' => 'Articles by: ',
168
+ //The suffix for author breadcrumbs, place on all page elements and inside of current_item suffix
169
+ 'author_suffix' => '',
170
+ //Which of the various WordPress display types should the author crumb display
171
+ 'author_display' => 'display_name',
172
+ //Category stuff
173
+ //The prefix for category breadcrumbs, place on all page elements and inside of current_item prefix
174
+ 'category_prefix' => '',
175
+ //The suffix for category breadcrumbs, place on all page elements and inside of current_item suffix
176
+ 'category_suffix' => '',
177
+ //The anchor template for category breadcrumbs, two keywords are available %link% and %title%
178
+ 'category_anchor' => '<a title="Go to the %title% category archives." href="%link%">',
179
+ //Archives related settings
180
+ //Prefix for category archives, place inside of both the current_item prefix and the category_prefix
181
+ 'archive_category_prefix' => 'Archive by category &#39;',
182
+ //Suffix for category archives, place inside of both the current_item suffix and the category_suffix
183
+ 'archive_category_suffix' => '&#39;',
184
+ //Prefix for tag archives, place inside of the current_item prefix
185
+ 'archive_tag_prefix' => 'Archive by tag &#39;',
186
+ //Suffix for tag archives, place inside of the current_item suffix
187
+ 'archive_tag_suffix' => '&#39;',
188
+ 'date_anchor' => '<a title="Go to the %title% archives." href="%link%">',
189
+ //Prefix for date archives, place inside of the current_item prefix
190
+ 'archive_date_prefix' => '',
191
+ //Suffix for date archives, place inside of the current_item suffix
192
+ 'archive_date_suffix' => ''
193
+ );
194
  }
195
+ //The do filling functions
196
+ /**
197
+ * do_search
198
+ *
199
+ * A Breadcrumb Trail Filling Function
200
+ *
201
+ * This functions fills a breadcrumb for a search page.
202
+ */
203
  function do_search()
204
  {
205
+ global $s;
206
+ //Add new breadcrumb to the trail
207
+ $this->trail[] = new bcn_breadcrumb();
208
+ //Figure out where we placed the crumb, make a nice pointer to it
209
+ $bcn_breadcrumb = &$this->trail[count($this->trail) - 1];
210
+ //Assign the prefix
211
+ $bcn_breadcrumb->prefix = $this->opt['current_item_prefix'] . $this->opt['search_prefix'];
212
+ //Assign the suffix
213
+ $bcn_breadcrumb->suffix = $this->opt['search_suffix'] . $this->opt['current_item_suffix'];
214
+ //Assign the title
215
+ $bcn_breadcrumb->title = wp_specialchars($s, 1);
216
  }
217
+ /**
218
+ * do_attachment
219
+ *
220
+ * A Breadcrumb Trail Filling Function
221
+ *
222
+ * This functions fills a breadcrumb for an attachment page.
223
+ */
224
+ function do_attachment()
225
  {
226
  global $post;
227
+ //Add new breadcrumb to the trail
228
+ $this->trail[] = new bcn_breadcrumb();
229
+ //Figure out where we placed the crumb, make a nice pointer to it
230
+ $bcn_breadcrumb = &$this->trail[count($this->trail) - 1];
231
+ //Assign the prefix
232
+ $bcn_breadcrumb->prefix = $this->opt['current_item_prefix'] . $this->opt['attachment_prefix'];
233
+ //Assign the suffix
234
+ $bcn_breadcrumb->suffix = $this->opt['attachment_suffix'] . $this->opt['current_item_suffix'];
235
+ //Addign the title, using a better method
236
+ $bcn_breadcrumb->title = get_the_title();
237
+ //Get the parent page/post of the attachment
238
  $bcn_parent_id = $post->post_parent;
239
+ //Get the parent's information
240
+ $bcn_parent = get_post($bcn_parent_id);
241
+ //We need to treat post and page attachment hierachy differently
242
+ if($bcn_parent->post_type == "page")
243
  {
244
+ //Place the rest of the page hierachy
245
+ $this->page_parents($bcn_parent_id);
 
 
 
 
 
 
 
 
 
 
 
246
  }
247
+ else
 
248
  {
249
+ //Add new breadcrumb to the trail
250
+ $this->trail[] = new bcn_breadcrumb();
251
+ //Figure out where we placed the crumb, make a nice pointer to it
252
+ $bcn_breadcrumb = &$this->trail[count($this->trail) - 1];
253
+ //Assign the prefix
254
+ $bcn_breadcrumb->prefix = $this->opt['post_prefix'];
255
+ //Assign the suffix
256
+ $bcn_breadcrumb->suffix = $this->opt['post_suffix'];
257
+ //Get the parent's information
258
+ $bcn_parent = get_post($bcn_parent_id);
259
+ //Adding the title, throw it through the filters
260
+ $bcn_breadcrumb->title = apply_filters("the_title", $bcn_parent->post_title);
261
+ //Assign the anchor properties
262
+ $bcn_breadcrumb->anchor = str_replace("%title%", $bcn_breadcrumb->title, str_replace("%link%", get_permalink($bcn_parent_id), $this->opt['post_anchor']));
263
+ //We want this to be linked
264
+ $bcn_breadcrumb->linked = true;
265
+ }
266
  }
267
+ /**
268
+ * do_author
269
+ *
270
+ * A Breadcrumb Trail Filling Function
271
+ *
272
+ * This functions fills a breadcrumb for an author page.
273
+ */
274
+ function do_author()
275
  {
276
+ //Add new breadcrumb to the trail
277
+ $this->trail[] = new bcn_breadcrumb();
278
+ //Figure out where we placed the crumb, make a nice pointer to it
279
+ $bcn_breadcrumb = &$this->trail[count($this->trail) - 1];
280
+ //Assign the prefix
281
+ $bcn_breadcrumb->prefix = $this->opt['current_item_prefix'] . $this->opt['author_prefix'];
282
+ //Assign the suffix
283
+ $bcn_breadcrumb->suffix = $this->opt['author_suffix'] . $this->opt['current_item_suffix'];
284
+ //Get the Author name, note it is an array
285
+ $bcn_curauth = (get_query_var('author_name')) ? get_userdatabylogin(get_query_var('author_name')) : get_userdata(get_query_var('author'));
286
+ //Get the Author display type
287
+ $bcn_authdisp = $this->opt['author_display'];
288
+ //Make sure user picks only safe values
289
+ if($bcn_authdisp == "nickname" || $bcn_authdisp == "first_name" || $bcn_authdisp == "last_name" || $bcn_authdisp == "display_name")
290
  {
291
+ //Assign the title
292
+ $bcn_breadcrumb->title = apply_filters("the_author", $bcn_curauth->$bcn_authdisp);
293
  }
294
+ }
295
+ /**
296
+ * page_parents
297
+ *
298
+ * A Breadcrumb Trail Filling Function
299
+ *
300
+ * This recursive functions fills the trail with breadcrumbs for parent pages.
301
+ * @param (int) $id The id of the parent page.
302
+ */
303
+ function page_parents($id)
304
+ {
305
+ //Add new breadcrumb to the trail
306
+ $this->trail[] = new bcn_breadcrumb();
307
+ //Figure out where we placed the crumb, make a nice pointer to it
308
+ $bcn_breadcrumb = &$this->trail[count($this->trail) - 1];
309
+ //Assign the prefix
310
+ $bcn_breadcrumb->prefix = $this->opt['page_prefix'];
311
+ //Assign the suffix
312
+ $bcn_breadcrumb->suffix = $this->opt['page_suffix'];
313
+ //Use WordPress API, though a bit heavier than the old method, this will ensure compatibility with other plug-ins
314
+ $bcn_parent = get_post($id);
315
+ //Assign the title
316
+ $bcn_breadcrumb->title = apply_filters("the_title", $bcn_parent->post_title);
317
+ //Assign the anchor properties
318
+ $bcn_breadcrumb->anchor = str_replace("%title%", $bcn_breadcrumb->title, str_replace("%link%", get_permalink($id), $this->opt['page_anchor']));
319
+ //We want this to be linked
320
+ $bcn_breadcrumb->linked = true;
321
+ //Figure out the next parent id
322
+ $bcn_parent_id = $bcn_parent->post_parent;
323
+ //Make sure the id is valid
324
+ if(is_numeric($bcn_parent_id) && $bcn_parent_id != 0)
325
  {
326
+ //If valid, recursivly call this function
327
+ $this->page_parents($bcn_parent_id);
328
+ }
 
 
 
 
 
 
 
 
329
  }
330
+ /**
331
+ * do_page
332
+ *
333
+ * A Breadcrumb Trail Filling Function
334
+ *
335
+ * This functions fills a breadcrumb for a atatic page.
336
+ */
337
+ function do_page()
338
  {
339
  global $post;
340
+ //Add new breadcrumb to the trail
341
+ $this->trail[] = new bcn_breadcrumb();
342
+ //Figure out where we placed the crumb, make a nice pointer to it
343
+ $bcn_breadcrumb = &$this->trail[count($this->trail) - 1];
344
+ //Assign the prefix
345
+ $bcn_breadcrumb->prefix = $this->opt['current_item_prefix'] . $this->opt['page_prefix'];
346
+ //Assign the suffix
347
+ $bcn_breadcrumb->suffix = $this->opt['page_suffix'] . $this->opt['current_item_suffix'];
348
+ //Assign the title, using our older method to replace in the future
349
+ $bcn_breadcrumb->title = get_the_title();
350
+ //Done with the current item, now on to the parents
351
+ $bcn_parent_id = $post->post_parent;
352
+ //If there is a parent page let's find it
353
+ if(is_numeric($bcn_parent_id) && $bcn_parent_id != 0)
354
+ {
355
+ $this->page_parents($bcn_parent_id);
356
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
357
  }
358
+ /**
359
+ * post_tag
360
+ *
361
+ * A Breadcrumb Trail Filling Function
362
+ *
363
+ * This functions fills a breadcrumb for the tags of a post
364
+ *
365
+ * @TODO Need to implement this cleaner, possibly a recursive object
366
+ */
367
+ function post_tags()
368
  {
369
  global $post;
370
+ //Add new breadcrumb to the trail
371
+ $this->trail[] = new bcn_breadcrumb();
372
+ //Figure out where we placed the crumb, make a nice pointer to it
373
+ $bcn_breadcrumb = &$this->trail[count($this->trail) - 1];
374
+ //Fills a temporary object with the tags for the post
375
  $bcn_object = get_the_tags($post->ID);
 
376
  //Only process if we have tags
377
  if(is_array($bcn_object))
378
  {
379
+ $i = true;
380
  foreach($bcn_object as $tag)
381
  {
382
+ //Run through a filter for good measure
383
+ $tag->name = apply_filters("get_tag", $tag->name);
384
  //On the first run we don't need a separator
385
+ if($i)
386
  {
387
+ $bcn_breadcrumb->title = $this->opt['tag_prefix'] . str_replace("%title%", $tag->name, str_replace("%link%", get_tag_link($tag->term_id), $this->opt['tag_anchor'])) . $tag->name . "</a>" . $this->opt['tag_suffix'];
388
+ $i = false;
389
  }
390
  else
391
  {
392
+ $bcn_breadcrumb->title .= ', ' . $this->opt['tag_prefix'] . str_replace("%title%", $tag->name, str_replace("%link%", get_tag_link($tag->term_id), $this->opt['tag_anchor'])) . $tag->name . "</a>" . $this->opt['tag_suffix'];
 
393
  }
394
  }
395
  }
396
  else
397
  {
398
+ $bcn_breadcrumb->title = "Untaged";
399
  }
 
400
  }
401
+ /**
402
+ * category_parents
403
+ *
404
+ * A Breadcrumb Trail Filling Function
405
+ *
406
+ * This recursive functions fills the trail with breadcrumbs for parent categories.
407
+ * @param (int) $id The id of the parent category.
408
+ */
409
+ function category_parents($id)
410
  {
411
  global $post;
412
+ //We kick out of the recursive loop when the id is not valid
413
+ if($id)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
414
  {
415
+ //Add new breadcrumb to the trail
416
+ $this->trail[] = new bcn_breadcrumb();
417
+ //Figure out where we placed the crumb, make a nice pointer to it
418
+ $bcn_breadcrumb = &$this->trail[count($this->trail) - 1];
419
+ //Assign the prefix
420
+ $bcn_breadcrumb->prefix = $this->opt['category_prefix'];
421
+ //Assign the suffix
422
+ $bcn_breadcrumb->suffix = $this->opt['category_suffix'];
423
+ //Get the current category object
424
+ $bcn_category = get_category($id);
425
+ //Setup the title, throw it through a filter
426
+ $bcn_breadcrumb->title = apply_filters("get_category", $bcn_category->cat_name);
427
+ //Figure out the anchor for the first category
428
+ $bcn_breadcrumb->anchor = str_replace("%title%", $bcn_breadcrumb->title, str_replace("%link%", get_category_link($bcn_category->cat_ID), $this->opt['category_anchor']));
429
+ //We want this to be linked
430
+ $bcn_breadcrumb->linked = true;
431
+ //Figure out the rest of the category hiearchy via recursion
432
+ $this->category_parents($bcn_category->category_parent);
433
  }
 
434
  }
435
+ /**
436
+ * do_archive_by_category
437
+ *
438
+ * A Breadcrumb Trail Filling Function
439
+ *
440
+ * This functions fills a breadcrumb for a category archive.
441
+ */
442
  function do_archive_by_category()
443
  {
444
  global $wp_query;
445
+ //Add new breadcrumb to the trail
446
+ $this->trail[] = new bcn_breadcrumb();
447
+ //Figure out where we placed the crumb, make a nice pointer to it
448
+ $bcn_breadcrumb = &$this->trail[count($this->trail) - 1];
449
+ //Assign the prefix
450
+ $bcn_breadcrumb->prefix = $this->opt['current_item_prefix'] . $this->opt['category_prefix'] . $this->opt['archive_category_prefix'];
451
+ //Assign the suffix
452
+ $bcn_breadcrumb->suffix = $this->opt['archive_category_suffix'] . $this->opt['category_suffix'] . $this->opt['current_item_suffix'];
453
+ //Assign the title
454
+ $bcn_breadcrumb->title = single_cat_title("", false);
455
  //Simmilar to using $post, but for things $post doesn't cover
456
  $bcn_object = $wp_query->get_queried_object();
457
  //Get parents of current category
458
+ $this->category_parents($bcn_object->category_parent);
 
 
 
 
 
 
 
 
 
 
 
 
 
459
  }
460
+ /**
461
+ * do_archive_by_tag
462
+ *
463
+ * A Breadcrumb Trail Filling Function
464
+ *
465
+ * This functions fills a breadcrumb for a tag archive.
466
+ */
467
+ function do_archive_by_tag()
468
+ {
469
+ global $wp_query;
470
+ //Add new breadcrumb to the trail
471
+ $this->trail[] = new bcn_breadcrumb();
472
+ //Figure out where we placed the crumb, make a nice pointer to it
473
+ $bcn_breadcrumb = &$this->trail[count($this->trail) - 1];
474
+ //Assign the prefix
475
+ $bcn_breadcrumb->prefix = $this->opt['current_item_prefix'] . $this->opt['archive_tag_prefix'];
476
+ //Assign the suffix
477
+ $bcn_breadcrumb->suffix = $this->opt['archive_tag_suffix'] . $this->opt['current_item_suffix'];
478
+ //Assign the title
479
+ $bcn_breadcrumb->title = single_tag_title("", false);
480
+ }
481
+ /**
482
+ * do_archive_by_date
483
+ *
484
+ * A Breadcrumb Trail Filling Function
485
+ *
486
+ * This functions fills a breadcrumb for a date archive.
487
+ */
488
  function do_archive_by_date()
489
  {
490
+ global $wp_query;
491
+ //Add new breadcrumb to the trail
492
+ $this->trail[] = new bcn_breadcrumb();
493
+ //Figure out where we placed the crumb, make a nice pointer to it
494
+ $bcn_breadcrumb = &$this->trail[count($this->trail) - 1];
495
  if(is_day())
496
  {
497
+ //First deal with the day breadcrumb
498
+ //Assign the prefix
499
+ $bcn_breadcrumb->prefix = $this->opt['current_item_prefix'] . $this->opt['archive_date_prefix'];
500
+ //Assign the suffix
501
+ $bcn_breadcrumb->suffix = $this->opt['archive_date_suffix'] . $this->opt['current_item_suffix'];
502
+ //Assign the title
503
+ $bcn_breadcrumb->title = get_the_time('d');
504
+ //Next add in the month breadcrumb
505
+ //Add new breadcrumb to the trail
506
+ $this->trail[] = new bcn_breadcrumb();
507
+ //Figure out where we placed the crumb, make a nice pointer to it
508
+ $bcn_breadcrumb = &$this->trail[count($this->trail) - 1];
509
+ //Assign the prefix
510
+ $bcn_breadcrumb->prefix = $this->opt['archive_date_prefix'];
511
+ //Assign the suffix
512
+ $bcn_breadcrumb->suffix = $this->opt['archive_date_suffix'];
513
+ //Assign the title
514
+ $bcn_breadcrumb->title = get_the_time('F');
515
+ //Deal with the anchor
516
+ $bcn_breadcrumb->anchor = str_replace("%title%", get_the_time('F') . " " . get_the_time('Y'), str_replace("%link%", get_month_link(get_the_time('Y'), get_the_time('m')), $this->opt['date_anchor']));
517
+ //Yes we want this linked
518
+ $bcn_breadcrumb->linked = true;
519
+ }
520
+ else if(is_month())
521
+ {
522
+ //Assign the prefix
523
+ $bcn_breadcrumb->prefix = $this->opt['current_item_prefix'] . $this->opt['archive_date_prefix'];
524
+ //Assign the suffix
525
+ $bcn_breadcrumb->suffix = $this->opt['archive_date_suffix'] . $this->opt['current_item_suffix'];
526
+ //Assign the title
527
+ $bcn_breadcrumb->title = get_the_time('F');
528
+ }
529
+ if(is_month() || is_day())
530
+ {
531
+ //Next add in the year breadcrumb
532
+ //Add new breadcrumb to the trail
533
+ $this->trail[] = new bcn_breadcrumb();
534
+ //Figure out where we placed the crumb, make a nice pointer to it
535
+ $bcn_breadcrumb = &$this->trail[count($this->trail) - 1];
536
+ //Assign the prefix
537
+ $bcn_breadcrumb->prefix = $this->opt['archive_date_prefix'];
538
+ //Assign the suffix
539
+ $bcn_breadcrumb->suffix = $this->opt['archive_date_suffix'];
540
+ //Assign the title
541
+ $bcn_breadcrumb->title = get_the_time('Y');
542
+ //Deal with the anchor
543
+ $bcn_breadcrumb->anchor = str_replace("%title%", get_the_time('Y'), str_replace("%link%", get_year_link(get_the_time('Y')), $this->opt['date_anchor']));
544
+ //Yes we want this linked
545
+ $bcn_breadcrumb->linked = true;
546
+ }
547
+ else
548
+ {
549
+ //Assign the prefix
550
+ $bcn_breadcrumb->prefix = $this->opt['current_item_prefix'] . $this->opt['archive_date_prefix'];
551
+ //Assign the suffix
552
+ $bcn_breadcrumb->suffix = $this->opt['archive_date_suffix'] . $this->opt['current_item_suffix'];
553
+ //Assign the title
554
+ $bcn_breadcrumb->title = get_the_time('Y');
555
+ }
556
+ }
557
+ /**
558
+ * do_post
559
+ *
560
+ * A Breadcrumb Trail Filling Function
561
+ *
562
+ * This functions fills a breadcrumb for a post.
563
+ */
564
+ function do_post()
565
+ {
566
+ global $post;
567
+ //Add new breadcrumb to the trail
568
+ $this->trail[] = new bcn_breadcrumb();
569
+ //Figure out where we placed the crumb, make a nice pointer to it
570
+ $bcn_breadcrumb = &$this->trail[count($this->trail) - 1];
571
+ //Assign the prefix
572
+ $bcn_breadcrumb->prefix = $this->opt['current_item_prefix'] . $this->opt['post_prefix'];
573
+ //Assign the suffix
574
+ $bcn_breadcrumb->suffix = $this->opt['post_suffix'] . $this->opt['current_item_suffix'];
575
+ //Assign the title
576
+ $bcn_breadcrumb->title = get_the_title();
577
+ //Check to see if breadcrumbs for the taxonomy of the post needs to be generated
578
+ if($this->opt['post_taxonomy_display'])
579
+ {
580
+ //Figure out which taxonomy is desired
581
+ if($this->opt['post_taxonomy_type'] == "tag")
582
  {
583
+ $this->post_tags();
 
 
 
 
 
 
 
584
  }
 
585
  else
586
  {
587
+ //Fills the temp object to get the categories
588
+ $bcn_object = get_the_category();
589
+ //Now find which one has a parent, pick the first one that does
590
+ $i = 0;
591
+ $bcn_use_category = 0;
592
+ foreach($bcn_object as $object)
593
+ {
594
+ //We want the first category hiearchy
595
+ if($object->category_parent > 0 && $bcn_use_category == 0)
596
+ {
597
+ $bcn_use_category = $i;
598
+ }
599
+ $i++;
600
+ }
601
+ //Fill out the category hiearchy
602
+ $this->category_parents($bcn_object[$bcn_use_category]->term_id);
603
  }
604
  }
605
+ //If our max title length is greater than 0 we should do something
606
+ if($this->opt['max_title_length'] > 0)
 
 
 
 
 
 
 
 
 
607
  {
608
+ $bcn_breadcrumb->title_trim($this->opt['max_title_length']);
 
 
609
  }
610
  }
611
+ /**
612
+ * do_front_page
613
+ *
614
+ * A Breadcrumb Trail Filling Function
615
+ *
616
+ * This functions fills a breadcrumb for the front page.
617
+ */
618
+ function do_front_page()
619
  {
620
+ global $post;
621
+ //Add new breadcrumb to the trail
622
+ $this->trail[] = new bcn_breadcrumb();
623
+ //Figure out where we placed the crumb, make a nice pointer to it
624
+ $bcn_breadcrumb = &$this->trail[count($this->trail) - 1];
625
+ //Assign the title
626
+ $bcn_breadcrumb->title = $this->opt['home_title'];
627
+ //Assign the prefix
628
+ $bcn_breadcrumb->prefix = $this->opt['current_item_prefix'] . $this->opt['home_prefix'];
629
+ //Assign the suffix
630
+ $bcn_breadcrumb->suffix = $this->opt['home_suffix'] . $this->opt['current_item_suffix'];
631
  }
632
+ /**
633
+ * do_home
634
+ *
635
+ * A Breadcrumb Trail Filling Function
636
+ *
637
+ * This functions fills a breadcrumb for the home page.
638
+ */
639
+ function do_home()
640
  {
641
+ global $post;
642
+ if(get_option('show_on_front') == "page")
 
643
  {
644
+ //We only need the "blog" portion on members of the blog, not searches, pages or 404s
645
+ if(is_single() || is_archive() || is_author() || is_home())
646
+ {
647
+ //Add new breadcrumb to the trail
648
+ $this->trail[] = new bcn_breadcrumb();
649
+ //Figure out where we placed the crumb, make a nice pointer to it
650
+ $bcn_breadcrumb = &$this->trail[count($this->trail) - 1];
651
+ //Get the blog page ID
652
+ $bcn_blog = get_post(get_option("page_for_posts"));
653
+ //Setup the title
654
+ $bcn_breadcrumb->title = apply_filters("the_title", $bcn_blog->post_title);
655
+ if(is_home())
656
+ {
657
+ //Assign the prefix
658
+ $bcn_breadcrumb->prefix = $this->opt['current_item_prefix'] . $this->opt['page_prefix'];
659
+ //Assign the suffix
660
+ $bcn_breadcrumb->suffix = $this->opt['page_suffix'] . $this->opt['current_item_suffix'];
661
+ }
662
+ else
663
+ {
664
+ //Assign the prefix
665
+ $bcn_breadcrumb->prefix = $this->opt['page_prefix'];
666
+ //Assign the suffix
667
+ $bcn_breadcrumb->suffix = $this->opt['page_suffix'];
668
+ //Deal with the anchor
669
+ $bcn_breadcrumb->anchor = str_replace("%title%", $bcn_breadcrumb->title, str_replace("%link%", get_permalink($bcn_blog->ID), $this->opt['blog_anchor']));
670
+ //Yes link it
671
+ $bcn_breadcrumb->linked = true;
672
+ }
673
+ }
674
+ //Sometimes we don't have a home breadcrumb in the trail
675
+ if($this->opt['home_display'])
676
+ {
677
+ //Add new breadcrumb to the trail
678
+ $this->trail[] = new bcn_breadcrumb();
679
+ //Figure out where we placed the crumb, make a nice pointer to it
680
+ $bcn_breadcrumb = &$this->trail[count($this->trail) - 1];
681
+ //Assign the prefix
682
+ $bcn_breadcrumb->prefix = $this->opt['home_prefix'];
683
+ //Assign the suffix
684
+ $bcn_breadcrumb->suffix = $this->opt['home_suffix'];
685
+ //Assign the title
686
+ $bcn_breadcrumb->title = $this->opt['home_title'];
687
+ //Deal with the anchor
688
+ $bcn_breadcrumb->anchor = str_replace("%title%", $this->opt['home_title'], str_replace("%link%", get_option('home'), $this->opt['home_anchor']));
689
+ //Yes link it
690
+ $bcn_breadcrumb->linked = true;
691
+ }
692
  }
693
+ //On everything else we need to link, but no current item (pre/suf)fixes
694
+ else if($this->opt['home_display'])
695
  {
696
+ //Add new breadcrumb to the trail
697
+ $this->trail[] = new bcn_breadcrumb();
698
+ //Figure out where we placed the crumb, make a nice pointer to it
699
+ $bcn_breadcrumb = &$this->trail[count($this->trail) - 1];
700
+ //Assign the prefix
701
+ $bcn_breadcrumb->prefix = $this->opt['home_prefix'];
702
+ //Assign the suffix
703
+ $bcn_breadcrumb->suffix = $this->opt['home_suffix'];
704
+ //Assign the title
705
+ $bcn_breadcrumb->title = $this->opt['home_title'];
706
+ //Deal with the anchor
707
+ $bcn_breadcrumb->anchor = str_replace("%title%", $this->opt['home_title'], str_replace("%link%", get_option('home'), $this->opt['home_anchor']));
708
+ //Yes link it
709
+ $bcn_breadcrumb->linked = true;
710
  }
711
  }
712
+ /**
713
+ * do_404
714
+ *
715
+ * A Breadcrumb Trail Filling Function
716
+ *
717
+ * This functions fills a breadcrumb for 404 pages.
718
+ */
719
+ function do_404()
720
+ {
721
+ global $post;
722
+ $this->trail[] = new bcn_breadcrumb();
723
+ //Figure out where we placed the crumb, make a nice pointer to it
724
+ $bcn_breadcrumb = &$this->trail[count($this->trail) - 1];
725
+ //Assign the prefix
726
+ $bcn_breadcrumb->prefix = $this->opt['current_item_prefix'] . $this->opt['404_prefix'];
727
+ //Assign the suffix
728
+ $bcn_breadcrumb->suffix = $this->opt['404_suffix'] . $this->opt['current_item_suffix'];
729
+ //Assign the title
730
+ $bcn_breadcrumb->title = $this->opt['404_title'];
731
+ }
732
+ /**
733
+ * do_paged
734
+ *
735
+ * A Breadcrumb Trail Filling Function
736
+ *
737
+ * This functions fills a breadcrumb for paged pages.
738
+ */
739
+ function do_paged()
740
+ {
741
+ global $paged;
742
+ $this->trail[] = new bcn_breadcrumb();
743
+ //Figure out where we placed the crumb, make a nice pointer to it
744
+ $bcn_breadcrumb = &$this->trail[count($this->trail) - 1];
745
+ //Assign the prefix
746
+ $bcn_breadcrumb->prefix = $this->opt['paged_prefix'];
747
+ //Assign the suffix
748
+ $bcn_breadcrumb->suffix = $this->opt['paged_suffix'];
749
+ //Assign the title
750
+ $bcn_breadcrumb->title = $paged;
751
+ }
752
+ /**
753
+ * fill
754
+ *
755
+ * Breadcrumb Trail Filling Function
756
+ *
757
+ * This functions fills the breadcrumb trail.
758
+ */
759
+ function fill()
760
  {
761
  global $wpdb, $post, $wp_query, $bcn_version, $paged;
762
  ////////////////////////////////////
763
  //Do specific opperations for the various page types
764
  ////////////////////////////////////
765
+ //Check if this isn't the first of a multi paged item
766
+ if(is_paged() && $this->opt['paged_display'])
767
  {
768
+ $this->do_paged();
769
  }
770
+ //For the front page, as it may also validate as a page
771
+ if(is_front_page())
772
  {
773
+ //Must have two seperate branches so that we don't evaluate it as a page
774
+ if($this->opt['home_display'])
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
775
  {
776
+ $this->do_front_page();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
777
  }
778
  }
779
+ //For searches
780
+ else if(is_search())
781
+ {
782
+ $this->do_search();
783
+ }
784
+ ////////////////////////////////////
785
+ //For pages
786
+ else if(is_page())
787
+ {
788
+ $this->do_page();
789
+ }
790
+ ////////////////////////////////////
791
+ //For post/page attachments
792
+ else if(is_attachment())
793
+ {
794
+ $this->do_attachment();
795
+ }
796
+ ////////////////////////////////////
797
+ //For blog posts
798
+ else if(is_single())
799
+ {
800
+ $this->do_post();
801
+ }
802
+ ////////////////////////////////////
803
+ //For author pages
804
+ else if(is_author())
805
+ {
806
+ $this->do_author();
807
+ }
808
+ ////////////////////////////////////
809
+ //For category based archives
810
+ else if(is_archive() && is_category())
811
+ {
812
+ $this->do_archive_by_category();
813
+ }
814
+ ////////////////////////////////////
815
+ //For date based archives
816
+ else if(is_archive() && is_date())
817
+ {
818
+ $this->do_archive_by_date();
819
+ }
820
+ ////////////////////////////////////
821
+ //For tag based archives
822
+ else if(is_archive() && is_tag())
823
+ {
824
+ $this->do_archive_by_tag();
825
+ }
826
+ ////////////////////////////////////
827
+ //For 404 pages
828
+ else if(is_404())
829
+ {
830
+ $this->do_404();
831
+ }
832
+ //We always do the home link last, unless on the frontpage
833
+ if(!is_front_page())
834
+ {
835
+ $this->do_home();
836
+ }
837
+ //We build the trail backwards the last thing to do is to get it back to normal order
838
+ krsort($this->trail);
839
  }
840
  /**
841
  * display
844
  *
845
  * This functions outputs or returns the breadcrumb trail.
846
  *
847
+ * @param (bool) $bcn_return Whether to return data or to echo it.
848
+ * @param (bool) $bcn_linked Whether to allow hyperlinks in the trail or not.
849
+ *
850
  * @return (void) Void if Option to print out breadcrumb trail was chosen.
851
  * @return (string) String-Data of breadcrumb trail.
852
  */
853
+ function display($bcn_return = false, $bcn_linked = true)
854
  {
855
  global $bcn_version;
856
+ //Initilize the string which will hold the compiled trail
857
+ $bcn_trail_str = "";
858
+ //The main compiling loop
859
+ foreach($this->trail as $key=>$breadcrumb)
860
  {
861
+ //We only use a separator if there is more than one element
862
+ if($key < count($this->trail) - 1)
863
  {
864
+ $bcn_trail_str .= $this->opt['separator'];
 
 
 
 
865
  }
866
+ //If we are on the current item, we better check if we need to link it
867
+ if($key === 0 && $this->opt['current_item_linked'])
868
  {
869
+ $breadcrumb->linked = true;
870
+ $breadcrumb->anchor = str_replace("%title%", $breadcrumb->title, str_replace("%link%", "", $this->opt['current_item_anchor']));
 
 
 
 
 
 
871
  }
872
+ //Place in the breadcrumb's elements
873
+ $bcn_trail_str .= $breadcrumb->prefix;
874
+ //If we are linked we'll need to do up the link
875
+ if($breadcrumb->linked && $bcn_linked)
876
  {
877
+ $bcn_trail_str .= $breadcrumb->anchor . $breadcrumb->title . "</a>";
878
  }
879
+ //Otherwise we just slip in the title
880
+ else
881
  {
882
+ $bcn_trail_str .= $breadcrumb->title;
 
 
 
 
 
 
 
 
883
  }
884
+ $bcn_trail_str .= $breadcrumb->suffix;
885
  }
886
+ //Should we return or echo the compiled trail?
 
 
 
 
 
 
 
 
 
 
887
  if($bcn_return)
888
  {
889
+ return $bcn_trail_str;
890
  }
891
  else
892
  {
893
  //Giving credit where credit is due, please don't remove it
894
  $bcn_tag = "<!-- \nBreadcrumb, generated by Breadcrumb NavXT " . $bcn_version . " - http://mtekk.weblogs.us/code \n-->";
895
+ echo $bcn_tag . $bcn_trail_str;
896
  }
897
  }
898
+ }
 
tabulator_navxt.php ADDED
@@ -0,0 +1,229 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * the one and only TABULATOR!
4
+ *
5
+ * Add Tabs to the Breadcrumb NavXT Admin Page (and the rest of the admin pages in wp)
6
+ *
7
+ * @version 0.1.1
8
+ * @author Tom Klingenberg
9
+ * @copyright by the author, some rights reserved
10
+ * @see http://www.artnorm.de/this-morning-in-bleeding,105,2008-06.html
11
+ *
12
+ * Plugin Name: Tabulator (Breadcrumb NavXT Extending) [PHP5]
13
+ * Plugin URI: http://mtekk.weblogs.us/code/breadcrumb-navxt/?component=tabulator
14
+ * Description: And Tabs should come over all your admin pages as WP 2.5 will let you rule the world of jQuery and beyond! Thou shall it be!
15
+ * Version: 2.1.4
16
+ * Author: Tom Klingenberg
17
+ * Author URI: http://www.artnorm.de/
18
+ */
19
+
20
+
21
+ /**
22
+ * Initialize the Plugin
23
+ */
24
+
25
+ Navxt_Plugin_Tabulator::init();
26
+
27
+
28
+ /**
29
+ * Tabulator Plugin Class
30
+ *
31
+ * Contains all Plugin Functionality Functions
32
+ * and the Initialisation
33
+ *
34
+ * @hints php.wp.add_action.admin_head
35
+ * @hints php.wp.enqueue_script
36
+ * @hints js.jQuery
37
+ * @hints js.ui.core
38
+ * @hints js.ui.tabs
39
+ *
40
+ */
41
+ class Navxt_Plugin_Tabulator
42
+ {
43
+ public static function init()
44
+ {
45
+ $plugin = new self();
46
+ add_action('admin_head', array($plugin, 'admin_head'));
47
+ //We should use this for handling library dependancies
48
+ add_action('wp_print_scripts', array($plugin, 'javascript'));
49
+ }
50
+ /**
51
+ * javascript hook function
52
+ *
53
+ * Adds needed javascript dependancies, only runs in the dashboard
54
+ *
55
+ */
56
+ public function javascript()
57
+ {
58
+ //If we are in the dashboard we may need this
59
+ if(is_admin())
60
+ {
61
+ wp_enqueue_script('jquery-ui-tabs');
62
+ }
63
+ }
64
+ /**
65
+ * admin_head hook function
66
+ *
67
+ * Adds needed javascript and stylesheets to the head
68
+ *
69
+ * @todo create external references in the plugin directory
70
+ * for this.
71
+ *
72
+ */
73
+ public function admin_head()
74
+ {
75
+ ?>
76
+ <style type="text/css">
77
+ /**
78
+ * Tabbed Admin Page (CSS)
79
+ *
80
+ * unobtrusive approach to add tabbed forms into
81
+ * the wordpress admin panel
82
+ *
83
+ * @see Tabulator NavXT (Wordpress Plugin)
84
+ * @see Breadcrumb NavXT (Wordpress Plugin)
85
+ * @author Tom Klingenberg
86
+ * @cssdoc 1.0-pre
87
+ * @colordef #fff white (tab background)
88
+ * @colordef #c6d9e9 grey-blue (tab line)
89
+ * @colordef #d54e21 orange (tab text of active tab)
90
+ * @colordef #d54e21 orange (tab text of inactive tab hovered) external
91
+ * @colordef #2583ad dark-blue (tab text of inactive tab) external
92
+ */
93
+ ul.ui-tabs-nav {background:#fff; border-bottom:1px solid #c6d9e9; font-size:12px; height:29px; margin:13px 0 0; padding:0; padding-left:8px; list-style:none;}
94
+ ul.ui-tabs-nav li {display:inline; line-height: 200%; list-style:none; margin: 0; padding:0; position:relative; top:1px; text-align:center; white-space:nowrap;}
95
+ ul.ui-tabs-nav li a {background:transparent none no-repeat scroll 0%; border:1px transparent #fff; border-bottom:1px solid #c6d9e9; display:block; float:left; line-height:28px; padding:1px 13px 0; position:relative; text-decoration:none;}
96
+ ul.ui-tabs-nav li.ui-tabs-selected a {-moz-border-radius-topleft:4px; -moz-border-radius-topright:4px; background:#fff; border:1px solid #c6d9e9; border-bottom-color:#fff; color:#d54e21; font-weight:normal; padding:0 12px;}
97
+ ul.ui-tabs-nav a:focus, a:active {outline: none;}
98
+ #hasadmintabs fieldset {clear:both;}
99
+ </style>
100
+ <script type="text/javascript">
101
+ /* <![CDATA[ */
102
+ /**
103
+ * Tabbed Admin Page (jQuery)
104
+ *
105
+ * unobtrusive approach to add tabbed forms into
106
+ * the wordpress admin panel
107
+ *
108
+ * @see Tabulator NavXT (Wordpress Plugin)
109
+ * @see Breadcrumb NavXT (Wordpress Plugin)
110
+ * @see http://www.artnorm.de/this-morning-in-bleeding,105,2008-06.html
111
+ * @author Tom Klingenberg
112
+ * @uses jQuery
113
+ * @uses ui.core
114
+ * @uses ui.tabs
115
+ */
116
+
117
+ jQuery(function()
118
+ {
119
+ bcn_tabulator_init();
120
+ });
121
+
122
+ /**
123
+ * Tabulator Bootup
124
+ */
125
+ function bcn_tabulator_init()
126
+ {
127
+ bcn_admin_init_tabs();
128
+ bcn_admin_gobal_tabs(); // comment out this like to disable tabs in admin
129
+ }
130
+
131
+ /**
132
+ * inittialize tabs for admin panel pages (wordpress core)
133
+ *
134
+ * @todo add uniqueid somehow
135
+ */
136
+ function bcn_admin_gobal_tabs()
137
+ {
138
+ /* if has already a special id quit the global try here */
139
+ if (jQuery('#hasadmintabs').length > 0) return;
140
+
141
+ jQuery('#wpbody .wrap form').each(function(f)
142
+ {
143
+ var $formEle = jQuery(this).children();
144
+
145
+ var $eleSets = new Array();
146
+ var $eleSet = new Array();
147
+ var $eleSetIgnore = new Array();
148
+
149
+ for (var i = 0; i < $formEle.size(); i++)
150
+ {
151
+ var curr = $formEle.get(i);
152
+ var $curr = jQuery(curr);
153
+ // cut condition: h3 or stop
154
+ // stop: p.submit
155
+ if ($curr.is('p.submit') || $curr.is('h3'))
156
+ {
157
+ if ($eleSet.length)
158
+ {
159
+ if ($eleSets.length == 0 && $eleSet.length == 1 && jQuery($eleSet).is('p')) {
160
+ $eleSetIgnore = $eleSetIgnore.concat($eleSet);
161
+ } else {
162
+ $eleSets.push($eleSet);
163
+ }
164
+ $eleSet = new Array();
165
+ }
166
+ if ($curr.is('p.submit')) break;
167
+ $eleSet.push(curr);
168
+ } else {
169
+ // handle ingnore bag - works only before the first set is created
170
+ var pushto = $eleSet;
171
+ if ($eleSets.length == 0 && $curr.is("input[type='hidden']"))
172
+ {
173
+ pushto = $eleSetIgnore;
174
+ }
175
+ pushto.push(curr);
176
+ }
177
+ }
178
+
179
+ // if the page has only one set, quit
180
+ if ($eleSets.length < 2) return;
181
+
182
+ // tabify
183
+ formid = 'tabulator-tabs-form-' + f;
184
+ jQuery($eleSetIgnore).filter(':last').after('<div id="' + formid + '"></div>');
185
+ jQuery('#'+formid).prepend("<ul><\/ul>");
186
+ var tabcounter = 0;
187
+ jQuery.each($eleSets, function() {
188
+ tabcounter++;
189
+ id = formid + '-tab-' + tabcounter;
190
+ hash3 = true;
191
+ h3probe = jQuery(this).filter('h3').eq(0);
192
+ if (h3probe.is('h3')) {
193
+ caption = h3probe.text();
194
+ } else {
195
+ hash3 = false;
196
+ caption = jQuery('#wpbody .wrap h2').eq(0).text();
197
+ }
198
+ if (caption == ''){
199
+ caption = 'FALLBACK';
200
+ }
201
+ tabdiv = jQuery(this).wrapAll('<span id="'+id+'"></span>');
202
+ jQuery('#'+formid+' > ul').append('<li><a href="#'+id+'"><span>'+caption+"<\/span><\/a><\/li>");
203
+ if (hash3) h3probe.hide();
204
+ });
205
+ jQuery('#'+formid+' > ul').tabs();
206
+ });
207
+ }
208
+
209
+ /**
210
+ * inittialize tabs for breadcrumb navxt admin panel
211
+ */
212
+ function bcn_admin_init_tabs()
213
+ {
214
+ jQuery('#hasadmintabs').prepend("<ul><\/ul>");
215
+ jQuery('#hasadmintabs > fieldset').each(function(i)
216
+ {
217
+ id = jQuery(this).attr('id');
218
+ caption = jQuery(this).find('h3').text();
219
+ jQuery('#hasadmintabs > ul').append('<li><a href="#'+id+'"><span>'+caption+"<\/span><\/a><\/li>");
220
+ jQuery(this).find('h3').hide();
221
+ });
222
+ jQuery("#hasadmintabs > ul").tabs();
223
+ }
224
+ /* ]]> */
225
+ </script>
226
+ <?php
227
+ } // admin_head()
228
+ } // class
229
+ ?>