Breadcrumb NavXT - Version 2.1.0

Version Description

Download this release

Release Info

Developer mtekk
Plugin Icon 128x128 Breadcrumb NavXT
Version 2.1.0
Comparing to
See all releases

Code changes from version 2.0.4 to 2.1.0

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-03-06 21:15-0600\n"
6
- "PO-Revision-Date: 2008-03-06 21:15-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,72 +16,69 @@ msgstr ""
16
 
17
  #: C:\Documents
18
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
19
- #: NavXT\trunk/breadcrumb_navxt_admin.php:44
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. Please report this bug\n"
23
- "\t\t\t\tto the plug-in author. In your report please specify your WordPress version, PHP version,\n"
24
- "\t\t\t\tApache (or whatever HTTP server you are using) verion, and the version of the plug-in you \n"
25
- "\t\t\t\tare using.<br />"
 
 
 
26
  msgstr ""
27
 
28
  #: C:\Documents
29
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
30
- #: NavXT\trunk/breadcrumb_navxt_admin.php:49
31
  msgid "WordPress version: "
32
  msgstr ""
33
 
34
  #: C:\Documents
35
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
36
- #: NavXT\trunk/breadcrumb_navxt_admin.php:51
37
  msgid "PHP version: "
38
  msgstr ""
39
 
40
  #: C:\Documents
41
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
42
- #: NavXT\trunk/breadcrumb_navxt_admin.php:53
43
  msgid "Plug-in version: "
44
  msgstr ""
45
 
46
  #: C:\Documents
47
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
48
- #: NavXT\trunk/breadcrumb_navxt_admin.php:55
49
- msgid "$userdata Object Dump:"
50
- msgstr ""
51
-
52
- #: C:\Documents
53
- #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
54
- #: NavXT\trunk/breadcrumb_navxt_admin.php:61
55
  msgid "<strong>Aborting: Insufficient Privleges</strong><br /> Your User Level: "
56
  msgstr ""
57
 
58
  #: C:\Documents
59
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
60
- #: NavXT\trunk/breadcrumb_navxt_admin.php:63
61
  msgid "<br /> Required User Level: "
62
  msgstr ""
63
 
64
  #: C:\Documents
65
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
66
- #: NavXT\trunk/breadcrumb_navxt_admin.php:232
67
  msgid "Warning, your version of Breadcrumb NavXT does not match the version supported by this administrative interface. As a result things may not work as intened."
68
  msgstr ""
69
 
70
  #: C:\Documents
71
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
72
- #: NavXT\trunk/breadcrumb_navxt_admin.php:233
73
  msgid "Your Breadcrumb NavXT Administration interface version is "
74
  msgstr ""
75
 
76
  #: C:\Documents
77
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
78
- #: NavXT\trunk/breadcrumb_navxt_admin.php:234
79
  msgid "Your Breadcrumb NavXT version is "
80
  msgstr ""
81
 
82
  #: C:\Documents
83
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
84
- #: NavXT\trunk/breadcrumb_navxt_admin.php:239
85
  #, php-format
86
  msgid ""
87
  "This administration interface allows the full customization of the breadcrumb output with no loss\n"
@@ -93,278 +90,295 @@ msgstr ""
93
 
94
  #: C:\Documents
95
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
96
- #: NavXT\trunk/breadcrumb_navxt_admin.php:247
97
- #: NavXT\trunk/breadcrumb_navxt_admin.php:495
98
- msgid "Update Options &raquo;"
99
- msgstr ""
100
-
101
- #: C:\Documents
102
- #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
103
- #: NavXT\trunk/breadcrumb_navxt_admin.php:249
104
  msgid "General Settings:"
105
  msgstr ""
106
 
107
  #: C:\Documents
108
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
109
- #: NavXT\trunk/breadcrumb_navxt_admin.php:251
110
  msgid "Blog Title:"
111
  msgstr ""
112
 
113
  #: C:\Documents
114
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
115
- #: NavXT\trunk/breadcrumb_navxt_admin.php:255
116
  msgid "Breadcrumb Separator:"
117
  msgstr ""
118
 
119
  #: C:\Documents
120
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
121
- #: NavXT\trunk/breadcrumb_navxt_admin.php:259
122
  msgid "Search Prefix:"
123
  msgstr ""
124
 
125
  #: C:\Documents
126
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
127
- #: NavXT\trunk/breadcrumb_navxt_admin.php:263
128
  msgid "Search Suffix:"
129
  msgstr ""
130
 
131
  #: C:\Documents
132
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
133
- #: NavXT\trunk/breadcrumb_navxt_admin.php:267
134
  msgid "404 Title:"
135
  msgstr ""
136
 
137
  #: C:\Documents
138
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
139
- #: NavXT\trunk/breadcrumb_navxt_admin.php:272
140
  msgid "Static Frontpage Settings:"
141
  msgstr ""
142
 
143
  #: C:\Documents
144
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
145
- #: NavXT\trunk/breadcrumb_navxt_admin.php:273
146
  msgid "Static Frontpage:"
147
  msgstr ""
148
 
149
  #: C:\Documents
150
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
151
- #: NavXT\trunk/breadcrumb_navxt_admin.php:287
152
  msgid "Relative Blog URL:"
153
  msgstr ""
154
 
155
  #: C:\Documents
156
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
157
- #: NavXT\trunk/breadcrumb_navxt_admin.php:290
158
  msgid "Display Home:"
159
  msgstr ""
160
 
161
  #: C:\Documents
162
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
163
- #: NavXT\trunk/breadcrumb_navxt_admin.php:303
164
  msgid "Display Home Link:"
165
  msgstr ""
166
 
167
  #: C:\Documents
168
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
169
- #: NavXT\trunk/breadcrumb_navxt_admin.php:317
170
  msgid "Home Title:"
171
  msgstr ""
172
 
173
  #: C:\Documents
174
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
175
- #: NavXT\trunk/breadcrumb_navxt_admin.php:322
176
  msgid "Author Page Settings:"
177
  msgstr ""
178
 
179
  #: C:\Documents
180
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
181
- #: NavXT\trunk/breadcrumb_navxt_admin.php:324
182
  msgid "Author Prefix:"
183
  msgstr ""
184
 
185
  #: C:\Documents
186
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
187
- #: NavXT\trunk/breadcrumb_navxt_admin.php:328
188
  msgid "Author Suffix:"
189
  msgstr ""
190
 
191
  #: C:\Documents
192
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
193
- #: NavXT\trunk/breadcrumb_navxt_admin.php:331
194
  msgid "Author Display Format:"
195
  msgstr ""
196
 
197
  #: C:\Documents
198
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
199
- #: NavXT\trunk/breadcrumb_navxt_admin.php:346
200
  msgid "Archive Display Settings:"
201
  msgstr ""
202
 
203
  #: C:\Documents
204
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
205
- #: NavXT\trunk/breadcrumb_navxt_admin.php:348
206
  msgid "URL Title Prefix:"
207
  msgstr ""
208
 
209
  #: C:\Documents
210
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
211
- #: NavXT\trunk/breadcrumb_navxt_admin.php:352
212
  msgid "URL Title Suffix:"
213
  msgstr ""
214
 
215
  #: C:\Documents
216
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
217
- #: NavXT\trunk/breadcrumb_navxt_admin.php:356
218
  msgid "Archive by Category Prefix:"
219
  msgstr ""
220
 
221
  #: C:\Documents
222
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
223
- #: NavXT\trunk/breadcrumb_navxt_admin.php:360
224
  msgid "Archive by Category Suffix:"
225
  msgstr ""
226
 
227
  #: C:\Documents
228
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
229
- #: NavXT\trunk/breadcrumb_navxt_admin.php:364
230
  msgid "Archive by Date Prefix:"
231
  msgstr ""
232
 
233
  #: C:\Documents
234
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
235
- #: NavXT\trunk/breadcrumb_navxt_admin.php:368
236
  msgid "Archive by Date Suffix:"
237
  msgstr ""
238
 
239
  #: C:\Documents
240
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
241
- #: NavXT\trunk/breadcrumb_navxt_admin.php:371
242
  msgid "Archive by Date Format:"
243
  msgstr ""
244
 
245
  #: C:\Documents
246
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
247
- #: NavXT\trunk/breadcrumb_navxt_admin.php:385
248
  msgid "Archive by Tag Prefix:"
249
  msgstr ""
250
 
251
  #: C:\Documents
252
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
253
- #: NavXT\trunk/breadcrumb_navxt_admin.php:389
254
  msgid "Archive by Tag Suffix:"
255
  msgstr ""
256
 
257
  #: C:\Documents
258
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
259
- #: NavXT\trunk/breadcrumb_navxt_admin.php:394
260
  msgid "Current Item Settings:"
261
  msgstr ""
262
 
263
  #: C:\Documents
264
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
265
- #: NavXT\trunk/breadcrumb_navxt_admin.php:395
266
  msgid "Link Current Item:"
267
  msgstr ""
268
 
269
  #: C:\Documents
270
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
271
- #: NavXT\trunk/breadcrumb_navxt_admin.php:409
272
  msgid "Current Item URL Title:"
273
  msgstr ""
274
 
275
  #: C:\Documents
276
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
277
- #: NavXT\trunk/breadcrumb_navxt_admin.php:413
278
  msgid "Current Item Style Prefix:"
279
  msgstr ""
280
 
281
  #: C:\Documents
282
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
283
- #: NavXT\trunk/breadcrumb_navxt_admin.php:417
284
  msgid "Current Item Style Suffix:"
285
  msgstr ""
286
 
287
  #: C:\Documents
288
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
289
- #: NavXT\trunk/breadcrumb_navxt_admin.php:420
290
  msgid "Display Paged Text:"
291
  msgstr ""
292
 
293
  #: C:\Documents
294
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
295
- #: NavXT\trunk/breadcrumb_navxt_admin.php:434
296
  msgid "Paged Prefix:"
297
  msgstr ""
298
 
299
  #: C:\Documents
300
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
301
- #: NavXT\trunk/breadcrumb_navxt_admin.php:438
302
  msgid "Paged Suffix:"
303
  msgstr ""
304
 
305
  #: C:\Documents
306
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
307
- #: NavXT\trunk/breadcrumb_navxt_admin.php:443
308
  msgid "Single Post Settings:"
309
  msgstr ""
310
 
311
  #: C:\Documents
312
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
313
- #: NavXT\trunk/breadcrumb_navxt_admin.php:445
314
  msgid "Single Blogpost Prefix:"
315
  msgstr ""
316
 
317
  #: C:\Documents
318
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
319
- #: NavXT\trunk/breadcrumb_navxt_admin.php:449
320
  msgid "Single Blogpost Suffix:"
321
  msgstr ""
322
 
323
  #: C:\Documents
324
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
325
- #: NavXT\trunk/breadcrumb_navxt_admin.php:453
326
  msgid "Page Prefix:"
327
  msgstr ""
328
 
329
  #: C:\Documents
330
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
331
- #: NavXT\trunk/breadcrumb_navxt_admin.php:457
332
  msgid "Page Suffix:"
333
  msgstr ""
334
 
335
  #: C:\Documents
336
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
337
- #: NavXT\trunk/breadcrumb_navxt_admin.php:461
338
  msgid "Post Attachment Prefix:"
339
  msgstr ""
340
 
341
  #: C:\Documents
342
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
343
- #: NavXT\trunk/breadcrumb_navxt_admin.php:465
344
  msgid "Post Attachment Suffix:"
345
  msgstr ""
346
 
347
  #: C:\Documents
348
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
349
- #: NavXT\trunk/breadcrumb_navxt_admin.php:469
350
  msgid "Post Title Maxlen:"
351
  msgstr ""
352
 
353
  #: C:\Documents
354
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
355
- #: NavXT\trunk/breadcrumb_navxt_admin.php:473
356
- msgid "Single Blog Post Category Display:"
 
 
 
 
 
 
357
  msgstr ""
358
 
359
  #: C:\Documents
360
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
361
- #: NavXT\trunk/breadcrumb_navxt_admin.php:487
362
  msgid "Single Blog Post Category Prefix:"
363
  msgstr ""
364
 
365
  #: C:\Documents
366
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
367
- #: NavXT\trunk/breadcrumb_navxt_admin.php:491
368
  msgid "Single Blog Post Category Suffix:"
369
  msgstr ""
370
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  msgstr ""
3
  "Project-Id-Version: Breadcrumb NavXT\n"
4
  "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2008-04-02 11:36-0600\n"
6
+ "PO-Revision-Date: 2008-04-02 11:36-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:32
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"
23
+ "\t\t\t\tThis can be resolved by navigationg to the Users section of the WordPress administrative interface.\n"
24
+ "\t\t\t\tIn this section check the user that you use for administrative purposes. Then under the drop down\n"
25
+ "\t\t\t\tlabled \"change role to...\" select administrator. Now click the change button. Should you still \n"
26
+ "\t\t\t\trecieve this error please report this bug to the plug-in author. In your report please specify \n"
27
+ "\t\t\t\tyour WordPress version, PHP version, Apache (or whatever HTTP server you are using) verion, and \n"
28
+ "\t\t\t\tthe version of the plug-in you are using.<br />"
29
  msgstr ""
30
 
31
  #: C:\Documents
32
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
33
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:40
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:42
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:44
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:49
 
 
 
 
 
 
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:51
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:241
64
  msgid "Warning, your version of Breadcrumb NavXT does not match the version supported by this administrative interface. As a result things may not work as intened."
65
  msgstr ""
66
 
67
  #: C:\Documents
68
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
69
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:242
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:243
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:248
82
  #, php-format
83
  msgid ""
84
  "This administration interface allows the full customization of the breadcrumb output with no loss\n"
90
 
91
  #: C:\Documents
92
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
93
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:257
 
 
 
 
 
 
 
94
  msgid "General Settings:"
95
  msgstr ""
96
 
97
  #: C:\Documents
98
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
99
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:261
100
  msgid "Blog Title:"
101
  msgstr ""
102
 
103
  #: C:\Documents
104
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
105
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:269
106
  msgid "Breadcrumb Separator:"
107
  msgstr ""
108
 
109
  #: C:\Documents
110
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
111
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:277
112
  msgid "Search Prefix:"
113
  msgstr ""
114
 
115
  #: C:\Documents
116
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
117
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:285
118
  msgid "Search Suffix:"
119
  msgstr ""
120
 
121
  #: C:\Documents
122
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
123
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:293
124
  msgid "404 Title:"
125
  msgstr ""
126
 
127
  #: C:\Documents
128
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
129
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:303
130
  msgid "Static Frontpage Settings:"
131
  msgstr ""
132
 
133
  #: C:\Documents
134
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
135
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:307
136
  msgid "Static Frontpage:"
137
  msgstr ""
138
 
139
  #: C:\Documents
140
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
141
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:317
142
  msgid "Relative Blog URL:"
143
  msgstr ""
144
 
145
  #: C:\Documents
146
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
147
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:325
148
  msgid "Display Home:"
149
  msgstr ""
150
 
151
  #: C:\Documents
152
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
153
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:335
154
  msgid "Display Home Link:"
155
  msgstr ""
156
 
157
  #: C:\Documents
158
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
159
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:345
160
  msgid "Home Title:"
161
  msgstr ""
162
 
163
  #: C:\Documents
164
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
165
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:355
166
  msgid "Author Page Settings:"
167
  msgstr ""
168
 
169
  #: C:\Documents
170
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
171
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:359
172
  msgid "Author Prefix:"
173
  msgstr ""
174
 
175
  #: C:\Documents
176
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
177
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:367
178
  msgid "Author Suffix:"
179
  msgstr ""
180
 
181
  #: C:\Documents
182
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
183
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:375
184
  msgid "Author Display Format:"
185
  msgstr ""
186
 
187
  #: C:\Documents
188
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
189
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:388
190
  msgid "Archive Display Settings:"
191
  msgstr ""
192
 
193
  #: C:\Documents
194
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
195
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:392
196
  msgid "URL Title Prefix:"
197
  msgstr ""
198
 
199
  #: C:\Documents
200
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
201
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:400
202
  msgid "URL Title Suffix:"
203
  msgstr ""
204
 
205
  #: C:\Documents
206
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
207
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:408
208
  msgid "Archive by Category Prefix:"
209
  msgstr ""
210
 
211
  #: C:\Documents
212
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
213
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:416
214
  msgid "Archive by Category Suffix:"
215
  msgstr ""
216
 
217
  #: C:\Documents
218
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
219
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:424
220
  msgid "Archive by Date Prefix:"
221
  msgstr ""
222
 
223
  #: C:\Documents
224
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
225
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:432
226
  msgid "Archive by Date Suffix:"
227
  msgstr ""
228
 
229
  #: C:\Documents
230
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
231
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:440
232
  msgid "Archive by Date Format:"
233
  msgstr ""
234
 
235
  #: C:\Documents
236
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
237
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:450
238
  msgid "Archive by Tag Prefix:"
239
  msgstr ""
240
 
241
  #: C:\Documents
242
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
243
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:458
244
  msgid "Archive by Tag Suffix:"
245
  msgstr ""
246
 
247
  #: C:\Documents
248
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
249
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:468
250
  msgid "Current Item Settings:"
251
  msgstr ""
252
 
253
  #: C:\Documents
254
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
255
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:472
256
  msgid "Link Current Item:"
257
  msgstr ""
258
 
259
  #: C:\Documents
260
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
261
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:482
262
  msgid "Current Item URL Title:"
263
  msgstr ""
264
 
265
  #: C:\Documents
266
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
267
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:490
268
  msgid "Current Item Style Prefix:"
269
  msgstr ""
270
 
271
  #: C:\Documents
272
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
273
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:498
274
  msgid "Current Item Style Suffix:"
275
  msgstr ""
276
 
277
  #: C:\Documents
278
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
279
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:506
280
  msgid "Display Paged Text:"
281
  msgstr ""
282
 
283
  #: C:\Documents
284
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
285
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:516
286
  msgid "Paged Prefix:"
287
  msgstr ""
288
 
289
  #: C:\Documents
290
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
291
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:524
292
  msgid "Paged Suffix:"
293
  msgstr ""
294
 
295
  #: C:\Documents
296
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
297
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:534
298
  msgid "Single Post Settings:"
299
  msgstr ""
300
 
301
  #: C:\Documents
302
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
303
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:538
304
  msgid "Single Blogpost Prefix:"
305
  msgstr ""
306
 
307
  #: C:\Documents
308
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
309
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:546
310
  msgid "Single Blogpost Suffix:"
311
  msgstr ""
312
 
313
  #: C:\Documents
314
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
315
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:554
316
  msgid "Page Prefix:"
317
  msgstr ""
318
 
319
  #: C:\Documents
320
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
321
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:562
322
  msgid "Page Suffix:"
323
  msgstr ""
324
 
325
  #: C:\Documents
326
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
327
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:570
328
  msgid "Post Attachment Prefix:"
329
  msgstr ""
330
 
331
  #: C:\Documents
332
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
333
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:578
334
  msgid "Post Attachment Suffix:"
335
  msgstr ""
336
 
337
  #: C:\Documents
338
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
339
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:586
340
  msgid "Post Title Maxlen:"
341
  msgstr ""
342
 
343
  #: C:\Documents
344
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
345
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:594
346
+ msgid "Single Blog Post Taxonomy Display:"
347
+ msgstr ""
348
+
349
+ #: C:\Documents
350
+ #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
351
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:604
352
+ msgid "Single Blog Post Taxonomy:"
353
  msgstr ""
354
 
355
  #: C:\Documents
356
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
357
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:614
358
  msgid "Single Blog Post Category Prefix:"
359
  msgstr ""
360
 
361
  #: C:\Documents
362
  #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
363
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:622
364
  msgid "Single Blog Post Category Suffix:"
365
  msgstr ""
366
 
367
+ #: C:\Documents
368
+ #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
369
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:630
370
+ msgid "Single Blog Post Tag Prefix:"
371
+ msgstr ""
372
+
373
+ #: C:\Documents
374
+ #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
375
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:638
376
+ msgid "Single Blog Post Tag Suffix:"
377
+ msgstr ""
378
+
379
+ #: C:\Documents
380
+ #: and Settings\mtekk\My Documents\Aptana Studio\Breadcrumb
381
+ #: NavXT\trunk/breadcrumb_navxt_admin.php:647
382
+ msgid "Save Changes"
383
+ msgstr ""
384
+
breadcrumb_navxt_admin.php CHANGED
@@ -2,60 +2,48 @@
2
  /*
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. For details on how to use this plugin visit <a href="http://mtekk.weblogs.us/code/breadcrumb-navxt/">Breadcrumb NavXT</a>.
6
- Version: 2.0.4
7
  Author: John Havlik
8
  Author URI: http://mtekk.weblogs.us/
9
  */
10
- /* Copyright 2007-2008 John Havlik (email : mtekkmonkey@gmail.com)
11
-
12
- This program is free software; you can redistribute it and/or modify
13
- it under the terms of the GNU General Public License as published by
14
- the Free Software Foundation; either version 2 of the License, or
15
- (at your option) any later version.
16
-
17
- This program is distributed in the hope that it will be useful,
18
- but WITHOUT ANY WARRANTY; without even the implied warranty of
19
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20
- GNU General Public License for more details.
21
-
22
- You should have received a copy of the GNU General Public License
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_admin_version = "2.0.4";
27
  $bcn_admin_req = 8;
28
  //Include the breadcrumb class if needed
29
  if(!class_exists('bcn_breadcrumb'))
30
  {
31
- include(dirname(__FILE__)."/breadcrumb_navxt_class.php");
32
  }
33
  //Include the supplemental functions
34
- include(dirname(__FILE__)."/breadcrumb_navxt_api.php");
35
  //Security function
36
  function bcn_security()
37
  {
38
  global $userdata, $bcn_admin_req, $bcn_version, $wp_version;
 
39
  get_currentuserinfo();
40
- if ($userdata->user_level < $bcn_admin_req)
 
41
  {
 
42
  if($userdata->user_level == NULL)
43
  {
44
  _e('<strong>Aborting: WordPress API Malfunction</strong><br /> For some reason the
45
- function get_currentuserinfo() did not behave as expected. Please report this bug
46
- to the plug-in author. In your report please specify your WordPress version, PHP version,
47
- Apache (or whatever HTTP server you are using) verion, and the version of the plug-in you
48
- are using.<br />', 'breadcrumb_navxt');
 
 
 
49
  _e('WordPress version: ', 'breadcrumb_navxt');
50
  echo $wp_version . '<br />';
51
  _e('PHP version: ', 'breadcrumb_navxt');
52
  echo phpversion() . '<br />';
53
  _e('Plug-in version: ', 'breadcrumb_navxt');
54
  echo $bcn_version . "<br />";
55
- _e('$userdata Object Dump:', 'breadcrumb_navxt');
56
- echo "<br />";
57
- var_dump($userdata);
58
  }
 
59
  else
60
  {
61
  _e('<strong>Aborting: Insufficient Privleges</strong><br /> Your User Level: ', 'breadcrumb_navxt');
@@ -71,16 +59,17 @@ function bcn_install()
71
  {
72
  global $bcn_admin_req, $bcn_version;
73
  bcn_security();
74
- if(get_option('bcn_version') != $bcn_version)
75
  {
76
- update_option('bcn_version' , $bcn_version);
 
77
  update_option('bcn_static_frontpage', 'false');
78
  update_option('bcn_url_blog', '');
79
  update_option('bcn_home_display', 'true');
80
  update_option('bcn_home_link', 'true');
81
  update_option('bcn_title_home', 'Home');
82
  update_option('bcn_title_blog', 'Blog');
83
- update_option('bcn_separator', '&nbsp;&gt;&nbsp;');
84
  update_option('bcn_search_prefix', 'Search results for &#39;');
85
  update_option('bcn_search_suffix', '&#39;');
86
  update_option('bcn_author_prefix', 'Posts by ');
@@ -110,13 +99,21 @@ function bcn_install()
110
  update_option('bcn_paged_display', 'false');
111
  update_option('bcn_paged_prefix', ', Page&nbsp;');
112
  update_option('bcn_paged_suffix', '');
113
- update_option('bcn_singleblogpost_category_display', 'true');
 
114
  update_option('bcn_singleblogpost_category_prefix', '');
115
  update_option('bcn_singleblogpost_category_suffix', '');
 
 
116
  }
117
  }
118
- //Display a breadcrumb, only used if admin interface is used
119
  function breadcrumb_nav_xt_display()
 
 
 
 
 
120
  {
121
  //Playing things really safe here
122
  if(class_exists('bcn_breadcrumb'))
@@ -160,9 +157,14 @@ function breadcrumb_nav_xt_display()
160
  $breadcrumb->opt['paged_display'] = get_option('bcn_paged_display');
161
  $breadcrumb->opt['paged_prefix'] = get_option('bcn_paged_prefix');
162
  $breadcrumb->opt['paged_suffix'] = get_option('bcn_paged_suffix');
163
- $breadcrumb->opt['singleblogpost_category_display'] = get_option('bcn_singleblogpost_category_display');
 
164
  $breadcrumb->opt['singleblogpost_category_prefix'] = get_option('bcn_singleblogpost_category_prefix');
165
  $breadcrumb->opt['singleblogpost_category_suffix'] = get_option('bcn_singleblogpost_category_suffix');
 
 
 
 
166
  //Display the breadcrumb
167
  $breadcrumb->display();
168
  }
@@ -208,17 +210,24 @@ function bcn_admin_options()
208
  update_option('bcn_paged_display', bcn_get('paged_display'));
209
  update_option('bcn_paged_prefix', bcn_get('paged_prefix'));
210
  update_option('bcn_paged_suffix', bcn_get('paged_suffix'));
211
- update_option('bcn_singleblogpost_category_display', bcn_get('singleblogpost_category_display'));
 
212
  update_option('bcn_singleblogpost_category_prefix', bcn_get('singleblogpost_category_prefix'));
213
  update_option('bcn_singleblogpost_category_suffix', bcn_get('singleblogpost_category_suffix'));
 
 
214
  }
215
- //Creates link to admin interface
 
 
 
 
216
  function bcn_add_page()
217
  {
218
  global $bcn_admin_req;
219
  add_options_page('Breadcrumb NavXT Settings', 'Breadcrumb NavXT', $bcn_admin_req, 'breadcrumb-nav-xt', 'bcn_admin');
220
  }
221
- //The actual interface
222
  function bcn_admin()
223
  {
224
  global $bcn_admin_req, $bcn_admin_version, $bcn_version;
@@ -242,267 +251,447 @@ function bcn_admin()
242
  %sdocumentation%s
243
  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>'); ?>
244
  </p>
245
-
246
  <form action="options-general.php?page=breadcrumb-nav-xt" method="post" id="bcn_admin_options">
247
- <p class="submit"><input type="submit" name="bcn_admin_options" value="<?php _e('Update Options &raquo;') ?>" /></p>
248
- <fieldset id="general" class="options">
249
- <legend><?php _e('General Settings:', 'breadcrumb_navxt'); ?></legend>
250
- <p>
251
- <label for="title_blog"><?php _e('Blog Title:', 'breadcrumb_navxt'); ?></label>
252
- <input type="text" name="title_blog" id="title_blog" value="<?php echo bcn_get_option_inputvalue('bcn_title_blog'); ?>" size="32" />
253
- </p>
254
- <p>
255
- <label for="separator"><?php _e('Breadcrumb Separator:', 'breadcrumb_navxt'); ?></label>
256
- <input type="text" name="separator" id="separator" value="<?php echo bcn_get_option_inputvalue('bcn_separator'); ?>" size="32" />
257
- </p>
258
- <p>
259
- <label for="search_prefix"><?php _e('Search Prefix:', 'breadcrumb_navxt'); ?></label>
260
- <input type="text" name="search_prefix" id="search_prefix" value="<?php echo bcn_get_option_inputvalue('bcn_search_prefix'); ?>" size="32" />
261
- </p>
262
- <p>
263
- <label for="search_suffix"><?php _e('Search Suffix:', 'breadcrumb_navxt'); ?></label>
264
- <input type="text" name="search_suffix" id="search_suffix" value="<?php echo bcn_get_option_inputvalue('bcn_search_suffix'); ?>" size="32" />
265
- </p>
266
- <p>
267
- <label for="title_404"><?php _e('404 Title:', 'breadcrumb_navxt'); ?></label>
268
- <input type="text" name="title_404" id="title_404" value="<?php echo bcn_get_option_inputvalue('bcn_title_404'); ?>" size="32" />
269
- </p>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
270
  </fieldset>
271
- <fieldset id="static_front_page" class="options">
272
- <legend><?php _e('Static Frontpage Settings:', 'breadcrumb_navxt'); ?></legend>
273
- <p><?php _e('Static Frontpage:', 'breadcrumb_navxt'); ?>
274
- <select name="static_frontpage">
275
- <?php $bcn_opta = array("true", "false");?>
276
- <option><?php echo get_option('bcn_static_frontpage'); ?></option>
277
- <?php foreach($bcn_opta as $option)
278
- {
279
- if($option != get_option('bcn_static_frontpage'))
280
- {
281
- echo "<option>" . $option . "</option>";
282
- }
283
- }?>
284
- </select>
285
- </p>
286
- <p>
287
- <label for="url_blog"><?php _e('Relative Blog URL:', 'breadcrumb_navxt'); ?></label>
288
- <input type="text" name="url_blog" id="url_blog" value="<?php echo bcn_get_option_inputvalue('bcn_url_blog'); ?>" size="32" />
289
- </p>
290
- <p><?php _e('Display Home:', 'breadcrumb_navxt'); ?>
291
- <select name="home_display">
292
- <?php $bcn_opta = array("true", "false");?>
293
- <option><?php echo get_option('bcn_home_display'); ?></option>
294
- <?php foreach($bcn_opta as $option)
295
- {
296
- if($option != get_option('bcn_home_display'))
297
- {
298
- echo "<option>" . $option . "</option>";
299
- }
300
- }?>
301
- </select>
302
- </p>
303
- <p><?php _e('Display Home Link:', 'breadcrumb_navxt'); ?>
304
- <select name="home_link">
305
- <?php $bcn_opta = array("true", "false");?>
306
- <option><?php echo get_option('bcn_home_link'); ?></option>
307
- <?php foreach($bcn_opta as $option)
308
- {
309
- if($option != get_option('bcn_home_link'))
310
- {
311
- echo "<option>" . $option . "</option>";
312
- }
313
- }?>
314
- </select>
315
- </p>
316
- <p>
317
- <label for="title_home"><?php _e('Home Title:', 'breadcrumb_navxt'); ?></label>
318
- <input type="text" name="title_home" id="title_home" value="<?php echo bcn_get_option_inputvalue('bcn_title_home'); ?>" size="32" />
319
- </p>
 
320
  </fieldset>
321
- <fieldset id="author" class="options">
322
- <legend><?php _e('Author Page Settings:', 'breadcrumb_navxt'); ?></legend>
323
- <p>
324
- <label for="author_prefix"><?php _e('Author Prefix:', 'breadcrumb_navxt'); ?></label>
325
- <input type="text" name="author_prefix" id="author_prefix" value="<?php echo bcn_get_option_inputvalue('bcn_author_prefix'); ?>" size="32" />
326
- </p>
327
- <p>
328
- <label for="author_suffix"><?php _e('Author Suffix:', 'breadcrumb_navxt'); ?></label>
329
- <input type="text" name="author_suffix" id="author_suffix" value="<?php echo bcn_get_option_inputvalue('bcn_author_suffix'); ?>" size="32" />
330
- </p>
331
- <p><?php _e('Author Display Format:', 'breadcrumb_navxt'); ?>
332
- <select name="author_display">
333
- <?php $bcn_opta = array("display_name", "nickname", "first_name", "last_name");?>
334
- <option><?php echo get_option('bcn_author_display'); ?></option>
335
- <?php foreach($bcn_opta as $option)
336
- {
337
- if($option != get_option('bcn_author_display'))
338
- {
339
- echo "<option>" . $option . "</option>";
340
- }
341
- }?>
342
- </select>
343
- </p>
 
 
 
 
 
 
 
 
344
  </fieldset>
345
- <fieldset id="category" class="options">
346
- <legend><?php _e('Archive Display Settings:', 'breadcrumb_navxt'); ?></legend>
347
- <p>
348
- <label for="urltitle_prefix"><?php _e('URL Title Prefix:', 'breadcrumb_navxt'); ?></label>
349
- <input type="text" name="urltitle_prefix" id="urltitle_prefix" value="<?php echo bcn_get_option_inputvalue('bcn_urltitle_prefix'); ?>" size="32" />
350
- </p>
351
- <p>
352
- <label for="urltitle_suffix"><?php _e('URL Title Suffix:', 'breadcrumb_navxt'); ?></label>
353
- <input type="text" name="urltitle_suffix" id="urltitle_suffix" value="<?php echo bcn_get_option_inputvalue('bcn_urltitle_suffix'); ?>" size="32" />
354
- </p>
355
- <p>
356
- <label for="archive_category_prefix"><?php _e('Archive by Category Prefix:', 'breadcrumb_navxt'); ?></label>
357
- <input type="text" name="archive_category_prefix" id="archive_category_prefix" value="<?php echo bcn_get_option_inputvalue('bcn_archive_category_prefix'); ?>" size="32" />
358
- </p>
359
- <p>
360
- <label for="archive_category_suffix"><?php _e('Archive by Category Suffix:', 'breadcrumb_navxt'); ?></label>
361
- <input type="text" name="archive_category_suffix" id="archive_category_suffix" value="<?php echo bcn_get_option_inputvalue('bcn_archive_category_suffix'); ?>" size="32" />
362
- </p>
363
- <p>
364
- <label for="archive_date_prefix"><?php _e('Archive by Date Prefix:', 'breadcrumb_navxt'); ?></label>
365
- <input type="text" name="archive_date_prefix" id="archive_date_prefix" value="<?php echo bcn_get_option_inputvalue('bcn_archive_date_prefix'); ?>" size="32" />
366
- </p>
367
- <p>
368
- <label for="archive_date_suffix"><?php _e('Archive by Date Suffix:', 'breadcrumb_navxt'); ?></label>
369
- <input type="text" name="archive_date_suffix" id="archive_date_suffix" value="<?php echo bcn_get_option_inputvalue('bcn_archive_date_suffix'); ?>" size="32" />
370
- </p>
371
- <p><?php _e('Archive by Date Format:', 'breadcrumb_navxt'); ?>
372
- <select name="archive_date_format">
373
- <?php $bcn_opta = array("EU", "US", "ISO");?>
374
- <option><?php echo get_option('bcn_archive_date_format'); ?></option>
375
- <?php foreach($bcn_opta as $option)
376
- {
377
- if($option != get_option('bcn_archive_date_format'))
378
- {
379
- echo "<option>" . $option . "</option>";
380
- }
381
- }?>
382
- </select>
383
- </p>
384
- <p>
385
- <label for="archive_tag_prefix"><?php _e('Archive by Tag Prefix:', 'breadcrumb_navxt'); ?></label>
386
- <input type="text" name="archive_tag_prefix" id="archive_tag_prefix" value="<?php echo bcn_get_option_inputvalue('bcn_archive_tag_prefix'); ?>" size="32" />
387
- </p>
388
- <p>
389
- <label for="archive_tag_suffix"><?php _e('Archive by Tag Suffix:', 'breadcrumb_navxt'); ?></label>
390
- <input type="text" name="archive_tag_suffix" id="archive_tag_suffix" value="<?php echo bcn_get_option_inputvalue('bcn_archive_tag_suffix'); ?>" size="32" />
391
- </p>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
392
  </fieldset>
393
- <fieldset id="current" class="options">
394
- <legend><?php _e('Current Item Settings:', 'breadcrumb_navxt'); ?></legend>
395
- <p><?php _e('Link Current Item:', 'breadcrumb_navxt'); ?>
396
- <select name="link_current_item">
397
- <?php $bcn_opta = array("true", "false");?>
398
- <option><?php echo get_option('bcn_link_current_item'); ?></option>
399
- <?php foreach($bcn_opta as $option)
400
- {
401
- if($option != get_option('bcn_link_current_item'))
402
- {
403
- echo "<option>" . $option . "</option>";
404
- }
405
- }?>
406
- </select>
407
- </p>
408
- <p>
409
- <label for="current_item_urltitle"><?php _e('Current Item URL Title:', 'breadcrumb_navxt'); ?></label>
410
- <input type="text" name="current_item_urltitle" id="current_item_urltitle" value="<?php echo bcn_get_option_inputvalue('bcn_current_item_urltitle'); ?>" size="32" />
411
- </p>
412
- <p>
413
- <label for="current_item_style_prefix"><?php _e('Current Item Style Prefix:', 'breadcrumb_navxt'); ?></label>
414
- <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" />
415
- </p>
416
- <p>
417
- <label for="current_item_style_suffix"><?php _e('Current Item Style Suffix:', 'breadcrumb_navxt'); ?></label>
418
- <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" />
419
- </p>
420
- <p><?php _e('Display Paged Text:', 'breadcrumb_navxt'); ?>
421
- <select name="paged_display">
422
- <?php $bcn_opta = array("true", "false");?>
423
- <option><?php echo get_option('bcn_paged_display'); ?></option>
424
- <?php foreach($bcn_opta as $option)
425
- {
426
- if($option != get_option('bcn_paged_display'))
427
- {
428
- echo "<option>" . $option . "</option>";
429
- }
430
- }?>
431
- </select>
432
- </p>
433
- <p>
434
- <label for="paged_prefix"><?php _e('Paged Prefix:', 'breadcrumb_navxt'); ?></label>
435
- <input type="text" name="paged_prefix" id="paged_prefix" value="<?php echo bcn_get_option_inputvalue('bcn_paged_prefix'); ?>" size="32" />
436
- </p>
437
- <p>
438
- <label for="paged_suffix"><?php _e('Paged Suffix:', 'breadcrumb_navxt'); ?></label>
439
- <input type="text" name="paged_suffix" id="paged_suffix" value="<?php echo bcn_get_option_inputvalue('bcn_paged_suffix'); ?>" size="32" />
440
- </p>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
441
  </fieldset>
442
- <fieldset id="single" class="options">
443
- <legend><?php _e('Single Post Settings:', 'breadcrumb_navxt'); ?></legend>
444
- <p>
445
- <label for="singleblogpost_prefix"><?php _e('Single Blogpost Prefix:', 'breadcrumb_navxt'); ?></label>
446
- <input type="text" name="singleblogpost_prefix" id="singleblogpost_prefix" value="<?php echo bcn_get_option_inputvalue('bcn_singleblogpost_prefix'); ?>" size="32" />
447
- </p>
448
- <p>
449
- <label for="singleblogpost_suffix"><?php _e('Single Blogpost Suffix:', 'breadcrumb_navxt'); ?></label>
450
- <input type="text" name="singleblogpost_suffix" id="singleblogpost_suffix" value="<?php echo bcn_get_option_inputvalue('bcn_singleblogpost_suffix'); ?>" size="32" />
451
- </p>
452
- <p>
453
- <label for="page_prefix"><?php _e('Page Prefix:', 'breadcrumb_navxt'); ?></label>
454
- <input type="text" name="page_prefix" id="page_prefix" value="<?php echo bcn_get_option_inputvalue('bcn_page_prefix'); ?>" size="32" />
455
- </p>
456
- <p>
457
- <label for="page_suffix"><?php _e('Page Suffix:', 'breadcrumb_navxt'); ?></label>
458
- <input type="text" name="page_suffix" id="page_suffix" value="<?php echo bcn_get_option_inputvalue('bcn_page_suffix'); ?>" size="32" />
459
- </p>
460
- <p>
461
- <label for="attachment_prefix"><?php _e('Post Attachment Prefix:', 'breadcrumb_navxt'); ?></label>
462
- <input type="text" name="attachment_prefix" id="attachment_prefix" value="<?php echo bcn_get_option_inputvalue('bcn_attachment_prefix'); ?>" size="32" />
463
- </p>
464
- <p>
465
- <label for="attachment_suffix"><?php _e('Post Attachment Suffix:', 'breadcrumb_navxt'); ?></label>
466
- <input type="text" name="attachment_suffix" id="attachment_suffix" value="<?php echo bcn_get_option_inputvalue('bcn_attachment_suffix'); ?>" size="32" />
467
- </p>
468
- <p>
469
- <label for="title_home"><?php _e('Post Title Maxlen:', 'breadcrumb_navxt'); ?></label>
470
- <input type="text" name="posttitle_maxlen" id="posttitle_maxlen" value="<?php echo bcn_get_option_inputvalue('bcn_posttitle_maxlen'); ?>" size="10" />
471
- </p>
472
- <p>
473
- <label for="singleblogpost_category_display"><?php _e('Single Blog Post Category Display:', 'breadcrumb_navxt'); ?></label>
474
- <select name="singleblogpost_category_display">
475
- <?php $bcn_opta = array("true", "false");?>
476
- <option><?php echo get_option('bcn_singleblogpost_category_display'); ?></option>
477
- <?php foreach($bcn_opta as $option)
478
- {
479
- if($option != get_option('bcn_singleblogpost_category_display'))
480
- {
481
- echo "<option>" . $option . "</option>";
482
- }
483
- }?>
484
- </select>
485
- </p>
486
- <p>
487
- <label for="singleblogpost_category_prefix"><?php _e('Single Blog Post Category Prefix:', 'breadcrumb_navxt'); ?></label>
488
- <input type="text" name="singleblogpost_category_prefix" id="singleblogpost_category_prefix" value="<?php echo bcn_get_option_inputvalue('bcn_singleblogpost_category_prefix'); ?>" size="32" />
489
- </p>
490
- <p>
491
- <label for="singleblogpost_category_suffix"><?php _e('Single Blog Post Category Suffix:', 'breadcrumb_navxt'); ?></label>
492
- <input type="text" name="singleblogpost_category_suffix" id="singleblogpost_category_suffix" value="<?php echo bcn_get_option_inputvalue('bcn_singleblogpost_category_suffix'); ?>" size="32" />
493
- </p>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
494
  </fieldset>
495
- <p class="submit"><input type="submit" name="bcn_admin_options" value="<?php _e('Update Options &raquo;') ?>" /></p>
496
  </form>
497
  </div>
498
  <?php
499
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
500
  //WordPress hooks
501
  if(function_exists('add_action')){
502
  //Installation Script hook
503
  add_action('activate_breadcrumb-navxt/breadcrumb_navxt_admin.php','bcn_install');
504
  //WordPress Admin interface hook
505
  add_action('admin_menu', 'bcn_add_page');
 
506
  //Admin Options hook
507
  if(isset($_POST['bcn_admin_options']))
508
  {
2
  /*
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.0
7
  Author: John Havlik
8
  Author URI: http://mtekk.weblogs.us/
9
  */
10
+ $bcn_admin_version = "2.1.0";
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11
  $bcn_admin_req = 8;
12
  //Include the breadcrumb class if needed
13
  if(!class_exists('bcn_breadcrumb'))
14
  {
15
+ require(dirname(__FILE__) . '/breadcrumb_navxt_class.php');
16
  }
17
  //Include the supplemental functions
18
+ require(dirname(__FILE__) . '/breadcrumb_navxt_api.php');
19
  //Security function
20
  function bcn_security()
21
  {
22
  global $userdata, $bcn_admin_req, $bcn_version, $wp_version;
23
+ //Make sure $userdata is filled
24
  get_currentuserinfo();
25
+ //If the user_levels aren't proper and the user is not an administrator via capabilities
26
+ if($userdata->user_level < $bcn_admin_req && $userdata->wp_capabilities['administrator'] != true)
27
  {
28
+ //If user_level is null which tends to cause problems for everyone
29
  if($userdata->user_level == NULL)
30
  {
31
  _e('<strong>Aborting: WordPress API Malfunction</strong><br /> For some reason the
32
+ function get_currentuserinfo() did not behave as expected. Your user_level seems to be null.
33
+ This can be resolved by navigationg to the Users section of the WordPress administrative interface.
34
+ In this section check the user that you use for administrative purposes. Then under the drop down
35
+ labled "change role to..." select administrator. Now click the change button. Should you still
36
+ recieve this error please report this bug to the plug-in author. In your report please specify
37
+ your WordPress version, PHP version, Apache (or whatever HTTP server you are using) verion, and
38
+ the version of the plug-in you are using.<br />', 'breadcrumb_navxt');
39
  _e('WordPress version: ', 'breadcrumb_navxt');
40
  echo $wp_version . '<br />';
41
  _e('PHP version: ', 'breadcrumb_navxt');
42
  echo phpversion() . '<br />';
43
  _e('Plug-in version: ', 'breadcrumb_navxt');
44
  echo $bcn_version . "<br />";
 
 
 
45
  }
46
+ //Otherwise we have an anauthorized acess attempt
47
  else
48
  {
49
  _e('<strong>Aborting: Insufficient Privleges</strong><br /> Your User Level: ', 'breadcrumb_navxt');
59
  {
60
  global $bcn_admin_req, $bcn_version;
61
  bcn_security();
62
+ if(get_option('bcn_version') != $bcn_admin_version)
63
  {
64
+ update_option('bcn_version' , $bcn_admin_version);
65
+ update_option('bcn_preserve', 0);
66
  update_option('bcn_static_frontpage', 'false');
67
  update_option('bcn_url_blog', '');
68
  update_option('bcn_home_display', 'true');
69
  update_option('bcn_home_link', 'true');
70
  update_option('bcn_title_home', 'Home');
71
  update_option('bcn_title_blog', 'Blog');
72
+ update_option('bcn_separator', '&nbsp;>&nbsp;');
73
  update_option('bcn_search_prefix', 'Search results for &#39;');
74
  update_option('bcn_search_suffix', '&#39;');
75
  update_option('bcn_author_prefix', 'Posts by ');
99
  update_option('bcn_paged_display', 'false');
100
  update_option('bcn_paged_prefix', ', Page&nbsp;');
101
  update_option('bcn_paged_suffix', '');
102
+ update_option('bcn_singleblogpost_taxonomy', 'category');
103
+ update_option('bcn_singleblogpost_taxonomy_display', 'true');
104
  update_option('bcn_singleblogpost_category_prefix', '');
105
  update_option('bcn_singleblogpost_category_suffix', '');
106
+ update_option('bcn_singleblogpost_tag_prefix', '');
107
+ update_option('bcn_singleblogpost_tag_suffix', '');
108
  }
109
  }
110
+ //An alias of bcn_display()
111
  function breadcrumb_nav_xt_display()
112
+ {
113
+ bcn_display();
114
+ }
115
+ //Display a breadcrumb, only used if admin interface is used
116
+ function bcn_display()
117
  {
118
  //Playing things really safe here
119
  if(class_exists('bcn_breadcrumb'))
157
  $breadcrumb->opt['paged_display'] = get_option('bcn_paged_display');
158
  $breadcrumb->opt['paged_prefix'] = get_option('bcn_paged_prefix');
159
  $breadcrumb->opt['paged_suffix'] = get_option('bcn_paged_suffix');
160
+ $breadcrumb->opt['singleblogpost_taxonomy'] = get_option('bcn_singleblogpost_taxonomy');
161
+ $breadcrumb->opt['singleblogpost_taxonomy_display'] = get_option('bcn_singleblogpost_taxonomy_display');
162
  $breadcrumb->opt['singleblogpost_category_prefix'] = get_option('bcn_singleblogpost_category_prefix');
163
  $breadcrumb->opt['singleblogpost_category_suffix'] = get_option('bcn_singleblogpost_category_suffix');
164
+ $breadcrumb->opt['singleblogpost_tag_prefix'] = get_option('bcn_singleblogpost_tag_prefix');
165
+ $breadcrumb->opt['singleblogpost_tag_suffix'] = get_option('bcn_singleblogpost_tag_suffix');
166
+ //Generate the breadcrumb
167
+ $breadcrumb->assemble();
168
  //Display the breadcrumb
169
  $breadcrumb->display();
170
  }
210
  update_option('bcn_paged_display', bcn_get('paged_display'));
211
  update_option('bcn_paged_prefix', bcn_get('paged_prefix'));
212
  update_option('bcn_paged_suffix', bcn_get('paged_suffix'));
213
+ update_option('bcn_singleblogpost_taxonomy', bcn_get('singleblogpost_taxonomy'));
214
+ update_option('bcn_singleblogpost_taxonomy_display', bcn_get('singleblogpost_taxonomy_display'));
215
  update_option('bcn_singleblogpost_category_prefix', bcn_get('singleblogpost_category_prefix'));
216
  update_option('bcn_singleblogpost_category_suffix', bcn_get('singleblogpost_category_suffix'));
217
+ update_option('bcn_singleblogpost_tag_prefix', bcn_get('singleblogpost_tag_prefix'));
218
+ update_option('bcn_singleblogpost_tag_suffix', bcn_get('singleblogpost_tag_suffix'));
219
  }
220
+ /**
221
+ * bcn_add_page
222
+ *
223
+ * Creates link to admin interface
224
+ */
225
  function bcn_add_page()
226
  {
227
  global $bcn_admin_req;
228
  add_options_page('Breadcrumb NavXT Settings', 'Breadcrumb NavXT', $bcn_admin_req, 'breadcrumb-nav-xt', 'bcn_admin');
229
  }
230
+ //The actual administrative interface
231
  function bcn_admin()
232
  {
233
  global $bcn_admin_req, $bcn_admin_version, $bcn_version;
251
  %sdocumentation%s
252
  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>'); ?>
253
  </p>
 
254
  <form action="options-general.php?page=breadcrumb-nav-xt" method="post" id="bcn_admin_options">
255
+ <fieldset id="general" class="bcn_options">
256
+ <legend><h3><?php _e('General Settings:', 'breadcrumb_navxt'); ?></h3></legend>
257
+ <table class="form-table">
258
+ <tr valign="top">
259
+ <th width="33%" scope="row">
260
+ <label for="title_blog"><?php _e('Blog Title:', 'breadcrumb_navxt'); ?></label>
261
+ </th>
262
+ <td>
263
+ <input type="text" name="title_blog" id="title_blog" value="<?php echo bcn_get_option_inputvalue('bcn_title_blog'); ?>" size="32" />
264
+ </td>
265
+ </tr>
266
+ <tr valign="top">
267
+ <th scope="row">
268
+ <label for="separator"><?php _e('Breadcrumb Separator:', 'breadcrumb_navxt'); ?></label>
269
+ </th>
270
+ <td>
271
+ <input type="text" name="separator" id="separator" value="<?php echo bcn_get_option_inputvalue('bcn_separator'); ?>" size="32" />
272
+ </td>
273
+ </tr>
274
+ <tr valign="top">
275
+ <th scope="row">
276
+ <label for="search_prefix"><?php _e('Search Prefix:', 'breadcrumb_navxt'); ?></label>
277
+ </th>
278
+ <td>
279
+ <input type="text" name="search_prefix" id="search_prefix" value="<?php echo bcn_get_option_inputvalue('bcn_search_prefix'); ?>" size="32" />
280
+ </td>
281
+ </tr>
282
+ <tr valign="top">
283
+ <th scope="row">
284
+ <label for="search_suffix"><?php _e('Search Suffix:', 'breadcrumb_navxt'); ?></label>
285
+ </th>
286
+ <td>
287
+ <input type="text" name="search_suffix" id="search_suffix" value="<?php echo bcn_get_option_inputvalue('bcn_search_suffix'); ?>" size="32" />
288
+ </td>
289
+ </tr>
290
+ <tr valign="top">
291
+ <th scope="row">
292
+ <label for="title_404"><?php _e('404 Title:', 'breadcrumb_navxt'); ?></label>
293
+ </th>
294
+ <td>
295
+ <input type="text" name="title_404" id="title_404" value="<?php echo bcn_get_option_inputvalue('bcn_title_404'); ?>" size="32" />
296
+ </td>
297
+ </tr>
298
+ </table>
299
  </fieldset>
300
+ <fieldset id="static_front_page" class="bcn_options">
301
+ <legend><h3><?php _e('Static Frontpage Settings:', 'breadcrumb_navxt'); ?></h3></legend>
302
+ <table class="form-table">
303
+ <tr valign="top">
304
+ <th width="33%" scope="row">
305
+ <label for="static_frontpage"><?php _e('Static Frontpage:', 'breadcrumb_navxt'); ?></label>
306
+ </th>
307
+ <td>
308
+ <select name="static_frontpage">
309
+ <?php echo bcn_select_options_truefalse('bcn_static_frontpage') ?>
310
+ </select>
311
+ </td>
312
+ </tr>
313
+ <tr valign="top">
314
+ <th scope="row">
315
+ <label for="url_blog"><?php _e('Relative Blog URL:', 'breadcrumb_navxt'); ?></label>
316
+ </th>
317
+ <td>
318
+ <input type="text" name="url_blog" id="url_blog" value="<?php echo bcn_get_option_inputvalue('bcn_url_blog'); ?>" size="32" />
319
+ </td>
320
+ </tr>
321
+ <tr valign="top">
322
+ <th scope="row">
323
+ <label for="home_display"><?php _e('Display Home:', 'breadcrumb_navxt'); ?></label>
324
+ </th>
325
+ <td>
326
+ <select name="home_display">
327
+ <?php bcn_select_options_truefalse('bcn_home_display') ?>
328
+ </select>
329
+ </td>
330
+ </tr>
331
+ <tr valign="top">
332
+ <th scope="row">
333
+ <label for="home_link"><?php _e('Display Home Link:', 'breadcrumb_navxt'); ?></label>
334
+ </th>
335
+ <td>
336
+ <select name="home_link">
337
+ <?php bcn_select_options_truefalse('bcn_home_link'); ?>
338
+ </select>
339
+ </td>
340
+ </tr>
341
+ <tr valign="top">
342
+ <th scope="row">
343
+ <label for="title_home"><?php _e('Home Title:', 'breadcrumb_navxt'); ?></label>
344
+ </th>
345
+ <td>
346
+ <input type="text" name="title_home" id="title_home" value="<?php echo bcn_get_option_inputvalue('bcn_title_home'); ?>" size="32" />
347
+ </td>
348
+ </tr>
349
+ </table>
350
  </fieldset>
351
+ <fieldset id="author" class="bcn_options">
352
+ <legend><h3><?php _e('Author Page Settings:', 'breadcrumb_navxt'); ?></h3></legend>
353
+ <table class="form-table">
354
+ <tr valign="top">
355
+ <th width="33%" scope="row">
356
+ <label for="author_prefix"><?php _e('Author Prefix:', 'breadcrumb_navxt'); ?></label>
357
+ </th>
358
+ <td>
359
+ <input type="text" name="author_prefix" id="author_prefix" value="<?php echo bcn_get_option_inputvalue('bcn_author_prefix'); ?>" size="32" />
360
+ </td>
361
+ </tr>
362
+ <tr valign="top">
363
+ <th scope="row">
364
+ <label for="author_suffix"><?php _e('Author Suffix:', 'breadcrumb_navxt'); ?></label>
365
+ </th>
366
+ <td>
367
+ <input type="text" name="author_suffix" id="author_suffix" value="<?php echo bcn_get_option_inputvalue('bcn_author_suffix'); ?>" size="32" />
368
+ </td>
369
+ </tr>
370
+ <tr valign="top">
371
+ <th scope="row">
372
+ <label for="author_display"><?php _e('Author Display Format:', 'breadcrumb_navxt'); ?></label>
373
+ </th>
374
+ <td>
375
+ <select name="author_display">
376
+ <?php bcn_select_options('bcn_author_display', array("display_name", "nickname", "first_name", "last_name")); ?>
377
+ </select>
378
+ </td>
379
+ </tr>
380
+
381
+ </table>
382
  </fieldset>
383
+ <fieldset id="category" class="bcn_options">
384
+ <legend><h3><?php _e('Archive Display Settings:', 'breadcrumb_navxt'); ?></h3></legend>
385
+ <table class="form-table">
386
+ <tr valign="top">
387
+ <th width="33%" scope="row">
388
+ <label for="urltitle_prefix"><?php _e('URL Title Prefix:', 'breadcrumb_navxt'); ?></label>
389
+ </th>
390
+ <td>
391
+ <input type="text" name="urltitle_prefix" id="urltitle_prefix" value="<?php echo bcn_get_option_inputvalue('bcn_urltitle_prefix'); ?>" size="32" />
392
+ </td>
393
+ </tr>
394
+ <tr valign="top">
395
+ <th scope="row">
396
+ <label for="urltitle_suffix"><?php _e('URL Title Suffix:', 'breadcrumb_navxt'); ?></label>
397
+ </th>
398
+ <td>
399
+ <input type="text" name="urltitle_suffix" id="urltitle_suffix" value="<?php echo bcn_get_option_inputvalue('bcn_urltitle_suffix'); ?>" size="32" />
400
+ </td>
401
+ </tr>
402
+ <tr valign="top">
403
+ <th scope="row">
404
+ <label for="archive_category_prefix"><?php _e('Archive by Category Prefix:', 'breadcrumb_navxt'); ?></label>
405
+ </th>
406
+ <td>
407
+ <input type="text" name="archive_category_prefix" id="archive_category_prefix" value="<?php echo bcn_get_option_inputvalue('bcn_archive_category_prefix'); ?>" size="32" />
408
+ </td>
409
+ </tr>
410
+ <tr valign="top">
411
+ <th scope="row">
412
+ <label for="archive_category_suffix"><?php _e('Archive by Category Suffix:', 'breadcrumb_navxt'); ?></label>
413
+ </th>
414
+ <td>
415
+ <input type="text" name="archive_category_suffix" id="archive_category_suffix" value="<?php echo bcn_get_option_inputvalue('bcn_archive_category_suffix'); ?>" size="32" />
416
+ </td>
417
+ </tr>
418
+ <tr valign="top">
419
+ <th scope="row">
420
+ <label for="archive_date_prefix"><?php _e('Archive by Date Prefix:', 'breadcrumb_navxt'); ?></label>
421
+ </th>
422
+ <td>
423
+ <input type="text" name="archive_date_prefix" id="archive_date_prefix" value="<?php echo bcn_get_option_inputvalue('bcn_archive_date_prefix'); ?>" size="32" />
424
+ </td>
425
+ </tr>
426
+ <tr valign="top">
427
+ <th scope="row">
428
+ <label for="archive_date_suffix"><?php _e('Archive by Date Suffix:', 'breadcrumb_navxt'); ?></label>
429
+ </th>
430
+ <td>
431
+ <input type="text" name="archive_date_suffix" id="archive_date_suffix" value="<?php echo bcn_get_option_inputvalue('bcn_archive_date_suffix'); ?>" size="32" />
432
+ </td>
433
+ </tr>
434
+ <tr valign="top">
435
+ <th scope="row">
436
+ <label for="archive_date_format"><?php _e('Archive by Date Format:', 'breadcrumb_navxt'); ?></label>
437
+ </th>
438
+ <td>
439
+ <select name="archive_date_format">
440
+ <?php bcn_select_options('bcn_archive_date_format', array("EU", "US", "ISO")); ?>
441
+ </select>
442
+ </td>
443
+ </tr>
444
+ <tr valign="top">
445
+ <th scope="row">
446
+ <label for="archive_tag_prefix"><?php _e('Archive by Tag Prefix:', 'breadcrumb_navxt'); ?></label>
447
+ </th>
448
+ <td>
449
+ <input type="text" name="archive_tag_prefix" id="archive_tag_prefix" value="<?php echo bcn_get_option_inputvalue('bcn_archive_tag_prefix'); ?>" size="32" />
450
+ </td>
451
+ </tr>
452
+ <tr valign="top">
453
+ <th scope="row">
454
+ <label for="archive_tag_suffix"><?php _e('Archive by Tag Suffix:', 'breadcrumb_navxt'); ?></label>
455
+ </th>
456
+ <td>
457
+ <input type="text" name="archive_tag_suffix" id="archive_tag_suffix" value="<?php echo bcn_get_option_inputvalue('bcn_archive_tag_suffix'); ?>" size="32" />
458
+ </td>
459
+ </tr>
460
+ </table>
461
  </fieldset>
462
+ <fieldset id="current" class="bcn_options">
463
+ <legend><h3><?php _e('Current Item Settings:', 'breadcrumb_navxt'); ?></h3></legend>
464
+ <table class="form-table">
465
+ <tr valign="top">
466
+ <th width="33%" scope="row">
467
+ <label for="link_current_item"><?php _e('Link Current Item:', 'breadcrumb_navxt'); ?></label>
468
+ </th>
469
+ <td>
470
+ <select name="link_current_item">
471
+ <?php bcn_select_options_truefalse('bcn_link_current_item'); ?>
472
+ </select>
473
+ </td>
474
+ </tr>
475
+ <tr valign="top">
476
+ <th scope="row">
477
+ <label for="current_item_urltitle"><?php _e('Current Item URL Title:', 'breadcrumb_navxt'); ?></label>
478
+ </th>
479
+ <td>
480
+ <input type="text" name="current_item_urltitle" id="current_item_urltitle" value="<?php echo bcn_get_option_inputvalue('bcn_current_item_urltitle'); ?>" size="32" />
481
+ </td>
482
+ </tr>
483
+ <tr valign="top">
484
+ <th scope="row">
485
+ <label for="current_item_style_prefix"><?php _e('Current Item Style Prefix:', 'breadcrumb_navxt'); ?></label>
486
+ </th>
487
+ <td>
488
+ <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" />
489
+ </td>
490
+ </tr>
491
+ <tr valign="top">
492
+ <th scope="row">
493
+ <label for="current_item_style_suffix"><?php _e('Current Item Style Suffix:', 'breadcrumb_navxt'); ?></label>
494
+ </th>
495
+ <td>
496
+ <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" />
497
+ </td>
498
+ </tr>
499
+ <tr valign="top">
500
+ <th scope="row">
501
+ <label for="paged_display"><?php _e('Display Paged Text:', 'breadcrumb_navxt'); ?></label>
502
+ </th>
503
+ <td>
504
+ <select name="paged_display">
505
+ <?php bcn_select_options_truefalse('bcn_paged_display'); ?>
506
+ </select>
507
+ </td>
508
+ </tr>
509
+ <tr valign="top">
510
+ <th scope="row">
511
+ <label for="paged_prefix"><?php _e('Paged Prefix:', 'breadcrumb_navxt'); ?></label>
512
+ </th>
513
+ <td>
514
+ <input type="text" name="paged_prefix" id="paged_prefix" value="<?php echo bcn_get_option_inputvalue('bcn_paged_prefix'); ?>" size="32" />
515
+ </td>
516
+ </tr>
517
+ <tr valign="top">
518
+ <th scope="row">
519
+ <label for="paged_suffix"><?php _e('Paged Suffix:', 'breadcrumb_navxt'); ?></label>
520
+ </th>
521
+ <td>
522
+ <input type="text" name="paged_suffix" id="paged_suffix" value="<?php echo bcn_get_option_inputvalue('bcn_paged_suffix'); ?>" size="32" />
523
+ </td>
524
+ </tr>
525
+ </table>
526
  </fieldset>
527
+ <fieldset id="single" class="bcn_options">
528
+ <legend><h3><?php _e('Single Post Settings:', 'breadcrumb_navxt'); ?></h3></legend>
529
+ <table class="form-table">
530
+ <tr valign="top">
531
+ <th width="33%" scope="row">
532
+ <label for="singleblogpost_prefix"><?php _e('Single Blogpost Prefix:', 'breadcrumb_navxt'); ?></label>
533
+ </th>
534
+ <td>
535
+ <input type="text" name="singleblogpost_prefix" id="singleblogpost_prefix" value="<?php echo bcn_get_option_inputvalue('bcn_singleblogpost_prefix'); ?>" size="32" />
536
+ </td>
537
+ </tr>
538
+ <tr valign="top">
539
+ <th scope="row">
540
+ <label for="singleblogpost_suffix"><?php _e('Single Blogpost Suffix:', 'breadcrumb_navxt'); ?></label>
541
+ </th>
542
+ <td>
543
+ <input type="text" name="singleblogpost_suffix" id="singleblogpost_suffix" value="<?php echo bcn_get_option_inputvalue('bcn_singleblogpost_suffix'); ?>" size="32" />
544
+ </td>
545
+ </tr>
546
+ <tr valign="top">
547
+ <th scope="row">
548
+ <label for="page_prefix"><?php _e('Page Prefix:', 'breadcrumb_navxt'); ?></label>
549
+ </th>
550
+ <td>
551
+ <input type="text" name="page_prefix" id="page_prefix" value="<?php echo bcn_get_option_inputvalue('bcn_page_prefix'); ?>" size="32" />
552
+ </td>
553
+ </tr>
554
+ <tr valign="top">
555
+ <th scope="row">
556
+ <label for="page_suffix"><?php _e('Page Suffix:', 'breadcrumb_navxt'); ?></label>
557
+ </th>
558
+ <td>
559
+ <input type="text" name="page_suffix" id="page_suffix" value="<?php echo bcn_get_option_inputvalue('bcn_page_suffix'); ?>" size="32" />
560
+ </td>
561
+ </tr>
562
+ <tr valign="top">
563
+ <th scope="row">
564
+ <label for="attachment_prefix"><?php _e('Post Attachment Prefix:', 'breadcrumb_navxt'); ?></label>
565
+ </th>
566
+ <td>
567
+ <input type="text" name="attachment_prefix" id="attachment_prefix" value="<?php echo bcn_get_option_inputvalue('bcn_attachment_prefix'); ?>" size="32" />
568
+ </td>
569
+ </tr>
570
+ <tr valign="top">
571
+ <th scope="row">
572
+ <label for="attachment_suffix"><?php _e('Post Attachment Suffix:', 'breadcrumb_navxt'); ?></label>
573
+ </th>
574
+ <td>
575
+ <input type="text" name="attachment_suffix" id="attachment_suffix" value="<?php echo bcn_get_option_inputvalue('bcn_attachment_suffix'); ?>" size="32" />
576
+ </td>
577
+ </tr>
578
+ <tr valign="top">
579
+ <th scope="row">
580
+ <label for="title_home"><?php _e('Post Title Maxlen:', 'breadcrumb_navxt'); ?></label>
581
+ </th>
582
+ <td>
583
+ <input type="text" name="posttitle_maxlen" id="posttitle_maxlen" value="<?php echo bcn_get_option_inputvalue('bcn_posttitle_maxlen'); ?>" size="10" />
584
+ </td>
585
+ </tr>
586
+ <tr valign="top">
587
+ <th scope="row">
588
+ <label for="singleblogpost_taxonomy_display"><?php _e('Single Blog Post Taxonomy Display:', 'breadcrumb_navxt'); ?></label>
589
+ </th>
590
+ <td>
591
+ <select name="singleblogpost_taxonomy_display">
592
+ <?php bcn_select_options_truefalse('bcn_singleblogpost_taxonomy_display'); ?>
593
+ </select>
594
+ </td>
595
+ </tr>
596
+ <tr valign="top">
597
+ <th scope="row">
598
+ <label for="singleblogpost_taxonomy"><?php _e('Single Blog Post Taxonomy:', 'breadcrumb_navxt'); ?></label>
599
+ </th>
600
+ <td>
601
+ <select name="singleblogpost_taxonomy">
602
+ <?php bcn_select_options('bcn_singleblogpost_taxonomy', array("category", "tag")); ?>
603
+ </select>
604
+ </td>
605
+ </tr>
606
+ <tr valign="top">
607
+ <th scope="row">
608
+ <label for="singleblogpost_category_prefix"><?php _e('Single Blog Post Category Prefix:', 'breadcrumb_navxt'); ?></label>
609
+ </th>
610
+ <td>
611
+ <input type="text" name="singleblogpost_category_prefix" id="singleblogpost_category_prefix" value="<?php echo bcn_get_option_inputvalue('bcn_singleblogpost_category_prefix'); ?>" size="32" />
612
+ </td>
613
+ </tr>
614
+ <tr valign="top">
615
+ <th scope="row">
616
+ <label for="singleblogpost_category_suffix"><?php _e('Single Blog Post Category Suffix:', 'breadcrumb_navxt'); ?></label>
617
+ </th>
618
+ <td>
619
+ <input type="text" name="singleblogpost_category_suffix" id="singleblogpost_category_suffix" value="<?php echo bcn_get_option_inputvalue('bcn_singleblogpost_category_suffix'); ?>" size="32" />
620
+ </td>
621
+ </tr>
622
+ <tr valign="top">
623
+ <th scope="row">
624
+ <label for="singleblogpost_tag_prefix"><?php _e('Single Blog Post Tag Prefix:', 'breadcrumb_navxt'); ?></label>
625
+ </th>
626
+ <td>
627
+ <input type="text" name="singleblogpost_tag_prefix" id="singleblogpost_tag_prefix" value="<?php echo bcn_get_option_inputvalue('bcn_singleblogpost_tag_prefix'); ?>" size="32" />
628
+ </td>
629
+ </tr>
630
+ <tr valign="top">
631
+ <th scope="row">
632
+ <label for="singleblogpost_tag_suffix"><?php _e('Single Blog Post Tag Suffix:', 'breadcrumb_navxt'); ?></label>
633
+ </th>
634
+ <td>
635
+ <input type="text" name="singleblogpost_tag_suffix" id="singleblogpost_tag_suffix" value="<?php echo bcn_get_option_inputvalue('bcn_singleblogpost_tag_suffix'); ?>" size="32" />
636
+ </td>
637
+ </tr>
638
+ </table>
639
  </fieldset>
640
+ <p class="submit"><input type="submit" name="bcn_admin_options" value="<?php _e('Save Changes') ?>" /></p>
641
  </form>
642
  </div>
643
  <?php
644
  }
645
+ /**
646
+ * bcn_select_options
647
+ *
648
+ * displays wordpress options as <seclect> options
649
+ *
650
+ * @param (string) optionname name of wordpress options store
651
+ * @param (array) options array of options
652
+ */
653
+ function bcn_select_options($optionname, array $options)
654
+ {
655
+ $value = get_option($optionname);
656
+
657
+ printf('<option>%s</option>', $value);
658
+
659
+ foreach($options as $option)
660
+ {
661
+ if($option != $value)
662
+ {
663
+ printf('<option>%s</option>', $option);
664
+ }
665
+ }
666
+
667
+ }
668
+ /**
669
+ * bcn_select_options_truefalse
670
+ *
671
+ * displays wordpress options as true/fals <seclect> options
672
+ *
673
+ * @param (string) optionname of wordpress options store
674
+ */
675
+ function bcn_select_options_truefalse($optionname)
676
+ {
677
+ bcn_select_options($optionname, array('true', 'false'));
678
+ }
679
+ //Additional styles for admin interface
680
+ function bcn_options_style()
681
+ {
682
+ ?>
683
+ <style>
684
+ .bcn_options{border: none;}
685
+ </style>
686
+ <?php
687
+ }
688
  //WordPress hooks
689
  if(function_exists('add_action')){
690
  //Installation Script hook
691
  add_action('activate_breadcrumb-navxt/breadcrumb_navxt_admin.php','bcn_install');
692
  //WordPress Admin interface hook
693
  add_action('admin_menu', 'bcn_add_page');
694
+ add_action('admin_head', 'bcn_options_style');
695
  //Admin Options hook
696
  if(isset($_POST['bcn_admin_options']))
697
  {
breadcrumb_navxt_api.php CHANGED
@@ -17,7 +17,6 @@
17
  * codebase in 2007-09.
18
  * see http://trac.wordpress.org/ticket/4781
19
  */
20
-
21
  /**
22
  * bcn_get_option_inputvalue
23
  *
17
  * codebase in 2007-09.
18
  * see http://trac.wordpress.org/ticket/4781
19
  */
 
20
  /**
21
  * bcn_get_option_inputvalue
22
  *
breadcrumb_navxt_class.php CHANGED
@@ -2,8 +2,8 @@
2
  /*
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. For details on how to use this plugin visit <a href="http://mtekk.weblogs.us/code/breadcrumb-navxt/">Breadcrumb NavXT</a>.
6
- Version: 2.0.4
7
  Author: John Havlik
8
  Author URI: http://mtekk.weblogs.us/
9
  */
@@ -23,11 +23,12 @@ 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.0.4";
27
  //The main class
28
  class bcn_breadcrumb
29
  {
30
  var $opt;
 
31
  //Class Constructor
32
  function bcn_breadcrumb()
33
  {
@@ -43,7 +44,7 @@ class bcn_breadcrumb
43
  //Display HOME? If set to false, HOME is not being displayed.
44
  'home_display' => 'true',
45
  //URL for the home link
46
- 'url_home' => get_option('home'),
47
  //Apply a link to HOME? If set to false, only plain text is being displayed.
48
  'home_link' => 'true',
49
  //Text displayed for the home link, if you don't want to call it home then just change this.
@@ -56,7 +57,7 @@ class bcn_breadcrumb
56
  //Separator that is placed between each item in the breadcrumb navigation, but not placed before
57
  //the first and not after the last element. You also can use images here,
58
  //e.g. '<img src="separator.gif" title="separator" width="10" height="8" />'
59
- 'separator' => ' > ',
60
  //Prefix for a search page
61
  'search_prefix' => 'Search results for &#39;',
62
  //Suffix for a search page
@@ -115,341 +116,505 @@ class bcn_breadcrumb
115
  'current_item_style_suffix' => '',
116
  //Maximum number of characters of post title to be displayed? 0 means no limit.
117
  'posttitle_maxlen' => 0,
118
- //Display category when displaying single blog post
119
- 'singleblogpost_category_display' => 'true',
120
- //Prefix for single blog post category, only being used if 'singleblogpost_category_display' => true
 
 
121
  'singleblogpost_category_prefix' => '',
122
- //Suffix for single blog post category, only being used if 'singleblogpost_category_display' => true
123
  'singleblogpost_category_suffix' => '',
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
124
  );
125
  }
126
- //Breadcrumb Creation Function
127
- function display($bcn_return = false)
128
  {
129
- global $wpdb, $post, $wp_query, $bcn_version, $paged;
130
- //Initilize running length variable
131
- $length = 0;
132
- //Initilize breadcrumb stream
133
- $breadcrumb = array(
134
- //Used for the blog title
135
- 'title' => NULL,
136
- //Used for the category/page hierarchy
137
- 'middle' => NULL,
138
- //Used for the current tiem
139
- 'last' => array(
140
- 'prefix' => NULL,
141
- 'item' => NULL,
142
- 'suffix' => NULL
143
- )
144
- );
145
- //Figure out the title link
146
- //For home page
147
- if(is_home())
148
  {
149
- //Static front page
150
- if(($this->opt['static_frontpage'] === 'true' || get_option('page_on_front')) && $this->opt['home_display'] === 'true')
151
- {
152
- //Should we display the home link or not
153
- if($this->opt['home_link'])
154
- {
155
- //If so, let's set it up
156
- $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>';
157
- }
158
- else
159
- {
160
- //Otherwise just the specified 'title_home' will do
161
- $breadcrumb['title'] = $this->opt['title_home'];
162
- }
163
- }
164
- //If it's paged, we'll want to link it to the first page
165
- else if(is_paged() && $this->opt['paged_display'] === 'true')
166
  {
167
- $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>';
168
- }
169
- //Non-static front page, if link current item is off
170
- else if($this->opt['link_current_item'] === 'false')
171
- {
172
- $breadcrumb['title'] = $this->opt['title_blog'];
173
  }
174
  else
175
  {
176
- $breadcrumb['title'] = '<a title="' . $this->opt['current_item_urltitle'] . '" href="' . get_option('home') . '" >' . $this->opt['title_blog'] . '</a>';
 
177
  }
178
  }
179
- //For everyone else
180
- else
181
  {
182
- $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>';
183
  }
184
- ////////////////////////////////////
185
- //Do specific opperations for the various page types
186
- ////////////////////////////////////
187
- //For searches
188
- if(is_search())
189
  {
190
- Global $s;
191
- //Get the search prefix
192
- $breadcrumb['last']['prefix'] = $this->opt['search_prefix'];
193
- //Get the searched text
194
- $breadcrumb['last']['item'] = wp_specialchars($s, 1);
195
- //Get the search suffix
196
- $breadcrumb['last']['suffix'] = $this->opt['search_suffix'];
197
  }
198
- ////////////////////////////////////
199
- //For post/page attachments
200
- else if(is_attachment())
201
  {
202
- //Blog link and parent page
203
- $bcn_parent_id = $post->post_parent;
204
- //Get the parent title
205
- $bcn_parent_title = get_post($bcn_parent_id);
206
- //Setup the attachment's parent link
207
- $bcn_parent = '<a title="' . $this->opt['urltitle_prefix'] .
208
- $bcn_parent_title->post_title . $this->opt['urltitle_suffix'] . '" href="' . get_permalink($bcn_parent_id) . '">' . $bcn_parent_title->post_title . '</a>';
209
- $breadcrumb['middle'] = $bcn_parent;
210
- //Attachment prefix text
211
- $breadcrumb['last']['prefix'] = $this->opt['attachment_prefix'];
212
- //Get attachment name
213
- $breadcrumb['last']['item'] = trim(wp_title('', false));
214
- //Attachment suffix text
215
- $breadcrumb['last']['suffix'] = $this->opt['attachment_suffix'];
216
  }
217
- ////////////////////////////////////
218
- //For pages
219
- else if(is_page())
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
220
  {
221
- //Get the post title, this is a more robust method than using $post
222
- $bcn_page_title = trim(wp_title('', false));
223
- $bcn_parent_id = $post->post_parent;
224
- $bcn_middle = array();
225
- if($bcn_parent_id != 0)
 
226
  {
227
- //Fill the initial page
228
- //Use WordPress API, though a bit heavier than the old method, this will ensure compatibility with other plug-ins
229
  $bcn_parent = get_post($bcn_parent_id);
 
230
  $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>';
231
- $bcn_parent_id = $bcn_parent->post_parent;
232
- while(is_numeric($bcn_parent_id) && $bcn_parent_id != 0)
233
- {
234
- $bcn_parent = get_post($bcn_parent_id);
235
- //Pushback a page into the array
236
- $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>';
237
- $bcn_parent_id = $bcn_parent->post_parent;
238
- }
239
- krsort($bcn_middle);
240
  }
241
- //Check to advoid Home > Home condition, has quick fallout for non-static conditions
242
- if(get_option('page_on_front') == 0 || !$this->opt['static_frontpage'] || (strtolower($bcn_page_title) != strtolower($this->opt['title_home'])))
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
243
  {
244
- $breadcrumb['middle'] = $bcn_middle;
245
- $breadcrumb['last']['prefix'] = $this->opt['page_prefix'];
246
- $breadcrumb['last']['item'] = $bcn_page_title;
247
- $breadcrumb['last']['suffix'] = $this->opt['page_suffix'];
248
  }
 
249
  }
250
- ////////////////////////////////////
251
- //For blog posts
252
- else if(is_single())
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
253
  {
254
- //Get the post title, this is a more robust method than using $post
255
- $bcn_post_title = trim(wp_title('', false));
256
- //Add categories if told to
257
- if($this->opt['singleblogpost_category_display'] === 'true') {
258
- //Figure out the categories leading up to the post
259
- $bcn_middle = array();
260
- //Fills the object to get
261
- $bcn_object = get_the_category();
262
- //Now find which one has a parrent, pick the first one that does
263
- $i = 0;
264
- $bcn_use_category = 0;
265
- foreach($bcn_object as $object)
266
  {
267
- if(is_numeric($object->category_parent) && $bcn_use_category == 0)
268
- {
269
- $bcn_use_category = $i;
270
- }
271
- $i++;
272
  }
273
- //Get parents of current category
274
- $bcn_category = $bcn_object[$bcn_use_category];
275
- //Fill the initial category
276
- $bcn_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'];
277
- $bcn_parent_id = $bcn_category->category_parent;
278
- while($bcn_parent_id)
279
  {
280
- $bcn_category = get_category($bcn_parent_id);
281
- //Pushback a category into the array
282
- $bcn_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'];
283
- $bcn_parent_id = $bcn_category->category_parent;
284
  }
285
- //We need to reverse the order (by key) to get the proper output
286
- krsort($bcn_middle);
287
  }
288
- //Trim post title if needed
289
- if($this->opt['posttitle_maxlen'] > 0 && (strlen($bcn_post_title) + 3) > $this->opt['posttitle_maxlen'])
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
290
  {
291
- $bcn_post_title = substr($bcn_post_title, 0, $this->opt['posttitle_maxlen']-1) . '&hellip;';
292
  }
293
- //Place it all in the array
294
- $breadcrumb['middle'] = $bcn_middle;
295
- $breadcrumb['last']['prefix'] = $this->opt['singleblogpost_prefix'];
296
- $breadcrumb['last']['item'] = $bcn_post_title;
297
- $breadcrumb['last']['suffix'] = $this->opt['singleblogpost_suffix'];
298
  }
299
- ////////////////////////////////////
300
- //For author pages
301
- else if(is_author())
302
  {
303
- //Author prefix text
304
- $breadcrumb['last']['prefix'] = $this->opt['author_prefix'];
305
- //Get the Author name, note it is an array
306
- $bcn_curauth = (get_query_var('author_name')) ? get_userdatabylogin(get_query_var('author_name')) : get_userdata(get_query_var('author'));
307
- //Get the Author display type
308
- $bcn_authdisp = $this->opt['author_display'];
309
- //Make sure user picks only safe values
310
- if($bcn_authdisp == 'nickname' || $bcn_authdisp == 'nickname' || $bcn_authdisp == 'first_name' || $bcn_authdisp == 'last_name' || $bcn_authdisp == 'display_name')
311
  {
312
- $breadcrumb['last']['item'] = $bcn_curauth->$bcn_authdisp;
 
 
 
 
313
  }
314
- $breadcrumb['last']['suffix'] = $this->opt['author_suffix'];
 
315
  }
316
- ////////////////////////////////////
317
- //For category based archives
318
- else if(is_archive() && is_category())
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
319
  {
320
- //Simmilar to using $post, but for things $post doesn't cover
321
- $bcn_object = $wp_query->get_queried_object();
322
- //Get parents of current category
323
- $bcn_parent_id = $bcn_object->category_parent;
324
- $cat_breadcrumbs = '';
325
- while($bcn_parent_id)
326
  {
327
- $bcn_category = get_category($bcn_parent_id);
328
- $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;
329
- $bcn_parent_id = $bcn_category->category_parent;
 
 
 
 
 
330
  }
331
- //New hiearchy dictates that cateories look like parent pages, and thus
332
- $breadcrumb['last']['prefix'] = $cat_breadcrumbs;
333
- $breadcrumb['last']['prefix'] .= $this->opt['archive_category_prefix'];
334
- //Current Category, uses WP API to get the title of the page, hopefully itis more robust than the old method
335
- $breadcrumb['last']['item'] = trim(wp_title('', false));
336
- $breadcrumb['last']['suffix'] = $this->opt['archive_category_suffix'];
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
337
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
338
  ////////////////////////////////////
339
- //For date based archives
340
- else if(is_archive() && is_date())
 
 
341
  {
342
- //If it's archives by day
343
- if(is_day())
 
 
 
 
344
  {
345
- //If the date format is US style
346
- if($this->opt['archive_date_format'] == 'US')
347
  {
348
- $breadcrumb['last']['prefix'] = $this->opt['archive_date_prefix'];
349
- $breadcrumb['last']['item'] = '<a title="Browse to the ' .
350
- get_the_time('F') . ' ' . get_the_time('Y') . ' archive" href="' .
351
- get_year_link(get_the_time('Y')) . get_the_time('m') . '">' .
352
- get_the_time('F') . '</a>' . ' ' . get_the_time('jS') . ', ' .
353
- ' <a title="Browse to the ' . get_the_time('Y') . ' archive" href="' .
354
- get_year_link(get_the_time('Y')) . '">' . get_the_time('Y') . '</a>';
355
- $breadcrumb['last']['suffix'] = $this->opt['archive_date_suffix'];
356
  }
357
- //If the date format is ISO style
358
- else if($this->opt['archive_date_format'] == 'ISO')
359
  {
360
- $breadcrumb['last']['prefix'] = $this->opt['archive_date_prefix'];
361
- $breadcrumb['last']['item'] = ' <a title="Browse to the ' .
362
- get_the_time('Y') . ' archive" href="' . get_year_link(get_the_time('Y')) .
363
- '">' . get_the_time('Y') . '</a> <a title="Browse to the ' .
364
- get_the_time('F') . ' ' . get_the_time('Y') . ' archive" href="' .
365
- get_year_link(get_the_time('Y')) . get_the_time('m') . '">' .
366
- get_the_time('F') . '</a>' . ' ' . get_the_time('d');
367
- $breadcrumb['last']['suffix'] = $this->opt['archive_date_suffix'];
368
  }
369
- //If the date format is European style
370
  else
371
  {
372
- $breadcrumb['last']['prefix'] = $this->opt['archive_date_prefix'];
373
- $breadcrumb['last']['item'] = get_the_time('d') . ' ' .
374
- '<a title="Browse to the ' . get_the_time('F') . ' ' . get_the_time('Y') .
375
- ' archive" href="' . get_year_link(get_the_time('Y')) . get_the_time('m') .
376
- '">' . get_the_time('F') . '</a>' . ' <a title="Browse to the ' .
377
- get_the_time('Y') . ' archive" href="' . get_year_link(get_the_time('Y')) .
378
- '">' . get_the_time('Y') . '</a>';
379
- $breadcrumb['last']['suffix'] = $this->opt['archive_date_suffix'];
380
  }
381
  }
382
- //If it's archives by month
383
- else if(is_month())
384
- {
385
- $breadcrumb['last']['prefix'] = $this->opt['archive_date_prefix'];
386
- $breadcrumb['last']['item'] = get_the_time('F') . ' ' . '<a title="Browse to the ' .
387
- get_the_time('Y') . ' archive" href="' . get_year_link(get_the_time('Y')) . '">' .
388
- get_the_time('Y') . '</a>';
389
- $breadcrumb['last']['suffix'] = $this->opt['archive_date_suffix'];
390
- }
391
- //If it's archives by year
392
- else if(is_year())
393
  {
394
- $breadcrumb['last']['prefix'] = $this->opt['archive_date_prefix'];
395
- $breadcrumb['last']['item'] = get_the_time('Y');
396
- $breadcrumb['last']['suffix'] = $this->opt['archive_date_suffix'];
397
  }
398
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
399
  ////////////////////////////////////
400
  //For tag based archives
401
  else if(is_archive() && is_tag())
402
  {
403
- $breadcrumb['last']['prefix'] = $this->opt['archive_tag_prefix'];
404
- //Use the WordPress API for the page title, should hook better than the other method
405
- $breadcrumb['last']['item'] = trim(wp_title('', false));
406
- $breadcrumb['last']['suffix'] = $this->opt['archive_tag_suffix'];
407
  }
408
  ////////////////////////////////////
409
  //For 404 pages
410
  else if(is_404())
411
  {
412
- $breadcrumb['last']['item'] = $this->opt['title_404'];
413
  }
414
  ////////////////////////////////////
415
  //For paged items
416
  if(is_paged() && $this->opt['paged_display'] === 'true')
417
  {
418
- //For home pages
419
- if(is_home())
420
- {
421
- $breadcrumb['title'] .= $this->opt['paged_prefix'] . $paged . $this->opt['paged_suffix'];
422
- }
423
- //For archive/search pages
424
- else
425
- {
426
- $breadcrumb['last']['suffix'] .= $this->opt['paged_prefix'] . $paged . $this->opt['paged_suffix'];
427
- }
428
  }
 
 
 
 
 
429
  ////////////////////////////////////
430
  //Assemble the breadcrumb
431
  $bcn_output = '';
432
- if($breadcrumb['title'])
433
  {
434
- $bcn_output .= $breadcrumb['title'];
435
- if(is_array($breadcrumb['middle']))
 
 
 
 
 
 
 
 
 
 
 
436
  {
437
- foreach($breadcrumb['middle'] as $bcn_mitem)
438
  {
439
  $bcn_output .= $this->opt['separator'] . $bcn_mitem;
440
  }
441
  }
442
- else if($breadcrumb['middle'])
443
  {
444
- $bcn_output .= $this->opt['separator'] . $breadcrumb['middle'];
445
  }
446
- if($breadcrumb['last']['item'] != NULL)
447
  {
448
  if($this->opt['link_current_item'] === 'true')
449
  {
450
- $breadcrumb['last']['item'] = '<a title="' . $this->opt['current_item_urltitle'] . '" href="' . $_SERVER['REQUEST_URI'] . '">' . $breadcrumb['last']['item'] . '</a>';
451
  }
452
- $bcn_output .= $this->opt['separator'] . $this->opt['current_item_style_prefix'] . $breadcrumb['last']['prefix'] . $breadcrumb['last']['item'] . $breadcrumb['last']['suffix'] . $this->opt['current_item_style_suffix'];
453
  }
454
  }
455
  //Polyglot compatibility filter
2
  /*
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.0
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
+ $bcn_version = "2.1.0";
27
  //The main class
28
  class bcn_breadcrumb
29
  {
30
  var $opt;
31
+ var $breadcrumb;
32
  //Class Constructor
33
  function bcn_breadcrumb()
34
  {
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.
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
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(!is_home() && ($this->opt['static_frontpage'] === 'true' || get_option('page_on_front')) && $this->opt['home_display'] === 'true')
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
153
  {
154
+ //Should we display the home link or not
155
+ if($this->opt['home_link'])
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
156
  {
157
+ //If so, let's set it up
158
+ $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>';
 
 
 
 
159
  }
160
  else
161
  {
162
+ //Otherwise just the specified 'title_home' will do
163
+ $this->breadcrumb['title'] = $this->opt['title_home'];
164
  }
165
  }
166
+ //If it's paged, we'll want to link it to the first page
167
+ else if(is_paged() && $this->opt['paged_display'] === 'true')
168
  {
169
+ $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>';
170
  }
171
+ //Non-static front page, if link current item is off
172
+ else if($this->opt['link_current_item'] === 'false')
 
 
 
173
  {
174
+ $this->breadcrumb['title'] = $this->opt['title_blog'];
 
 
 
 
 
 
175
  }
176
+ else
 
 
177
  {
178
+ $this->breadcrumb['title'] = '<a title="' . $this->opt['current_item_urltitle'] . '" href="' . get_option('home') . '" >' . $this->opt['title_blog'] . '</a>';
 
 
 
 
 
 
 
 
 
 
 
 
 
179
  }
180
+ }
181
+ //Handle search pages
182
+ function do_search()
183
+ {
184
+ Global $s;
185
+ //Get the search prefix
186
+ $this->breadcrumb['last']['prefix'] = $this->opt['search_prefix'];
187
+ //Get the searched text
188
+ $this->breadcrumb['last']['item'] = wp_specialchars($s, 1);
189
+ //Get the search suffix
190
+ $this->breadcrumb['last']['suffix'] = $this->opt['search_suffix'];
191
+ }
192
+ //Handle "static" pages
193
+ function do_page()
194
+ {
195
+ global $post;
196
+ //Get the post title, this is a more robust method than using $post
197
+ $bcn_page_title = trim(wp_title('', false));
198
+ $bcn_parent_id = $post->post_parent;
199
+ $bcn_middle = array();
200
+ if($bcn_parent_id != 0)
201
  {
202
+ //Fill the initial page
203
+ //Use WordPress API, though a bit heavier than the old method, this will ensure compatibility with other plug-ins
204
+ $bcn_parent = get_post($bcn_parent_id);
205
+ $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>';
206
+ $bcn_parent_id = $bcn_parent->post_parent;
207
+ while(is_numeric($bcn_parent_id) && $bcn_parent_id != 0)
208
  {
 
 
209
  $bcn_parent = get_post($bcn_parent_id);
210
+ //Pushback a page into the array
211
  $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>';
212
+ $bcn_parent_id = $bcn_parent->post_parent;
 
 
 
 
 
 
 
 
213
  }
214
+ krsort($bcn_middle);
215
+ }
216
+ //Check to advoid Home > Home condition, has quick fallout for non-static conditions
217
+ if(get_option('page_on_front') == 0 || !$this->opt['static_frontpage'] || (strtolower($bcn_page_title) != strtolower($this->opt['title_home'])))
218
+ {
219
+ $this->breadcrumb['middle'] = $bcn_middle;
220
+ $this->breadcrumb['last']['prefix'] = $this->opt['page_prefix'];
221
+ $this->breadcrumb['last']['item'] = $bcn_page_title;
222
+ $this->breadcrumb['last']['suffix'] = $this->opt['page_suffix'];
223
+ }
224
+ }
225
+ //Handle attachment pages
226
+ function do_attachment()
227
+ {
228
+ global $post;
229
+ //Blog link and parent page
230
+ $bcn_parent_id = $post->post_parent;
231
+ //Get the parent information
232
+ $bcn_parent = get_post($bcn_parent_id);
233
+ //If the parent is a page we treat attachments like pages
234
+ if($bcn_parent->post_type == "page")
235
+ {
236
+ $this->do_page();
237
+ }
238
+ //Otherwise we treat them like attachments
239
+ else
240
+ {
241
+ //Setup the attachment's parent link
242
+ $bcn_parents = '<a title="' . $this->opt['urltitle_prefix'] .
243
+ $bcn_parent->post_title . $this->opt['urltitle_suffix'] . '" href="' . get_permalink($bcn_parent_id) . '">' . $bcn_parent->post_title . '</a>';
244
+ $this->breadcrumb['middle'] = $bcn_parents;
245
+ //Attachment prefix text
246
+ $this->breadcrumb['last']['prefix'] = $this->opt['attachment_prefix'];
247
+ //Get attachment name
248
+ $this->breadcrumb['last']['item'] = trim(wp_title('', false));
249
+ //Attachment suffix text
250
+ $this->breadcrumb['last']['suffix'] = $this->opt['attachment_suffix'];
251
+ }
252
+ }
253
+ //Figure out the categories leading up to the post
254
+ function single_categories()
255
+ {
256
+ global $post;
257
+ $this->breadcrumb['middle'] = array();
258
+ //Fills the object to get
259
+ $bcn_object = get_the_category();
260
+ //Now find which one has a parrent, pick the first one that does
261
+ $i = 0;
262
+ $bcn_use_category = 0;
263
+ foreach($bcn_object as $object)
264
+ {
265
+ if(is_numeric($object->category_parent) && $bcn_use_category == 0)
266
  {
267
+ $bcn_use_category = $i;
 
 
 
268
  }
269
+ $i++;
270
  }
271
+ //Get parents of current category
272
+ $bcn_category = $bcn_object[$bcn_use_category];
273
+ //Fill the initial category
274
+ $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'];
275
+ $bcn_parent_id = $bcn_category->category_parent;
276
+ while($bcn_parent_id)
277
+ {
278
+ $bcn_category = get_category($bcn_parent_id);
279
+ //Pushback a category into the array
280
+ $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'];
281
+ $bcn_parent_id = $bcn_category->category_parent;
282
+ }
283
+ //We need to reverse the order (by key) to get the proper output
284
+ krsort($this->breadcrumb['middle']);
285
+ }
286
+ //Figure out the tags leading up to the post
287
+ function single_tags()
288
+ {
289
+ global $post;
290
+ //Fills the object with the tags for the post
291
+ $bcn_object = get_the_tags($post->ID);
292
+ $i = 0;
293
+ //Only process if we have tags
294
+ if(is_array($bcn_object))
295
  {
296
+ foreach($bcn_object as $tag)
297
+ {
298
+ //On the first run we don't need a separator
299
+ if($i == 0)
 
 
 
 
 
 
 
 
300
  {
301
+ $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'];
302
+ $i = 2;
 
 
 
303
  }
304
+ else
 
 
 
 
 
305
  {
306
+ $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'];
307
+
 
 
308
  }
 
 
309
  }
310
+ }
311
+ else
312
+ {
313
+ $bcn_tags = "Untaged";
314
+ }
315
+ $this->breadcrumb['middle'] = $bcn_tags;
316
+ }
317
+ //Handle single posts
318
+ function do_post()
319
+ {
320
+ global $post;
321
+ //Get the post title, this is a more robust method than using $post
322
+ $bcn_post_title = trim(wp_title('', false));
323
+ //Add categories if told to
324
+ if($this->opt['singleblogpost_taxonomy_display'] === 'true')
325
+ {
326
+ //If we're supposed to do tag hiearchy do that instead of category
327
+ if($this->opt['singleblogpost_taxonomy'] == 'tag')
328
+ {
329
+ $this->single_tags();
330
+ }
331
+ else
332
  {
333
+ $this->single_categories();
334
  }
 
 
 
 
 
335
  }
336
+ //Trim post title if needed
337
+ if($this->opt['posttitle_maxlen'] > 0 && (strlen($bcn_post_title) + 3) > $this->opt['posttitle_maxlen'])
 
338
  {
339
+ $bcn_post_title2 = substr($bcn_post_title, 0, $this->opt['posttitle_maxlen']-1);
340
+ $bcn_count = $this->opt['posttitle_maxlen'];
341
+ //Make sure we can split at a space
342
+ if(strpos($bcn_post_title, " ") > $this->opt['posttitle_maxlen'] / 4)
 
 
 
 
343
  {
344
+ //Don't split mid word
345
+ while(substr($bcn_post_title,-1) != " ")
346
+ {
347
+ $bcn_post_title = substr($bcn_post_title, 0, -1);
348
+ }
349
  }
350
+ //remove the whitespace at the end and add the hellip
351
+ $bcn_post_title = rtrim($bcn_post_title) . '&hellip;';
352
  }
353
+ //Place it all in the array
354
+ $this->breadcrumb['last']['prefix'] = $this->opt['singleblogpost_prefix'];
355
+ $this->breadcrumb['last']['item'] = $bcn_post_title;
356
+ $this->breadcrumb['last']['suffix'] = $this->opt['singleblogpost_suffix'];
357
+ }
358
+ //Handle author pages
359
+ function do_author()
360
+ {
361
+ //Author prefix text
362
+ $this->breadcrumb['last']['prefix'] = $this->opt['author_prefix'];
363
+ //Get the Author name, note it is an array
364
+ $bcn_curauth = (get_query_var('author_name')) ? get_userdatabylogin(get_query_var('author_name')) : get_userdata(get_query_var('author'));
365
+ //Get the Author display type
366
+ $bcn_authdisp = $this->opt['author_display'];
367
+ //Make sure user picks only safe values
368
+ if($bcn_authdisp == 'nickname' || $bcn_authdisp == 'nickname' || $bcn_authdisp == 'first_name' || $bcn_authdisp == 'last_name' || $bcn_authdisp == 'display_name')
369
+ {
370
+ $this->breadcrumb['last']['item'] = $bcn_curauth->$bcn_authdisp;
371
+ }
372
+ $this->breadcrumb['last']['suffix'] = $this->opt['author_suffix'];
373
+ }
374
+ //Handle category based archives
375
+ function do_archive_by_category()
376
+ {
377
+ global $wp_query;
378
+ //Simmilar to using $post, but for things $post doesn't cover
379
+ $bcn_object = $wp_query->get_queried_object();
380
+ //Get parents of current category
381
+ $bcn_parent_id = $bcn_object->category_parent;
382
+ $cat_breadcrumbs = '';
383
+ while($bcn_parent_id)
384
+ {
385
+ $bcn_category = get_category($bcn_parent_id);
386
+ $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;
387
+ $bcn_parent_id = $bcn_category->category_parent;
388
+ }
389
+ //New hiearchy dictates that cateories look like parent pages, and thus
390
+ $this->breadcrumb['last']['prefix'] = $cat_breadcrumbs;
391
+ $this->breadcrumb['last']['prefix'] .= $this->opt['archive_category_prefix'];
392
+ //Current Category, uses WP API to get the title of the page, hopefully itis more robust than the old method
393
+ $this->breadcrumb['last']['item'] = trim(wp_title('', false));
394
+ $this->breadcrumb['last']['suffix'] = $this->opt['archive_category_suffix'];
395
+ }
396
+ //Handle date based archives
397
+ function do_archive_by_date()
398
+ {
399
+ //If it's archives by day
400
+ if(is_day())
401
  {
402
+ //If the date format is US style
403
+ if($this->opt['archive_date_format'] == 'US')
 
 
 
 
404
  {
405
+ $this->breadcrumb['last']['prefix'] = $this->opt['archive_date_prefix'];
406
+ $this->breadcrumb['last']['item'] = '<a title="Browse to the ' .
407
+ get_the_time('F') . ' ' . get_the_time('Y') . ' archive" href="' .
408
+ get_year_link(get_the_time('Y')) . get_the_time('m') . '">' .
409
+ get_the_time('F') . '</a>' . ' ' . get_the_time('jS') . ', ' .
410
+ ' <a title="Browse to the ' . get_the_time('Y') . ' archive" href="' .
411
+ get_year_link(get_the_time('Y')) . '">' . get_the_time('Y') . '</a>';
412
+ $this->breadcrumb['last']['suffix'] = $this->opt['archive_date_suffix'];
413
  }
414
+ //If the date format is ISO style
415
+ else if($this->opt['archive_date_format'] == 'ISO')
416
+ {
417
+ $this->breadcrumb['last']['prefix'] = $this->opt['archive_date_prefix'];
418
+ $this->breadcrumb['last']['item'] = ' <a title="Browse to the ' .
419
+ get_the_time('Y') . ' archive" href="' . get_year_link(get_the_time('Y')) .
420
+ '">' . get_the_time('Y') . '</a> <a title="Browse to the ' .
421
+ get_the_time('F') . ' ' . get_the_time('Y') . ' archive" href="' .
422
+ get_year_link(get_the_time('Y')) . get_the_time('m') . '">' .
423
+ get_the_time('F') . '</a>' . ' ' . get_the_time('d');
424
+ $this->breadcrumb['last']['suffix'] = $this->opt['archive_date_suffix'];
425
+ }
426
+ //If the date format is European style
427
+ else
428
+ {
429
+ $this->breadcrumb['last']['prefix'] = $this->opt['archive_date_prefix'];
430
+ $this->breadcrumb['last']['item'] = get_the_time('d') . ' ' .
431
+ '<a title="Browse to the ' . get_the_time('F') . ' ' . get_the_time('Y') .
432
+ ' archive" href="' . get_year_link(get_the_time('Y')) . get_the_time('m') .
433
+ '">' . get_the_time('F') . '</a>' . ' <a title="Browse to the ' .
434
+ get_the_time('Y') . ' archive" href="' . get_year_link(get_the_time('Y')) .
435
+ '">' . get_the_time('Y') . '</a>';
436
+ $this->breadcrumb['last']['suffix'] = $this->opt['archive_date_suffix'];
437
+ }
438
+ }
439
+ //If it's archives by month
440
+ else if(is_month())
441
+ {
442
+ $this->breadcrumb['last']['prefix'] = $this->opt['archive_date_prefix'];
443
+ $this->breadcrumb['last']['item'] = get_the_time('F') . ' ' . '<a title="Browse to the ' .
444
+ get_the_time('Y') . ' archive" href="' . get_year_link(get_the_time('Y')) . '">' .
445
+ get_the_time('Y') . '</a>';
446
+ $this->breadcrumb['last']['suffix'] = $this->opt['archive_date_suffix'];
447
+ }
448
+ //If it's archives by year
449
+ else if(is_year())
450
+ {
451
+ $this->breadcrumb['last']['prefix'] = $this->opt['archive_date_prefix'];
452
+ $this->breadcrumb['last']['item'] = get_the_time('Y');
453
+ $this->breadcrumb['last']['suffix'] = $this->opt['archive_date_suffix'];
454
  }
455
+ }
456
+ //Handle tag based archives
457
+ function do_archive_by_tag()
458
+ {
459
+ $this->breadcrumb['last']['prefix'] = $this->opt['archive_tag_prefix'];
460
+ //Use the WordPress API for the page title, should hook better than the other method
461
+ $this->breadcrumb['last']['item'] = trim(wp_title('', false));
462
+ $this->breadcrumb['last']['suffix'] = $this->opt['archive_tag_suffix'];
463
+ }
464
+ //Handled paged items
465
+ function do_paged()
466
+ {
467
+ //For home pages
468
+ if(is_home())
469
+ {
470
+ $this->breadcrumb['title'] .= $this->opt['paged_prefix'] . $paged . $this->opt['paged_suffix'];
471
+ }
472
+ //For archive/search pages
473
+ else
474
+ {
475
+ $this->breadcrumb['last']['suffix'] .= $this->opt['paged_prefix'] . $paged . $this->opt['paged_suffix'];
476
+ }
477
+ }
478
+ //This function assembles the breadcrumb for the current page
479
+ function assemble()
480
+ {
481
+ global $wpdb, $post, $wp_query, $bcn_version, $paged;
482
  ////////////////////////////////////
483
+ //Do specific opperations for the various page types
484
+ ////////////////////////////////////
485
+ //For the home/front page
486
+ if(is_front_page())
487
  {
488
+ $this->do_home();
489
+ }
490
+ //Otherwise we dosomething slightly different
491
+ else
492
+ {
493
+ if($this->opt['static_frontpage'] === 'true')
494
  {
495
+ //Single posts, archives of all types, and the author pages are descendents of "blog"
496
+ if(is_single() || is_archive() || is_author() || (is_home() && $this->opt['link_current_item'] === 'true'))
497
  {
498
+ $this->breadcrumb['title'] = array();
499
+ $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>';
500
+ $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>';
 
 
 
 
 
501
  }
502
+ //If its on the blog page but we don't link current
503
+ else if(is_home())
504
  {
505
+ $this->breadcrumb['title'] = array();
506
+ $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>';
507
+ $this->breadcrumb['title'][] = $this->opt['title_blog'];
 
 
 
 
 
508
  }
 
509
  else
510
  {
511
+ $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>';
 
 
 
 
 
 
 
512
  }
513
  }
514
+ else
 
 
 
 
 
 
 
 
 
 
515
  {
516
+ $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>';
 
 
517
  }
518
  }
519
+ //For searches
520
+ if(is_search())
521
+ {
522
+ $this->do_search();
523
+ }
524
+ ////////////////////////////////////
525
+ //For pages
526
+ else if(is_page())
527
+ {
528
+ $this->do_page();
529
+ }
530
+ ////////////////////////////////////
531
+ //For post/page attachments
532
+ else if(is_attachment())
533
+ {
534
+ $this->do_attachment();
535
+ }
536
+ ////////////////////////////////////
537
+ //For blog posts
538
+ else if(is_single())
539
+ {
540
+ $this->do_post();
541
+ }
542
+ ////////////////////////////////////
543
+ //For author pages
544
+ else if(is_author())
545
+ {
546
+ $this->do_author();
547
+ }
548
+ ////////////////////////////////////
549
+ //For category based archives
550
+ else if(is_archive() && is_category())
551
+ {
552
+ $this->do_archive_by_category();
553
+ }
554
+ ////////////////////////////////////
555
+ //For date based archives
556
+ else if(is_archive() && is_date())
557
+ {
558
+ $this->do_archive_by_date();
559
+ }
560
  ////////////////////////////////////
561
  //For tag based archives
562
  else if(is_archive() && is_tag())
563
  {
564
+ $this->do_archive_by_tag();
 
 
 
565
  }
566
  ////////////////////////////////////
567
  //For 404 pages
568
  else if(is_404())
569
  {
570
+ $this->breadcrumb['last']['item'] = $this->opt['title_404'];
571
  }
572
  ////////////////////////////////////
573
  //For paged items
574
  if(is_paged() && $this->opt['paged_display'] === 'true')
575
  {
576
+ $this->do_paged();
 
 
 
 
 
 
 
 
 
577
  }
578
+ }
579
+ //Breadcrumb Creation Function
580
+ function display($bcn_return = false)
581
+ {
582
+ global $bcn_version;
583
  ////////////////////////////////////
584
  //Assemble the breadcrumb
585
  $bcn_output = '';
586
+ if($this->breadcrumb['title'])
587
  {
588
+ if(is_array($this->breadcrumb['title']))
589
+ {
590
+ //If the title is an array we only allow two entries, so manually unrolling the loop is ok here
591
+ //Should end up containing 'home'
592
+ $bcn_output .= $this->breadcrumb['title'][0];
593
+ //Should end up displaying 'blog'
594
+ $bcn_output .= $this->opt['separator'] . $this->breadcrumb['title'][1];
595
+ }
596
+ else
597
+ {
598
+ $bcn_output .= $this->breadcrumb['title'];
599
+ }
600
+ if(is_array($this->breadcrumb['middle']))
601
  {
602
+ foreach($this->breadcrumb['middle'] as $bcn_mitem)
603
  {
604
  $bcn_output .= $this->opt['separator'] . $bcn_mitem;
605
  }
606
  }
607
+ else if($this->breadcrumb['middle'])
608
  {
609
+ $bcn_output .= $this->opt['separator'] . $this->breadcrumb['middle'];
610
  }
611
+ if($this->breadcrumb['last']['item'] != NULL)
612
  {
613
  if($this->opt['link_current_item'] === 'true')
614
  {
615
+ $this->breadcrumb['last']['item'] = '<a title="' . $this->opt['current_item_urltitle'] . '" href="' . $_SERVER['REQUEST_URI'] . '">' . $this->breadcrumb['last']['item'] . '</a>';
616
  }
617
+ $bcn_output .= $this->opt['separator'] . $this->opt['current_item_style_prefix'] . $this->breadcrumb['last']['prefix'] . $this->breadcrumb['last']['item'] . $this->breadcrumb['last']['suffix'] . $this->opt['current_item_style_suffix'];
618
  }
619
  }
620
  //Polyglot compatibility filter
readme.txt CHANGED
@@ -1,9 +1,9 @@
1
  === Breadcrumb NavXT ===
2
  Contributors: mtekk, hakre
3
  Tags: breadcrumb, navigation
4
- Requires at least: 2.3.0
5
- Tested up to: 2.5-RC1.1
6
- Stable tag: 2.0.4
7
 
8
  Adds breadcrumb navigation showing the visitor's path to their current location.
9
 
1
  === Breadcrumb NavXT ===
2
  Contributors: mtekk, hakre
3
  Tags: breadcrumb, navigation
4
+ Requires at least: 2.5.0
5
+ Tested up to: 2.5
6
+ Stable tag: 2.1.0
7
 
8
  Adds breadcrumb navigation showing the visitor's path to their current location.
9