WP Realtime Sitemap - Version 1.2

Version Description

  • Updated code, added settings, support and donate link.
  • Fixed display bug.
Download this release

Release Info

Developer Rincewind
Plugin Icon wp plugin WP Realtime Sitemap
Version 1.2
Comparing to
See all releases

Code changes from version 1.1 to 1.2

Files changed (3) hide show
  1. readme.txt +9 -0
  2. uninstall.php +10 -0
  3. wp-realtime-sitemap.php +966 -907
readme.txt CHANGED
@@ -44,9 +44,18 @@ You can if do this put this php code in the php file you wish to have the sitema
44
 
45
  == Changelog ==
46
 
 
 
 
 
47
  = 1.1 =
48
  * Optionally show categories and tags as a bullet list, or as a tag cloud.
49
  * Hierarchical list of pages.
50
 
51
  = 1.0 =
52
  * First version.
 
 
 
 
 
44
 
45
  == Changelog ==
46
 
47
+ = 1.2 =
48
+ * Updated code, added settings, support and donate link.
49
+ * Fixed display bug.
50
+
51
  = 1.1 =
52
  * Optionally show categories and tags as a bullet list, or as a tag cloud.
53
  * Hierarchical list of pages.
54
 
55
  = 1.0 =
56
  * First version.
57
+
58
+ == Upgrade Notice ==
59
+
60
+ = 1.1 =
61
+ Before upgrading you MUST delete the old plugin from your wordpress installation, BEFORE installing the new version! I changed the name of some of the variables stored in the database.
uninstall.php CHANGED
@@ -3,6 +3,16 @@
3
  if (!defined('ABSPATH') && !defined('WP_UNINSTALL_PLUGIN'))
4
  exit();
5
 
 
 
 
 
 
 
 
 
 
 
6
  delete_option('wp_realtime_sitemap_orderby');
7
  delete_option('wp_realtime_sitemap_showprivate');
8
  delete_option('wp_realtime_sitemap_showpages');
3
  if (!defined('ABSPATH') && !defined('WP_UNINSTALL_PLUGIN'))
4
  exit();
5
 
6
+ // v1.0
7
+ delete_option('wp_realtime_sitemap_orderby');
8
+ delete_option('wp_realtime_sitemap_private');
9
+ delete_option('wp_realtime_sitemap_pages');
10
+ delete_option('wp_realtime_sitemap_posts');
11
+ delete_option('wp_realtime_sitemap_tags');
12
+ delete_option('wp_realtime_sitemap_archives');
13
+ delete_option('wp_realtime_sitemap_displayorder');
14
+
15
+ // v1.1
16
  delete_option('wp_realtime_sitemap_orderby');
17
  delete_option('wp_realtime_sitemap_showprivate');
18
  delete_option('wp_realtime_sitemap_showpages');
wp-realtime-sitemap.php CHANGED
@@ -1,908 +1,967 @@
1
- <?php
2
- /*
3
- Plugin Name: WP Realtime Sitemap
4
- Plugin URI: http://www.daniel-tweedy.co.uk/article/wp-realtime-sitemap-plugin/
5
- Description: Adds a sitemap to your Wordpress blog that is always up-to-date. Add <!--wp-realtime-sitemap--> to any page or post and the site map will be added there. Use Options->WP Realtime Sitemap to set options.
6
- Author: Daniel Tweedy
7
- Version: 1.1
8
- Author URI: http://www.daniel-tweedy.co.uk/
9
- */
10
-
11
- /*
12
- WP Realtime Sitemap is a Wordpress Plugin that will create a list of posts, pages, tags, archives from your Wordpress Blog.
13
- Copyright (C) 2010 Daniel Tweedy
14
-
15
- This program is free software; you can redistribute it and/or
16
- modify it under the terms of the GNU General Public License
17
- as published by the Free Software Foundation; either version 2
18
- of the License, or (at your option) any later version.
19
-
20
- This program is distributed in the hope that it will be useful,
21
- but WITHOUT ANY WARRANTY; without even the implied warranty of
22
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23
- GNU General Public License for more details.
24
-
25
- You should have received a copy of the GNU General Public License
26
- along with this program; if not, write to the Free Software
27
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
28
- */
29
-
30
- function remove_style(&$item, $key) {
31
- $item = preg_replace('/ style=\'font-size: .*;\'/', '', $item);
32
- }
33
-
34
- // To replace the <!--wp-realtime-sitemap--> with the actual sitemap
35
- function wp_realtime_sitemap($text) {
36
- global $wpdb, $table_prefix;
37
-
38
- // Only perform plugin functionality if post/page text has <!--wp-realtime-sitemap-->|
39
- if (preg_match('|<!--wp-realtime-sitemap-->|', $text)) {
40
-
41
- // Get option values
42
- $orderby = get_option('wp_realtime_sitemap_orderby');
43
- $showprivate = get_option('wp_realtime_sitemap_showprivate');
44
- $showpages = get_option('wp_realtime_sitemap_showpages');
45
- $showposts = get_option('wp_realtime_sitemap_showposts');
46
- $showarchives = get_option('wp_realtime_sitemap_showarchives');
47
- $showcategories = get_option('wp_realtime_sitemap_showcategories');
48
- $showcategoriesastc = get_option('wp_realtime_sitemap_showcategoriesastc');
49
- $showtags = get_option('wp_realtime_sitemap_showtags');
50
- $showtagsastc = get_option('wp_realtime_sitemap_showtagsastc');
51
- $displayorder = get_option('wp_realtime_sitemap_displayorder');
52
-
53
- // Do order by
54
- switch ($orderby) {
55
- case 'datedesc':
56
- $sqlorder = 'ORDER BY `post_date` DESC';
57
- break;
58
- case 'dateasc':
59
- $sqlorder = 'ORDER BY `post_date`';
60
- break;
61
- case 'alphadesc':
62
- $sqlorder = 'ORDER BY `post_title` DESC';
63
- break;
64
- case 'alphaasc':
65
- $sqlorder = 'ORDER BY `post_title`';
66
- break;
67
- }
68
-
69
- // Pages: Yes/No?
70
- if ($showpages != 'no') {
71
- if ($orderby == 'datedesc' || $orderby == 'dateasc')
72
- $sort_column = 'post_date';
73
-
74
- if ($orderby == 'alphadesc' || $orderby == 'alphaasc')
75
- $sort_column = 'post_title';
76
-
77
- if ($orderby == 'datedesc' || $orderby == 'alphadesc')
78
- $sort_order = 'DESC';
79
-
80
- if ($orderby == 'dateasc' || $orderby == 'alphaasc')
81
- $sort_order = 'ASC';
82
-
83
- $pages = '<h3>Pages</h3>';
84
- $pages .= '<ul>' . wp_list_pages(array('sort_column' => $sort_column, 'sort_order' => $sort_order, 'title_li' => '', 'echo' => '0')) . '</ul>';
85
- }
86
-
87
- // Posts: Yes/No?
88
- if ($showposts != 'no') {
89
- // Show private: Yes/No?
90
- if ($showprivate == 'yes') {
91
- $sqlwhere = 'WHERE `post_type`="post" ';
92
- } else {
93
- $sqlwhere = 'WHERE `post_type`="post" AND `post_status`="publish" ';
94
- }
95
-
96
- $sqlposts = 'SELECT * FROM `' . $table_prefix . 'posts` ' . $sqlwhere . $sqlorder;
97
- $allposts = $wpdb->get_results($sqlposts);
98
-
99
- if (count($allposts) == 0) {
100
- $posts = '';
101
- } else {
102
- $posts = '<h3>Posts</h3><ul>';
103
-
104
- foreach($allposts as $thepost) {
105
- $permalink = get_permalink($thepost->ID);
106
- $posts .= '<li><a href="' . $permalink . '">' . $thepost->post_title . '</a></li>';
107
- }
108
-
109
- $posts .= '</ul>';
110
- }
111
- }
112
-
113
- if ($showarchives != 'no') {
114
- $archives = '<h3>Archives</h3><ul>' . wp_get_archives('type=monthly&echo=0') . '</ul>';
115
- }
116
-
117
- if ($showcategories != 'no') {
118
- $categories = '<h3>Categories</h3>';
119
-
120
- if ($showcategoriesastc != 'no') {
121
- $categories .= wp_tag_cloud(array('format' => 'flat', 'separator' => ' ', 'taxonomy' => 'category', 'echo' => '0'));
122
- } else {
123
- $categories .= preg_replace('/ style=\'font-size: .*;\'/', '', wp_tag_cloud(array('format' => 'list', 'taxonomy' => 'category', 'echo' => '0')));
124
- }
125
- }
126
-
127
- if ($showtags != 'no') {
128
- $tags = '<h3>Tags</h3>';
129
-
130
- if ($showtagsastc != 'no') {
131
- $tags .= wp_tag_cloud(array('format' => 'flat', 'separator' => ' ', 'echo' => '0'));
132
- } else {
133
- $tags .= preg_replace('/ style=\'font-size: .*;\'/', '', wp_tag_cloud(array('format' => 'list', 'echo' => '0')));
134
- }
135
- }
136
-
137
- // 1: Pages, Posts, Archives, Categories, Tags
138
- if ($displayorder == 1)
139
- $data = $pages . $posts . $archives . $categories . $tags;
140
-
141
- // 2: Pages, Posts, Archives, Tags, Categories
142
- if ($displayorder == 2)
143
- $data = $pages . $posts . $archives . $tags . $categories;
144
-
145
- // 3: Pages, Posts, Categories, Archives, Tags
146
- if ($displayorder == 3)
147
- $data = $pages . $posts . $categories . $archives . $tags;
148
-
149
- // 4: Pages, Posts, Categories, Tags, Archives
150
- if ($displayorder == 4)
151
- $data = $pages . $posts . $categories . $tags . $archives;
152
-
153
- // 5: Pages, Posts, Tags, Archives, Categories
154
- if ($displayorder == 5)
155
- $data = $pages . $posts . $tags . $archives . $categories;
156
-
157
- // 6: Pages, Posts, Tags, Categories, Archives
158
- if ($displayorder == 6)
159
- $data = $pages . $posts . $tags . $categories . $archives;
160
-
161
- // 7: Pages, Archives, Posts, Categories, Tags
162
- if ($displayorder == 7)
163
- $data = $pages . $archives . $posts . $categories . $tags;
164
-
165
- // 8: Pages, Archives, Posts, Tags, Categories
166
- if ($displayorder == 8)
167
- $data = $pages . $archives . $posts . $tags . $categories;
168
-
169
- // 9: Pages, Archives, Categories, Posts, Tags
170
- if ($displayorder == 9)
171
- $data = $pages . $archives . $categories . $posts . $tags;
172
-
173
- // 10: Pages, Archives, Categories, Tags, Posts
174
- if ($displayorder == 10)
175
- $data = $pages . $archives . $categories . $tags . $posts;
176
-
177
- // 11: Pages, Archives, Tags, Posts, Categories
178
- if ($displayorder == 11)
179
- $data = $pages . $archives . $tags . $posts . $categories;
180
-
181
- // 12: Pages, Archives, Tags, Categories, Posts
182
- if ($displayorder == 12)
183
- $data = $pages . $archives . $tags . $categories . $posts;
184
-
185
- // 13: Pages, Categories, Posts, Archives, Tags
186
- if ($displayorder == 13)
187
- $data = $pages . $categories . $posts . $archives . $tags;
188
-
189
- // 14: Pages, Categories, Posts, Tags, Archives
190
- if ($displayorder == 14)
191
- $data = $pages . $categories . $posts . $tags . $archives;
192
-
193
- // 15: Pages, Categories, Archives, Posts, Tags
194
- if ($displayorder == 15)
195
- $data = $pages . $categories . $archives . $posts . $tags;
196
-
197
- // 16: Pages, Categories, Archives, Tags, Posts
198
- if ($displayorder == 16)
199
- $data = $pages . $categories . $archives . $tags . $posts;
200
-
201
- // 17: Pages, Categories, Tags, Posts, Archives
202
- if ($displayorder == 17)
203
- $data = $pages . $categories . $tags . $posts . $archives;
204
-
205
- // 18: Pages, Categories, Tags, Archives, Posts
206
- if ($displayorder == 18)
207
- $data = $pages . $categories . $tags . $archives . $posts;
208
-
209
- // 19: Pages, Tags, Posts, Archives, Categories
210
- if ($displayorder == 19)
211
- $data = $pages . $tags . $posts . $archives . $categories;
212
-
213
- // 20: Pages, Tags, Posts, Categories, Archives
214
- if ($displayorder == 20)
215
- $data = $pages . $tags . $posts . $categories . $archives;
216
-
217
- // 21: Pages, Tags, Archives, Posts, Categories
218
- if ($displayorder == 21)
219
- $data = $pages . $tags . $archives . $posts . $categories;
220
-
221
- // 22: Pages, Tags, Archives, Categories, Posts
222
- if ($displayorder == 22)
223
- $data = $pages . $tags . $archives . $categories . $posts;
224
-
225
- // 23: Pages, Tags, Categories, Posts, Archives
226
- if ($displayorder == 23)
227
- $data = $pages . $tags . $categories . $posts . $archives;
228
-
229
- // 24: Pages, Tags, Categories, Archives, Posts
230
- if ($displayorder == 24)
231
- $data = $pages . $tags . $categories . $archives . $posts;
232
-
233
- // 25: Posts, Pages, Archives, Categories, Tags
234
- if ($displayorder == 25)
235
- $data = $posts . $pages . $archives . $categories . $tags;
236
-
237
- // 26: Posts, Pages, Archives, Tags, Categories
238
- if ($displayorder == 26)
239
- $data = $posts . $pages . $archives . $tags . $categories;
240
-
241
- // 27: Posts, Pages, Categories, Archives, Tags
242
- if ($displayorder == 27)
243
- $data = $posts . $pages . $categories . $archives . $tags;
244
-
245
- // 28: Posts, Pages, Categories, Tags, Archives
246
- if ($displayorder == 28)
247
- $data = $posts . $pages . $categories . $tags . $archives;
248
-
249
- // 29: Posts, Pages, Tags, Archives, Categories
250
- if ($displayorder == 29)
251
- $data = $posts . $pages . $tags . $archives . $categories;
252
-
253
- // 30: Posts, Pages, Tags, Categories, Archives
254
- if ($displayorder == 30)
255
- $data = $posts . $pages . $tags . $categories . $archives;
256
-
257
- // 31: Posts, Archives, Pages, Categories, Tags
258
- if ($displayorder == 31)
259
- $data = $posts . $archives . $pages . $categories . $tags;
260
-
261
- // 32: Posts, Archives, Pages, Tags, Categories
262
- if ($displayorder == 32)
263
- $data = $posts . $archives . $pages . $tags . $categories;
264
-
265
- // 33: Posts, Archives, Categories, Pages, Tags
266
- if ($displayorder == 33)
267
- $data = $posts . $archives . $categories . $pages . $tags;
268
-
269
- // 34: Posts, Archives, Categories, Tags, Pages
270
- if ($displayorder == 34)
271
- $data = $posts . $archives . $categories . $tags . $pages;
272
-
273
- // 35: Posts, Archives, Tags, Pages, Categories
274
- if ($displayorder == 35)
275
- $data = $posts . $archives . $tags . $pages . $categories;
276
-
277
- // 36: Posts, Archives, Tags, Categories, Pages
278
- if ($displayorder == 36)
279
- $data = $posts . $archives . $tags . $categories . $pages;
280
-
281
- // 37: Posts, Categories, Pages, Archives, Tags
282
- if ($displayorder == 37)
283
- $data = $posts . $categories . $pages . $archives . $tags;
284
-
285
- // 38: Posts, Categories, Pages, Tags, Archives
286
- if ($displayorder == 38)
287
- $data = $posts . $categories . $pages . $tags . $archives;
288
-
289
- // 39: Posts, Categories, Archives, Pages, Tags
290
- if ($displayorder == 39)
291
- $data = $posts . $categories . $archives . $pages . $tags;
292
-
293
- // 40: Posts, Categories, Archives, Tags, Pages
294
- if ($displayorder == 40)
295
- $data = $posts . $categories . $archives . $tags . $pages;
296
-
297
- // 41: Posts, Categories, Tags, Pages, Archives
298
- if ($displayorder == 41)
299
- $data = $posts . $categories . $tags . $pages . $archives;
300
-
301
- // 42: Posts, Categories, Tags, Archives, Pages
302
- if ($displayorder == 42)
303
- $data = $posts . $categories . $tags . $archives . $pages;
304
-
305
- // 43: Posts, Tags, Pages, Archives, Categories
306
- if ($displayorder == 43)
307
- $data = $posts . $tags . $pages . $archives . $categories;
308
-
309
- // 44: Posts, Tags, Pages, Categories, Archives
310
- if ($displayorder == 44)
311
- $data = $posts . $tags . $pages . $categories . $archives;
312
-
313
- // 45: Posts, Tags, Archives, Pages, Categories
314
- if ($displayorder == 45)
315
- $data = $posts . $tags . $archives . $pages . $categories;
316
-
317
- // 46: Posts, Tags, Archives, Categories, Pages
318
- if ($displayorder == 46)
319
- $data = $posts . $tags . $archives . $categories . $pages;
320
-
321
- // 47: Posts, Tags, Categories, Pages, Archives
322
- if ($displayorder == 47)
323
- $data = $posts . $tags . $categories . $pages . $archives;
324
-
325
- // 48: Posts, Tags, Categories, Archives, Pages
326
- if ($displayorder == 48)
327
- $data = $posts . $tags . $categories . $archives . $pages;
328
-
329
- // 49: Archives, Pages, Posts, Categories, Tags
330
- if ($displayorder == 49)
331
- $data = $archives . $pages . $posts . $categories . $tags;
332
-
333
- // 50: Archives, Pages, Posts, Tags, Categories
334
- if ($displayorder == 50)
335
- $data = $archives . $pages . $posts . $tags . $categories;
336
-
337
- // 51: Archives, Pages, Categories, Posts, Tags
338
- if ($displayorder == 51)
339
- $data = $archives . $pages . $categories . $posts . $tags;
340
-
341
- // 52: Archives, Pages, Categories, Tags, Posts
342
- if ($displayorder == 52)
343
- $data = $archives . $pages . $categories . $tags . $posts;
344
-
345
- // 53: Archives, Pages, Tags, Posts, Categories
346
- if ($displayorder == 53)
347
- $data = $archives . $pages . $tags . $posts . $categories;
348
-
349
- // 54: Archives, Pages, Tags, Categories, Posts
350
- if ($displayorder == 54)
351
- $data = $archives . $pages . $tags . $categories . $posts;
352
-
353
- // 55: Archives, Posts, Pages, Categories, Tags
354
- if ($displayorder == 55)
355
- $data = $archives . $posts . $pages . $categories . $tags;
356
-
357
- // 56: Archives, Posts, Pages, Tags, Categories
358
- if ($displayorder == 56)
359
- $data = $archives . $posts . $pages . $tags . $categories;
360
-
361
- // 57: Archives, Posts, Categories, Pages, Tags
362
- if ($displayorder == 57)
363
- $data = $archives . $posts . $categories . $pages . $tags;
364
-
365
- // 58: Archives, Posts, Categories, Tags, Pages
366
- if ($displayorder == 58)
367
- $data = $archives . $posts . $categories . $tags . $pages;
368
-
369
- // 59: Archives, Posts, Tags, Pages, Categories
370
- if ($displayorder == 59)
371
- $data = $archives . $posts . $tags . $pages . $categories;
372
-
373
- // 60: Archives, Posts, Tags, Categories, Pages
374
- if ($displayorder == 60)
375
- $data = $archives . $posts . $tags . $categories . $pages;
376
-
377
- // 61: Archives, Categories, Pages, Posts, Tags
378
- if ($displayorder == 61)
379
- $data = $archives . $categories . $pages . $posts . $tags;
380
-
381
- // 62: Archives, Categories, Pages, Tags, Posts
382
- if ($displayorder == 62)
383
- $data = $archives . $categories . $pages . $tags . $posts;
384
-
385
- // 63: Archives, Categories, Posts, Pages, Tags
386
- if ($displayorder == 63)
387
- $data = $archives . $categories . $posts . $pages . $tags;
388
-
389
- // 64: Archives, Categories, Posts, Tags, Pages
390
- if ($displayorder == 64)
391
- $data = $archives . $categories . $posts . $tags . $pages;
392
-
393
- // 65: Archives, Categories, Tags, Pages, Posts
394
- if ($displayorder == 65)
395
- $data = $archives . $categories . $tags . $pages . $posts;
396
-
397
- // 66: Archives, Categories, Tags, Posts, Pages
398
- if ($displayorder == 66)
399
- $data = $archives . $categories . $tags . $posts . $pages;
400
-
401
- // 67: Archives, Tags, Pages, Posts, Categories
402
- if ($displayorder == 67)
403
- $data = $archives . $tags . $pages . $posts . $categories;
404
-
405
- // 68: Archives, Tags, Pages, Categories, Posts
406
- if ($displayorder == 68)
407
- $data = $archives . $tags . $pages . $categories . $posts;
408
-
409
- // 69: Archives, Tags, Posts, Pages, Categories
410
- if ($displayorder == 69)
411
- $data = $archives . $tags . $posts . $pages . $categories;
412
-
413
- // 70: Archives, Tags, Posts, Categories, Pages
414
- if ($displayorder == 70)
415
- $data = $archives . $tags . $posts . $categories . $pages;
416
-
417
- // 71: Archives, Tags, Categories, Pages, Posts
418
- if ($displayorder == 71)
419
- $data = $archives . $tags . $categories . $pages . $posts;
420
-
421
- // 72: Archives, Tags, Categories, Posts, Pages
422
- if ($displayorder == 72)
423
- $data = $archives . $tags . $categories . $posts . $pages;
424
-
425
- // 73: Categories, Pages, Posts, Archives, Tags
426
- if ($displayorder == 73)
427
- $data = $categories . $pages . $posts . $archives . $tags;
428
-
429
- // 74: Categories, Pages, Posts, Tags, Archives
430
- if ($displayorder == 74)
431
- $data = $categories . $pages . $posts . $tags . $archives;
432
-
433
- // 75: Categories, Pages, Archives, Posts, Tags
434
- if ($displayorder == 75)
435
- $data = $categories . $pages . $archives . $posts . $tags;
436
-
437
- // 76: Categories, Pages, Archives, Tags, Posts
438
- if ($displayorder == 76)
439
- $data = $categories . $pages . $archives . $tags . $posts;
440
-
441
- // 77: Categories, Pages, Tags, Posts, Archives
442
- if ($displayorder == 77)
443
- $data = $categories . $pages . $tags . $posts . $archives;
444
-
445
- // 78: Categories, Pages, Tags, Archives, Posts
446
- if ($displayorder == 78)
447
- $data = $categories . $pages . $tags . $archives . $posts;
448
-
449
- // 79: Categories, Posts, Pages, Archives, Tags
450
- if ($displayorder == 79)
451
- $data = $categories . $posts . $pages . $archives . $tags;
452
-
453
- // 80: Categories, Posts, Pages, Tags, Archives
454
- if ($displayorder == 80)
455
- $data = $categories . $posts . $pages . $tags . $archives;
456
-
457
- // 81: Categories, Posts, Archives, Pages, Tags
458
- if ($displayorder == 81)
459
- $data = $categories . $posts . $archives . $pages . $tags;
460
-
461
- // 82: Categories, Posts, Archives, Tags, Pages
462
- if ($displayorder == 82)
463
- $data = $categories . $posts . $archives . $tags . $pages;
464
-
465
- // 83: Categories, Posts, Tags, Pages, Archives
466
- if ($displayorder == 83)
467
- $data = $categories . $posts . $tags . $pages . $archives;
468
-
469
- // 84: Categories, Posts, Tags, Archives, Pages
470
- if ($displayorder == 84)
471
- $data = $categories . $posts . $tags . $archives . $pages;
472
-
473
- // 85: Categories, Archives, Pages, Posts, Tags
474
- if ($displayorder == 85)
475
- $data = $categories . $archives . $pages . $posts . $tags;
476
-
477
- // 86: Categories, Archives, Pages, Tags, Posts
478
- if ($displayorder == 86)
479
- $data = $categories . $archives . $pages . $tags . $posts;
480
-
481
- // 87: Categories, Archives, Posts, Pages, Tags
482
- if ($displayorder == 87)
483
- $data = $categories . $archives . $posts . $pages . $tags;
484
-
485
- // 88: Categories, Archives, Posts, Tags, Pages
486
- if ($displayorder == 88)
487
- $data = $categories . $archives . $posts . $tags . $pages;
488
-
489
- // 89: Categories, Archives, Tags, Pages, Posts
490
- if ($displayorder == 89)
491
- $data = $categories . $archives . $tags . $pages . $posts;
492
-
493
- // 90: Categories, Archives, Tags, Posts, Pages
494
- if ($displayorder == 90)
495
- $data = $categories . $archives . $tags . $posts . $pages;
496
-
497
- // 91: Categories, Tags, Pages, Posts, Archives
498
- if ($displayorder == 91)
499
- $data = $categories . $tags . $pages . $posts . $archives;
500
-
501
- // 92: Categories, Tags, Pages, Archives, Posts
502
- if ($displayorder == 92)
503
- $data = $categories . $tags . $pages . $archives . $posts;
504
-
505
- // 93: Categories, Tags, Posts, Pages, Archives
506
- if ($displayorder == 93)
507
- $data = $categories . $tags . $posts . $pages . $archives;
508
-
509
- // 94: Categories, Tags, Posts, Archives, Pages
510
- if ($displayorder == 94)
511
- $data = $categories . $tags . $posts . $archives . $pages;
512
-
513
- // 95: Categories, Tags, Archives, Pages, Posts
514
- if ($displayorder == 95)
515
- $data = $categories . $tags . $archives . $pages . $posts;
516
-
517
- // 96: Categories, Tags, Archives, Posts, Pages
518
- if ($displayorder == 96)
519
- $data = $categories . $tags . $archives . $posts . $pages;
520
-
521
- // 97: Tags, Pages, Posts, Archives, Categories
522
- if ($displayorder == 97)
523
- $data = $tags . $pages . $posts . $archives . $categories;
524
-
525
- // 98: Tags, Pages, Posts, Categories, Archives
526
- if ($displayorder == 98)
527
- $data = $tags . $pages . $posts . $categories . $archives;
528
-
529
- // 99: Tags, Pages, Archives, Posts, Categories
530
- if ($displayorder == 99)
531
- $data = $tags . $pages . $archives . $posts . $categories;
532
-
533
- // 100: Tags, Pages, Archives, Categories, Posts
534
- if ($displayorder == 100)
535
- $data = $tags . $pages . $archives . $categories . $posts;
536
-
537
- // 101: Tags, Pages, Categories, Posts, Archives
538
- if ($displayorder == 101)
539
- $data = $tags . $pages . $categories . $posts . $archives;
540
-
541
- // 102: Tags, Pages, Categories, Archives, Posts
542
- if ($displayorder == 102)
543
- $data = $tags . $pages . $categories . $archives . $posts;
544
-
545
- // 103: Tags, Posts, Pages, Archives, Categories
546
- if ($displayorder == 103)
547
- $data = $tags . $posts . $pages . $archives . $categories;
548
-
549
- // 104: Tags, Posts, Pages, Categories, Archives
550
- if ($displayorder == 104)
551
- $data = $tags . $posts . $pages . $categories . $archives;
552
-
553
- // 105: Tags, Posts, Archives, Pages, Categories
554
- if ($displayorder == 105)
555
- $data = $tags . $posts . $archives . $pages . $categories;
556
-
557
- // 106: Tags, Posts, Archives, Categories, Pages
558
- if ($displayorder == 106)
559
- $data = $tags . $posts . $archives . $categories . $pages;
560
-
561
- // 107: Tags, Posts, Categories, Pages, Archives
562
- if ($displayorder == 107)
563
- $data = $tags . $posts . $categories . $pages . $archives;
564
-
565
- // 108: Tags, Posts, Categories, Archives, Pages
566
- if ($displayorder == 108)
567
- $data = $tags . $posts . $categories . $archives . $pages;
568
-
569
- // 109: Tags, Archives, Pages, Posts, Categories
570
- if ($displayorder == 109)
571
- $data = $tags . $archives . $pages . $posts . $categories;
572
-
573
- // 110: Tags, Archives, Pages, Categories, Posts
574
- if ($displayorder == 110)
575
- $data = $tags . $archives . $pages . $categories . $posts;
576
-
577
- // 111: Tags, Archives, Posts, Pages, Categories
578
- if ($displayorder == 111)
579
- $data = $tags . $archives . $posts . $pages . $categories;
580
-
581
- // 112: Tags, Archives, Posts, Categories, Pages
582
- if ($displayorder == 112)
583
- $data = $tags . $archives . $posts . $categories . $pages;
584
-
585
- // 113: Tags, Archives, Categories, Pages, Posts
586
- if ($displayorder == 113)
587
- $data = $tags . $archives . $categories . $pages . $posts;
588
-
589
- // 114: Tags, Archives, Categories, Posts, Pages
590
- if ($displayorder == 114)
591
- $data = $tags . $archives . $categories . $posts . $pages;
592
-
593
- // 115: Tags, Categories, Pages, Posts, Archives
594
- if ($displayorder == 115)
595
- $data = $tags . $categories . $pages . $posts . $archives;
596
-
597
- // 116: Tags, Categories, Pages, Archives, Posts
598
- if ($displayorder == 116)
599
- $data = $tags . $categories . $pages . $archives . $posts;
600
-
601
- // 117: Tags, Categories, Posts, Pages, Archives
602
- if ($displayorder == 117)
603
- $data = $tags . $categories . $posts . $pages . $archives;
604
-
605
- // 118: Tags, Categories, Posts, Archives, Pages
606
- if ($displayorder == 118)
607
- $data = $tags . $categories . $posts . $archives . $pages;
608
-
609
- // 119: Tags, Categories, Archives, Pages, Posts
610
- if ($displayorder == 119)
611
- $data = $tags . $categories . $archives . $pages . $posts;
612
-
613
- // 120: Tags, Categories, Archives, Posts, Pages
614
- if ($displayorder == 120)
615
- $data = $tags . $categories . $archives . $posts . $pages;
616
-
617
- $text = preg_replace("|<!--wp-realtime-sitemap-->|", $data, $text);
618
- }
619
-
620
- return $text;
621
-
622
- } // End wp_realtime_sitemap()
623
-
624
- // Admin menu
625
- function wp_realtime_sitemap_showadmin() {
626
- if (function_exists('add_options_page')) {
627
- add_options_page('wp-realtime-sitemap', 'WP Realtime Sitemap', 1, basename(__FILE__), 'wp_realtime_sitemap_showadmin_panel');
628
- }
629
- }
630
-
631
- function wp_realtime_sitemap_showadmin_panel() {
632
-
633
- $orderby = get_option('wp_realtime_sitemap_orderby');
634
- $showprivate = get_option('wp_realtime_sitemap_showprivate');
635
- $showpages = get_option('wp_realtime_sitemap_showpages');
636
- $showposts = get_option('wp_realtime_sitemap_showposts');
637
- $showarchives = get_option('wp_realtime_sitemap_showarchives');
638
- $showcategories = get_option('wp_realtime_sitemap_showcategories');
639
- $showcategoriesastc = get_option('wp_realtime_sitemap_showcategoriesastc');
640
- $showtags = get_option('wp_realtime_sitemap_showtags');
641
- $showtagsastc = get_option('wp_realtime_sitemap_showtagsastc');
642
- $displayorder = get_option('wp_realtime_sitemap_displayorder');
643
-
644
- // Add options if first time running
645
- add_option('wp_realtime_sitemap_orderby', 'datedesc', 'WP Realtime Sitemap Plugin');
646
- add_option('wp_realtime_sitemap_showprivate', 'no', 'WP Realtime Sitemap Plugin');
647
- add_option('wp_realtime_sitemap_showpages', 'yes', 'WP Realtime Sitemap Plugin');
648
- add_option('wp_realtime_sitemap_showposts', 'yes', 'WP Realtime Sitemap Plugin');
649
- add_option('wp_realtime_sitemap_showarchives', 'yes', 'WP Realtime Sitemap Plugin');
650
- add_option('wp_realtime_sitemap_showcategories', 'yes', 'WP Realtime Sitemap Plugin');
651
- add_option('wp_realtime_sitemap_showcategoriesastc', 'no', 'WP Realtime Sitemap Plugin');
652
- add_option('wp_realtime_sitemap_showtags', 'yes', 'WP Realtime Sitemap Plugin');
653
- add_option('wp_realtime_sitemap_showtagsastc', 'no', 'WP Realtime Sitemap Plugin');
654
- add_option('wp_realtime_sitemap_displayorder', '1', 'WP Realtime Sitemap Plugin');
655
-
656
- // Get posted options
657
- $orderby = $_POST['orderby'];
658
-
659
- if (isset($_POST['info_update'])) {
660
- // Update settings
661
- $orderby = $_POST['orderby'];
662
- $showprivate = $_POST['showprivate'];
663
- $showpages = $_POST['showpages'];
664
- $showposts = $_POST['showposts'];
665
- $showarchives = $_POST['showarchives'];
666
- $showcategories = $_POST['showcategories'];
667
- $showcategoriesastc = $_POST['showcategoriesastc'];
668
- $showtags = $_POST['showtags'];
669
- $showtagsastc = $_POST['showtagsastc'];
670
- $displayorder = $_POST['displayorder'];
671
-
672
- update_option('wp_realtime_sitemap_orderby', $orderby);
673
- update_option('wp_realtime_sitemap_showprivate', $showprivate);
674
- update_option('wp_realtime_sitemap_showpages', $showpages);
675
- update_option('wp_realtime_sitemap_showposts', $showposts);
676
- update_option('wp_realtime_sitemap_showarchives', $showarchives);
677
- update_option('wp_realtime_sitemap_showcategories', $showcategories);
678
- update_option('wp_realtime_sitemap_showcategoriesastc', $showcategoriesastc);
679
- update_option('wp_realtime_sitemap_showtags', $showtags);
680
- update_option('wp_realtime_sitemap_showtagsastc', $showtagsastc);
681
- update_option('wp_realtime_sitemap_displayorder', $displayorder);
682
- } else {
683
- // Load settings from database
684
- $orderby = get_option('wp_realtime_sitemap_orderby');
685
- $showprivate = get_option('wp_realtime_sitemap_showprivate');
686
- $showpages = get_option('wp_realtime_sitemap_showpages');
687
- $showposts = get_option('wp_realtime_sitemap_showposts');
688
- $showarchives = get_option('wp_realtime_sitemap_showarchives');
689
- $showcategories = get_option('wp_realtime_sitemap_showcategories');
690
- $showcategoriesastc = get_option('wp_realtime_sitemap_showcategoriesastc');
691
- $showtags = get_option('wp_realtime_sitemap_showtags');
692
- $showtagsastc = get_option('wp_realtime_sitemap_showtagsastc');
693
- $displayorder = get_option('wp_realtime_sitemap_displayorder');
694
- }
695
-
696
- ?>
697
-
698
- <div class="wrap">
699
- <h2>WP Realtime Sitemap Options</h2>
700
-
701
- <form method="post">
702
-
703
- <table class="form-table">
704
- <tr valign="top">
705
- <th scope="row"><label for="orderby">Order Sitemap Pages/Posts By</label></th>
706
- <td><select name="orderby">
707
- <option <?php selected('datedesc', $orderby); ?> value="datedesc">Date descending (Default)</option>
708
- <option <?php selected('dateasc', $orderby); ?> value="dateasc">Date ascending</option>
709
- <option <?php selected('alphadesc', $orderby); ?> value="alphadesc">Alphabetical descending</option>
710
- <option <?php selected('alphaasc', $orderby); ?> value="alphaasc">Alphabetical ascending</option>
711
- </select></td>
712
- </tr>
713
- <tr valign="top">
714
- <th scope="row"><label for="showprivate">Show Private Pages/Posts</label></th>
715
- <td><select name="showprivate">
716
- <option value="no" <?php selected('no', $showprivate); ?>>No, leave hidden (Default)</option>
717
- <option value="yes" <?php selected('yes', $showprivate); ?>>Yes, show hidden</option>
718
- </select></td>
719
- </tr>
720
- <tr valign="top">
721
- <th scope="row"><label for="showpages">Show Pages</label></th>
722
- <td><select name="showpages">
723
- <option value="yes" <?php selected('yes', $showpages); ?>>Yes (Default)</option>
724
- <option value="no" <?php selected('no', $showpages); ?>>No</option>
725
- </select></td>
726
- </tr>
727
- <tr valign="top">
728
- <th scope="row"><label for="showposts">Show Posts</label></th>
729
- <td><select name="showposts">
730
- <option value="yes" <?php selected('yes', $showposts); ?>>Yes (Default)</option>
731
- <option value="no" <?php selected('no', $showposts); ?>>No</option>
732
- </select></td>
733
- </tr>
734
- <tr valign="top">
735
- <th scope="row"><label for="showarchives">Show Archives</label></th>
736
- <td><select name="showarchives">
737
- <option value="yes" <?php selected('yes', $showarchives); ?>>Yes (Default)</option>
738
- <option value="no" <?php selected('no', $showarchives); ?>>No</option>
739
- </select></td>
740
- </tr>
741
- <tr valign="top">
742
- <th scope="row"><label for="showcategories">Show Categories</label></th>
743
- <td><select name="showcategories">
744
- <option value="yes" <?php selected('yes', $showcategories); ?>>Yes (Default)</option>
745
- <option value="no" <?php selected('no', $showcategories); ?>>No</option>
746
- </select></td>
747
- </tr>
748
- <tr valign="top">
749
- <th scope="row"><label for="showcategoriesastc">Show Categories As Tag Cloud</label></th>
750
- <td><select name="showcategoriesastc">
751
- <option value="yes" <?php selected('yes', $showcategoriesastc); ?>>Yes</option>
752
- <option value="no" <?php selected('no', $showcategoriesastc); ?>>No (Default)</option>
753
- </select></td>
754
- </tr>
755
- <tr valign="top">
756
- <th scope="row"><label for="showtags">Show Tags</label></th>
757
- <td><select name="showtags">
758
- <option value="yes" <?php selected('yes', $showtags); ?>>Yes (Default)</option>
759
- <option value="no" <?php selected('no', $showtags); ?>>No</option>
760
- </select></td>
761
- </tr>
762
- <tr valign="top">
763
- <th scope="row"><label for="showtagsastc">Show Tags As Tag Cloud</label></th>
764
- <td><select name="showtagsastc">
765
- <option value="yes" <?php selected('yes', $showtagsastc); ?>>Yes</option>
766
- <option value="no" <?php selected('no', $showtagsastc); ?>>No (Default)</option>
767
- </select></td>
768
- </tr>
769
- <tr>
770
- <th scope="row">Display Order</th>
771
- <td><select name="displayorder">
772
- <option <?php selected('1', $displayorder); ?> value='1' /> 1: Pages, Posts, Archives, Categories, Tags</option>
773
- <option <?php selected('2', $displayorder); ?> value='2' /> 2: Pages, Posts, Archives, Tags, Categories</option>
774
- <option <?php selected('3', $displayorder); ?> value='3' /> 3: Pages, Posts, Categories, Archives, Tags</option>
775
- <option <?php selected('4', $displayorder); ?> value='4' /> 4: Pages, Posts, Categories, Tags, Archives</option>
776
- <option <?php selected('5', $displayorder); ?> value='5' /> 5: Pages, Posts, Tags, Archives, Categories</option>
777
- <option <?php selected('6', $displayorder); ?> value='6' /> 6: Pages, Posts, Tags, Categories, Archives</option>
778
- <option <?php selected('7', $displayorder); ?> value='7' /> 7: Pages, Archives, Posts, Categories, Tags</option>
779
- <option <?php selected('8', $displayorder); ?> value='8' /> 8: Pages, Archives, Posts, Tags, Categories</option>
780
- <option <?php selected('9', $displayorder); ?> value='9' /> 9: Pages, Archives, Categories, Posts, Tags</option>
781
- <option <?php selected('10', $displayorder); ?> value='10' /> 10: Pages, Archives, Categories, Tags, Posts</option>
782
- <option <?php selected('11', $displayorder); ?> value='11' /> 11: Pages, Archives, Tags, Posts, Categories</option>
783
- <option <?php selected('12', $displayorder); ?> value='12' /> 12: Pages, Archives, Tags, Categories, Posts</option>
784
- <option <?php selected('13', $displayorder); ?> value='13' /> 13: Pages, Categories, Posts, Archives, Tags</option>
785
- <option <?php selected('14', $displayorder); ?> value='14' /> 14: Pages, Categories, Posts, Tags, Archives</option>
786
- <option <?php selected('15', $displayorder); ?> value='15' /> 15: Pages, Categories, Archives, Posts, Tags</option>
787
- <option <?php selected('16', $displayorder); ?> value='16' /> 16: Pages, Categories, Archives, Tags, Posts</option>
788
- <option <?php selected('17', $displayorder); ?> value='17' /> 17: Pages, Categories, Tags, Posts, Archives</option>
789
- <option <?php selected('18', $displayorder); ?> value='18' /> 18: Pages, Categories, Tags, Archives, Posts</option>
790
- <option <?php selected('19', $displayorder); ?> value='19' /> 19: Pages, Tags, Posts, Archives, Categories</option>
791
- <option <?php selected('20', $displayorder); ?> value='20' /> 20: Pages, Tags, Posts, Categories, Archives</option>
792
- <option <?php selected('21', $displayorder); ?> value='21' /> 21: Pages, Tags, Archives, Posts, Categories</option>
793
- <option <?php selected('22', $displayorder); ?> value='22' /> 22: Pages, Tags, Archives, Categories, Posts</option>
794
- <option <?php selected('23', $displayorder); ?> value='23' /> 23: Pages, Tags, Categories, Posts, Archives</option>
795
- <option <?php selected('24', $displayorder); ?> value='24' /> 24: Pages, Tags, Categories, Archives, Posts</option>
796
- <option <?php selected('25', $displayorder); ?> value='25' /> 25: Posts, Pages, Archives, Categories, Tags</option>
797
- <option <?php selected('26', $displayorder); ?> value='26' /> 26: Posts, Pages, Archives, Tags, Categories</option>
798
- <option <?php selected('27', $displayorder); ?> value='27' /> 27: Posts, Pages, Categories, Archives, Tags</option>
799
- <option <?php selected('28', $displayorder); ?> value='28' /> 28: Posts, Pages, Categories, Tags, Archives</option>
800
- <option <?php selected('29', $displayorder); ?> value='29' /> 29: Posts, Pages, Tags, Archives, Categories</option>
801
- <option <?php selected('30', $displayorder); ?> value='30' /> 30: Posts, Pages, Tags, Categories, Archives</option>
802
- <option <?php selected('31', $displayorder); ?> value='31' /> 31: Posts, Archives, Pages, Categories, Tags</option>
803
- <option <?php selected('32', $displayorder); ?> value='32' /> 32: Posts, Archives, Pages, Tags, Categories</option>
804
- <option <?php selected('33', $displayorder); ?> value='33' /> 33: Posts, Archives, Categories, Pages, Tags</option>
805
- <option <?php selected('34', $displayorder); ?> value='34' /> 34: Posts, Archives, Categories, Tags, Pages</option>
806
- <option <?php selected('35', $displayorder); ?> value='35' /> 35: Posts, Archives, Tags, Pages, Categories</option>
807
- <option <?php selected('36', $displayorder); ?> value='36' /> 36: Posts, Archives, Tags, Categories, Pages</option>
808
- <option <?php selected('37', $displayorder); ?> value='37' /> 37: Posts, Categories, Pages, Archives, Tags</option>
809
- <option <?php selected('38', $displayorder); ?> value='38' /> 38: Posts, Categories, Pages, Tags, Archives</option>
810
- <option <?php selected('39', $displayorder); ?> value='39' /> 39: Posts, Categories, Archives, Pages, Tags</option>
811
- <option <?php selected('40', $displayorder); ?> value='40' /> 40: Posts, Categories, Archives, Tags, Pages</option>
812
- <option <?php selected('41', $displayorder); ?> value='41' /> 41: Posts, Categories, Tags, Pages, Archives</option>
813
- <option <?php selected('42', $displayorder); ?> value='42' /> 42: Posts, Categories, Tags, Archives, Pages</option>
814
- <option <?php selected('43', $displayorder); ?> value='43' /> 43: Posts, Tags, Pages, Archives, Categories</option>
815
- <option <?php selected('44', $displayorder); ?> value='44' /> 44: Posts, Tags, Pages, Categories, Archives</option>
816
- <option <?php selected('45', $displayorder); ?> value='45' /> 45: Posts, Tags, Archives, Pages, Categories</option>
817
- <option <?php selected('46', $displayorder); ?> value='46' /> 46: Posts, Tags, Archives, Categories, Pages</option>
818
- <option <?php selected('47', $displayorder); ?> value='47' /> 47: Posts, Tags, Categories, Pages, Archives</option>
819
- <option <?php selected('48', $displayorder); ?> value='48' /> 48: Posts, Tags, Categories, Archives, Pages</option>
820
- <option <?php selected('49', $displayorder); ?> value='49' /> 49: Archives, Pages, Posts, Categories, Tags</option>
821
- <option <?php selected('50', $displayorder); ?> value='50' /> 50: Archives, Pages, Posts, Tags, Categories</option>
822
- <option <?php selected('51', $displayorder); ?> value='51' /> 51: Archives, Pages, Categories, Posts, Tags</option>
823
- <option <?php selected('52', $displayorder); ?> value='52' /> 52: Archives, Pages, Categories, Tags, Posts</option>
824
- <option <?php selected('53', $displayorder); ?> value='53' /> 53: Archives, Pages, Tags, Posts, Categories</option>
825
- <option <?php selected('54', $displayorder); ?> value='54' /> 54: Archives, Pages, Tags, Categories, Posts</option>
826
- <option <?php selected('55', $displayorder); ?> value='55' /> 55: Archives, Posts, Pages, Categories, Tags</option>
827
- <option <?php selected('56', $displayorder); ?> value='56' /> 56: Archives, Posts, Pages, Tags, Categories</option>
828
- <option <?php selected('57', $displayorder); ?> value='57' /> 57: Archives, Posts, Categories, Pages, Tags</option>
829
- <option <?php selected('58', $displayorder); ?> value='58' /> 58: Archives, Posts, Categories, Tags, Pages</option>
830
- <option <?php selected('59', $displayorder); ?> value='59' /> 59: Archives, Posts, Tags, Pages, Categories</option>
831
- <option <?php selected('60', $displayorder); ?> value='60' /> 60: Archives, Posts, Tags, Categories, Pages</option>
832
- <option <?php selected('61', $displayorder); ?> value='61' /> 61: Archives, Categories, Pages, Posts, Tags</option>
833
- <option <?php selected('62', $displayorder); ?> value='62' /> 62: Archives, Categories, Pages, Tags, Posts</option>
834
- <option <?php selected('63', $displayorder); ?> value='63' /> 63: Archives, Categories, Posts, Pages, Tags</option>
835
- <option <?php selected('64', $displayorder); ?> value='64' /> 64: Archives, Categories, Posts, Tags, Pages</option>
836
- <option <?php selected('65', $displayorder); ?> value='65' /> 65: Archives, Categories, Tags, Pages, Posts</option>
837
- <option <?php selected('66', $displayorder); ?> value='66' /> 66: Archives, Categories, Tags, Posts, Pages</option>
838
- <option <?php selected('67', $displayorder); ?> value='67' /> 67: Archives, Tags, Pages, Posts, Categories</option>
839
- <option <?php selected('68', $displayorder); ?> value='68' /> 68: Archives, Tags, Pages, Categories, Posts</option>
840
- <option <?php selected('69', $displayorder); ?> value='69' /> 69: Archives, Tags, Posts, Pages, Categories</option>
841
- <option <?php selected('70', $displayorder); ?> value='70' /> 70: Archives, Tags, Posts, Categories, Pages</option>
842
- <option <?php selected('71', $displayorder); ?> value='71' /> 71: Archives, Tags, Categories, Pages, Posts</option>
843
- <option <?php selected('72', $displayorder); ?> value='72' /> 72: Archives, Tags, Categories, Posts, Pages</option>
844
- <option <?php selected('73', $displayorder); ?> value='73' /> 73: Categories, Pages, Posts, Archives, Tags</option>
845
- <option <?php selected('74', $displayorder); ?> value='74' /> 74: Categories, Pages, Posts, Tags, Archives</option>
846
- <option <?php selected('75', $displayorder); ?> value='75' /> 75: Categories, Pages, Archives, Posts, Tags</option>
847
- <option <?php selected('76', $displayorder); ?> value='76' /> 76: Categories, Pages, Archives, Tags, Posts</option>
848
- <option <?php selected('77', $displayorder); ?> value='77' /> 77: Categories, Pages, Tags, Posts, Archives</option>
849
- <option <?php selected('78', $displayorder); ?> value='78' /> 78: Categories, Pages, Tags, Archives, Posts</option>
850
- <option <?php selected('79', $displayorder); ?> value='79' /> 79: Categories, Posts, Pages, Archives, Tags</option>
851
- <option <?php selected('80', $displayorder); ?> value='80' /> 80: Categories, Posts, Pages, Tags, Archives</option>
852
- <option <?php selected('81', $displayorder); ?> value='81' /> 81: Categories, Posts, Archives, Pages, Tags</option>
853
- <option <?php selected('82', $displayorder); ?> value='82' /> 82: Categories, Posts, Archives, Tags, Pages</option>
854
- <option <?php selected('83', $displayorder); ?> value='83' /> 83: Categories, Posts, Tags, Pages, Archives</option>
855
- <option <?php selected('84', $displayorder); ?> value='84' /> 84: Categories, Posts, Tags, Archives, Pages</option>
856
- <option <?php selected('85', $displayorder); ?> value='85' /> 85: Categories, Archives, Pages, Posts, Tags</option>
857
- <option <?php selected('86', $displayorder); ?> value='86' /> 86: Categories, Archives, Pages, Tags, Posts</option>
858
- <option <?php selected('87', $displayorder); ?> value='87' /> 87: Categories, Archives, Posts, Pages, Tags</option>
859
- <option <?php selected('88', $displayorder); ?> value='88' /> 88: Categories, Archives, Posts, Tags, Pages</option>
860
- <option <?php selected('89', $displayorder); ?> value='89' /> 89: Categories, Archives, Tags, Pages, Posts</option>
861
- <option <?php selected('90', $displayorder); ?> value='90' /> 90: Categories, Archives, Tags, Posts, Pages</option>
862
- <option <?php selected('91', $displayorder); ?> value='91' /> 91: Categories, Tags, Pages, Posts, Archives</option>
863
- <option <?php selected('92', $displayorder); ?> value='92' /> 92: Categories, Tags, Pages, Archives, Posts</option>
864
- <option <?php selected('93', $displayorder); ?> value='93' /> 93: Categories, Tags, Posts, Pages, Archives</option>
865
- <option <?php selected('94', $displayorder); ?> value='94' /> 94: Categories, Tags, Posts, Archives, Pages</option>
866
- <option <?php selected('95', $displayorder); ?> value='95' /> 95: Categories, Tags, Archives, Pages, Posts</option>
867
- <option <?php selected('96', $displayorder); ?> value='96' /> 96: Categories, Tags, Archives, Posts, Pages</option>
868
- <option <?php selected('97', $displayorder); ?> value='97' /> 97: Tags, Pages, Posts, Archives, Categories</option>
869
- <option <?php selected('98', $displayorder); ?> value='98' /> 98: Tags, Pages, Posts, Categories, Archives</option>
870
- <option <?php selected('99', $displayorder); ?> value='99' /> 99: Tags, Pages, Archives, Posts, Categories</option>
871
- <option <?php selected('100', $displayorder); ?> value='100' /> 100: Tags, Pages, Archives, Categories, Posts</option>
872
- <option <?php selected('101', $displayorder); ?> value='101' /> 101: Tags, Pages, Categories, Posts, Archives</option>
873
- <option <?php selected('102', $displayorder); ?> value='102' /> 102: Tags, Pages, Categories, Archives, Posts</option>
874
- <option <?php selected('103', $displayorder); ?> value='103' /> 103: Tags, Posts, Pages, Archives, Categories</option>
875
- <option <?php selected('104', $displayorder); ?> value='104' /> 104: Tags, Posts, Pages, Categories, Archives</option>
876
- <option <?php selected('105', $displayorder); ?> value='105' /> 105: Tags, Posts, Archives, Pages, Categories</option>
877
- <option <?php selected('106', $displayorder); ?> value='106' /> 106: Tags, Posts, Archives, Categories, Pages</option>
878
- <option <?php selected('107', $displayorder); ?> value='107' /> 107: Tags, Posts, Categories, Pages, Archives</option>
879
- <option <?php selected('108', $displayorder); ?> value='108' /> 108: Tags, Posts, Categories, Archives, Pages</option>
880
- <option <?php selected('109', $displayorder); ?> value='109' /> 109: Tags, Archives, Pages, Posts, Categories</option>
881
- <option <?php selected('110', $displayorder); ?> value='110' /> 110: Tags, Archives, Pages, Categories, Posts</option>
882
- <option <?php selected('111', $displayorder); ?> value='111' /> 111: Tags, Archives, Posts, Pages, Categories</option>
883
- <option <?php selected('112', $displayorder); ?> value='112' /> 112: Tags, Archives, Posts, Categories, Pages</option>
884
- <option <?php selected('113', $displayorder); ?> value='113' /> 113: Tags, Archives, Categories, Pages, Posts</option>
885
- <option <?php selected('114', $displayorder); ?> value='114' /> 114: Tags, Archives, Categories, Posts, Pages</option>
886
- <option <?php selected('115', $displayorder); ?> value='115' /> 115: Tags, Categories, Pages, Posts, Archives</option>
887
- <option <?php selected('116', $displayorder); ?> value='116' /> 116: Tags, Categories, Pages, Archives, Posts</option>
888
- <option <?php selected('117', $displayorder); ?> value='117' /> 117: Tags, Categories, Posts, Pages, Archives</option>
889
- <option <?php selected('118', $displayorder); ?> value='118' /> 118: Tags, Categories, Posts, Archives, Pages</option>
890
- <option <?php selected('119', $displayorder); ?> value='119' /> 119: Tags, Categories, Archives, Pages, Posts</option>
891
- <option <?php selected('120', $displayorder); ?> value='120' /> 120: Tags, Categories, Archives, Posts, Pages</option>
892
- </select></td>
893
- </tr>
894
- </table>
895
-
896
- <div class="submit">
897
- <input type="submit" name="info_update" value="Update Options" />
898
- </div>
899
-
900
- </form>
901
- </div><?php
902
- }
903
-
904
- // Hooks
905
- add_filter('the_content', 'wp_realtime_sitemap', 2);
906
- add_action('admin_menu', 'wp_realtime_sitemap_showadmin');
907
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
908
  ?>
1
+ <?php
2
+
3
+ /*
4
+ Plugin Name: WP Realtime Sitemap
5
+ Plugin URI: http://www.daniel-tweedy.co.uk/redir/wp-realtime-sitemap-home/
6
+ Description: Adds a sitemap to your Wordpress blog that is always up-to-date. Add `<!--wp-realtime-sitemap-->` to any page or post and the site map will be added there. Use Settings->WP Realtime Sitemap to set options.
7
+ Version: 1.2
8
+ Author: Daniel Tweedy
9
+ Author URI: http://www.daniel-tweedy.co.uk/
10
+ License: GPL2
11
+ */
12
+
13
+ /* Copyright 2010 WP Realtime Sitemap (email : support@daniel-tweedy.co.uk)
14
+
15
+ This program is free software; you can redistribute it and/or modify
16
+ it under the terms of the GNU General Public License, version 2, as
17
+ published by the Free Software Foundation.
18
+
19
+ This program is distributed in the hope that it will be useful,
20
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
21
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22
+ GNU General Public License for more details.
23
+
24
+ You should have received a copy of the GNU General Public License
25
+ along with this program; if not, write to the Free Software
26
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
27
+ */
28
+
29
+ function wprs_plugin_action_links($links, $file) {
30
+ $plugin_file = basename(__FILE__);
31
+ if (basename($file) == $plugin_file) {
32
+ $settings_link = '<a href="options-general.php?page='.$plugin_file.'">'.__('Settings', 'wp-realtime-sitemap').'</a>';
33
+ array_unshift($links, $settings_link);
34
+ }
35
+ return $links;
36
+ }
37
+ add_filter('plugin_action_links', 'wprs_plugin_action_links', 10, 2);
38
+
39
+ function wprs_plugin_row_meta($links, $file) {
40
+ $plugin_file = basename(__FILE__);
41
+ if (basename($file) == $plugin_file) {
42
+ $faq_link = '<a href="http://www.daniel-tweedy.co.uk/redir/wp-realtime-sitemap-faq">'.__('FAQ', 'wp-realtime-sitemap').'</a>';
43
+ array_unshift($links, $faq_link);
44
+ $support_link = '<a href="http://www.daniel-tweedy.co.uk/redir/wp-realtime-sitemap-support">'.__('Support', 'wp-realtime-sitemap').'</a>';
45
+ array_unshift($links, $support_link);
46
+ $settings_link = '<a href="options-general.php?page='.$plugin_file.'">'.__('Settings', 'wp-realtime-sitemap').'</a>';
47
+ array_unshift($links, $settings_link);
48
+ $donate_link = '<a href="http://www.daniel-tweedy.co.uk/redir/wp-realtime-sitemap-donate">'.__('Donate', 'wp-realtime-sitemap').'</a>';
49
+ array_unshift($links, $donate_link);
50
+ }
51
+ return $links;
52
+ }
53
+ add_filter('plugin_row_meta', 'wprs_plugin_row_meta', 10, 2);
54
+
55
+ function wprs_admin_menu() {
56
+ if (function_exists('add_options_page')) {
57
+ add_options_page(
58
+ 'wp-realtime-sitemap'
59
+ , 'WP Realtime Sitemap'
60
+ , 10
61
+ , basename(__FILE__)
62
+ , 'wprs_options_form'
63
+ );
64
+ }
65
+ /* if (function_exists('add_submenu_page')) {
66
+ add_submenu_page(
67
+ 'index.php'
68
+ , __('Most Popular Posts', 'popularity-contest')
69
+ , __('Most Popular Posts', 'popularity-contest')
70
+ , 0
71
+ , basename(__FILE__)
72
+ , 'akpc_view_stats'
73
+ );
74
+ } */
75
+ }
76
+ add_action('admin_menu', 'wprs_admin_menu');
77
+
78
+ function wprs_admin_init() {
79
+ // register_setting($this->tag.'_options', $this->tag);
80
+ }
81
+ add_action('admin_init', 'wprs_admin_init');
82
+
83
+ function wprs_contextual_help( $help, $screen ) {
84
+ if ( $screen == 'settings_page_wp-realtime-sitemap' ) {
85
+ $help .= '<h5>' . __( 'WP Realtime Sitemap Help' ) . '</h5><div class="metabox-prefs">';
86
+ $help .= '<a href="http://www.daniel-tweedy.co.uk/redir/wp-realtime-sitemap-install">'.__( 'WP Realtime Sitemap Home Page', 'wp-realtime-sitemap' ).'</a><br/>';
87
+ $help .= '<a href="http://www.daniel-tweedy.co.uk/redir/wp-realtime-sitemap-faq">'.__( 'WP Realtime Sitemap FAQ', 'wp-realtime-sitemap' ).'</a><br/>';
88
+ $help .= '<a href="http://www.daniel-tweedy.co.uk/redir/wp-realtime-sitemap-support">'.__( 'WP Realtime Sitemap Support', 'wp-realtime-sitemap' ).'</a><br/>';
89
+ $help .= '<a href="http://www.daniel-tweedy.co.uk/redir/wp-realtime-sitemap-donate">'.__( 'WP Realtime Sitemap Donate', 'wp-realtime-sitemap' ).'</a><br/>';
90
+ $help .= __( 'Please read the plugin information and FAQ, before asking a question.', 'wp-realtime-sitemap' );
91
+ $help .= '</div>';
92
+ }
93
+
94
+ return $help;
95
+ }
96
+ add_filter( 'contextual_help', 'wprs_contextual_help', 10, 2 );
97
+
98
+ function wprs_options_form() {
99
+ if (!current_user_can('manage_options')) {
100
+ wp_die( __('You do not have sufficient permissions to access this page.') );
101
+ }
102
+
103
+ $orderby = get_option('wp_realtime_sitemap_orderby');
104
+ $showprivate = get_option('wp_realtime_sitemap_showprivate');
105
+ $showpages = get_option('wp_realtime_sitemap_showpages');
106
+ $showposts = get_option('wp_realtime_sitemap_showposts');
107
+ $showarchives = get_option('wp_realtime_sitemap_showarchives');
108
+ $showcategories = get_option('wp_realtime_sitemap_showcategories');
109
+ $showcategoriesastc = get_option('wp_realtime_sitemap_showcategoriesastc');
110
+ $showtags = get_option('wp_realtime_sitemap_showtags');
111
+ $showtagsastc = get_option('wp_realtime_sitemap_showtagsastc');
112
+ $displayorder = get_option('wp_realtime_sitemap_displayorder');
113
+
114
+ // Add options if first time running
115
+ add_option('wp_realtime_sitemap_orderby', 'datedesc', 'WP Realtime Sitemap Plugin');
116
+ add_option('wp_realtime_sitemap_showprivate', 'no', 'WP Realtime Sitemap Plugin');
117
+ add_option('wp_realtime_sitemap_showpages', 'yes', 'WP Realtime Sitemap Plugin');
118
+ add_option('wp_realtime_sitemap_showposts', 'yes', 'WP Realtime Sitemap Plugin');
119
+ add_option('wp_realtime_sitemap_showarchives', 'yes', 'WP Realtime Sitemap Plugin');
120
+ add_option('wp_realtime_sitemap_showcategories', 'yes', 'WP Realtime Sitemap Plugin');
121
+ add_option('wp_realtime_sitemap_showcategoriesastc', 'no', 'WP Realtime Sitemap Plugin');
122
+ add_option('wp_realtime_sitemap_showtags', 'yes', 'WP Realtime Sitemap Plugin');
123
+ add_option('wp_realtime_sitemap_showtagsastc', 'no', 'WP Realtime Sitemap Plugin');
124
+ add_option('wp_realtime_sitemap_displayorder', '1', 'WP Realtime Sitemap Plugin');
125
+
126
+ // Get posted options
127
+ $orderby = $_POST['orderby'];
128
+
129
+ if (isset($_POST['info_update'])) {
130
+ // Update settings
131
+ $orderby = $_POST['orderby'];
132
+ $showprivate = $_POST['showprivate'];
133
+ $showpages = $_POST['showpages'];
134
+ $showposts = $_POST['showposts'];
135
+ $showarchives = $_POST['showarchives'];
136
+ $showcategories = $_POST['showcategories'];
137
+ $showcategoriesastc = $_POST['showcategoriesastc'];
138
+ $showtags = $_POST['showtags'];
139
+ $showtagsastc = $_POST['showtagsastc'];
140
+ $displayorder = $_POST['displayorder'];
141
+
142
+ update_option('wp_realtime_sitemap_orderby', $orderby);
143
+ update_option('wp_realtime_sitemap_showprivate', $showprivate);
144
+ update_option('wp_realtime_sitemap_showpages', $showpages);
145
+ update_option('wp_realtime_sitemap_showposts', $showposts);
146
+ update_option('wp_realtime_sitemap_showarchives', $showarchives);
147
+ update_option('wp_realtime_sitemap_showcategories', $showcategories);
148
+ update_option('wp_realtime_sitemap_showcategoriesastc', $showcategoriesastc);
149
+ update_option('wp_realtime_sitemap_showtags', $showtags);
150
+ update_option('wp_realtime_sitemap_showtagsastc', $showtagsastc);
151
+ update_option('wp_realtime_sitemap_displayorder', $displayorder);
152
+ } else {
153
+ // Load settings from database
154
+ $orderby = get_option('wp_realtime_sitemap_orderby');
155
+ $showprivate = get_option('wp_realtime_sitemap_showprivate');
156
+ $showpages = get_option('wp_realtime_sitemap_showpages');
157
+ $showposts = get_option('wp_realtime_sitemap_showposts');
158
+ $showarchives = get_option('wp_realtime_sitemap_showarchives');
159
+ $showcategories = get_option('wp_realtime_sitemap_showcategories');
160
+ $showcategoriesastc = get_option('wp_realtime_sitemap_showcategoriesastc');
161
+ $showtags = get_option('wp_realtime_sitemap_showtags');
162
+ $showtagsastc = get_option('wp_realtime_sitemap_showtagsastc');
163
+ $displayorder = get_option('wp_realtime_sitemap_displayorder');
164
+ }
165
+
166
+ ?>
167
+ <div class="wrap">
168
+ <h2>WP Realtime Sitemap Options</h2>
169
+
170
+ <form method="post">
171
+ <table class="form-table">
172
+ <tr valign="top">
173
+ <th scope="row"><label for="orderby">Order Sitemap Pages/Posts By</label></th>
174
+ <td><select name="orderby">
175
+ <option <?php selected('datedesc', $orderby); ?> value="datedesc">Date descending (Default)</option>
176
+ <option <?php selected('dateasc', $orderby); ?> value="dateasc">Date ascending</option>
177
+ <option <?php selected('alphadesc', $orderby); ?> value="alphadesc">Alphabetical descending</option>
178
+ <option <?php selected('alphaasc', $orderby); ?> value="alphaasc">Alphabetical ascending</option>
179
+ </select></td>
180
+ </tr>
181
+ <tr valign="top">
182
+ <th scope="row"><label for="showprivate">Show Private Pages/Posts</label></th>
183
+ <td><select name="showprivate">
184
+ <option value="no" <?php selected('no', $showprivate); ?>>No, leave hidden (Default)</option>
185
+ <option value="yes" <?php selected('yes', $showprivate); ?>>Yes, show hidden</option>
186
+ </select></td>
187
+ </tr>
188
+ <tr valign="top">
189
+ <th scope="row"><label for="showpages">Show Pages</label></th>
190
+ <td><select name="showpages">
191
+ <option value="yes" <?php selected('yes', $showpages); ?>>Yes (Default)</option>
192
+ <option value="no" <?php selected('no', $showpages); ?>>No</option>
193
+ </select></td>
194
+ </tr>
195
+ <tr valign="top">
196
+ <th scope="row"><label for="showposts">Show Posts</label></th>
197
+ <td><select name="showposts">
198
+ <option value="yes" <?php selected('yes', $showposts); ?>>Yes (Default)</option>
199
+ <option value="no" <?php selected('no', $showposts); ?>>No</option>
200
+ </select></td>
201
+ </tr>
202
+ <tr valign="top">
203
+ <th scope="row"><label for="showarchives">Show Archives</label></th>
204
+ <td><select name="showarchives">
205
+ <option value="yes" <?php selected('yes', $showarchives); ?>>Yes (Default)</option>
206
+ <option value="no" <?php selected('no', $showarchives); ?>>No</option>
207
+ </select></td>
208
+ </tr>
209
+ <tr valign="top">
210
+ <th scope="row"><label for="showcategories">Show Categories</label></th>
211
+ <td><select name="showcategories">
212
+ <option value="yes" <?php selected('yes', $showcategories); ?>>Yes (Default)</option>
213
+ <option value="no" <?php selected('no', $showcategories); ?>>No</option>
214
+ </select></td>
215
+ </tr>
216
+ <tr valign="top">
217
+ <th scope="row"><label for="showcategoriesastc">Show Categories As Tag Cloud</label></th>
218
+ <td><select name="showcategoriesastc">
219
+ <option value="yes" <?php selected('yes', $showcategoriesastc); ?>>Yes</option>
220
+ <option value="no" <?php selected('no', $showcategoriesastc); ?>>No (Default)</option>
221
+ </select></td>
222
+ </tr>
223
+ <tr valign="top">
224
+ <th scope="row"><label for="showtags">Show Tags</label></th>
225
+ <td><select name="showtags">
226
+ <option value="yes" <?php selected('yes', $showtags); ?>>Yes (Default)</option>
227
+ <option value="no" <?php selected('no', $showtags); ?>>No</option>
228
+ </select></td>
229
+ </tr>
230
+ <tr valign="top">
231
+ <th scope="row"><label for="showtagsastc">Show Tags As Tag Cloud</label></th>
232
+ <td><select name="showtagsastc">
233
+ <option value="yes" <?php selected('yes', $showtagsastc); ?>>Yes</option>
234
+ <option value="no" <?php selected('no', $showtagsastc); ?>>No (Default)</option>
235
+ </select></td>
236
+ </tr>
237
+ <tr>
238
+ <th scope="row">Display Order</th>
239
+ <td><select name="displayorder">
240
+ <option <?php selected('1', $displayorder); ?> value='1' /> 1: Pages, Posts, Archives, Categories, Tags</option>
241
+ <option <?php selected('2', $displayorder); ?> value='2' /> 2: Pages, Posts, Archives, Tags, Categories</option>
242
+ <option <?php selected('3', $displayorder); ?> value='3' /> 3: Pages, Posts, Categories, Archives, Tags</option>
243
+ <option <?php selected('4', $displayorder); ?> value='4' /> 4: Pages, Posts, Categories, Tags, Archives</option>
244
+ <option <?php selected('5', $displayorder); ?> value='5' /> 5: Pages, Posts, Tags, Archives, Categories</option>
245
+ <option <?php selected('6', $displayorder); ?> value='6' /> 6: Pages, Posts, Tags, Categories, Archives</option>
246
+ <option <?php selected('7', $displayorder); ?> value='7' /> 7: Pages, Archives, Posts, Categories, Tags</option>
247
+ <option <?php selected('8', $displayorder); ?> value='8' /> 8: Pages, Archives, Posts, Tags, Categories</option>
248
+ <option <?php selected('9', $displayorder); ?> value='9' /> 9: Pages, Archives, Categories, Posts, Tags</option>
249
+ <option <?php selected('10', $displayorder); ?> value='10' /> 10: Pages, Archives, Categories, Tags, Posts</option>
250
+ <option <?php selected('11', $displayorder); ?> value='11' /> 11: Pages, Archives, Tags, Posts, Categories</option>
251
+ <option <?php selected('12', $displayorder); ?> value='12' /> 12: Pages, Archives, Tags, Categories, Posts</option>
252
+ <option <?php selected('13', $displayorder); ?> value='13' /> 13: Pages, Categories, Posts, Archives, Tags</option>
253
+ <option <?php selected('14', $displayorder); ?> value='14' /> 14: Pages, Categories, Posts, Tags, Archives</option>
254
+ <option <?php selected('15', $displayorder); ?> value='15' /> 15: Pages, Categories, Archives, Posts, Tags</option>
255
+ <option <?php selected('16', $displayorder); ?> value='16' /> 16: Pages, Categories, Archives, Tags, Posts</option>
256
+ <option <?php selected('17', $displayorder); ?> value='17' /> 17: Pages, Categories, Tags, Posts, Archives</option>
257
+ <option <?php selected('18', $displayorder); ?> value='18' /> 18: Pages, Categories, Tags, Archives, Posts</option>
258
+ <option <?php selected('19', $displayorder); ?> value='19' /> 19: Pages, Tags, Posts, Archives, Categories</option>
259
+ <option <?php selected('20', $displayorder); ?> value='20' /> 20: Pages, Tags, Posts, Categories, Archives</option>
260
+ <option <?php selected('21', $displayorder); ?> value='21' /> 21: Pages, Tags, Archives, Posts, Categories</option>
261
+ <option <?php selected('22', $displayorder); ?> value='22' /> 22: Pages, Tags, Archives, Categories, Posts</option>
262
+ <option <?php selected('23', $displayorder); ?> value='23' /> 23: Pages, Tags, Categories, Posts, Archives</option>
263
+ <option <?php selected('24', $displayorder); ?> value='24' /> 24: Pages, Tags, Categories, Archives, Posts</option>
264
+ <option <?php selected('25', $displayorder); ?> value='25' /> 25: Posts, Pages, Archives, Categories, Tags</option>
265
+ <option <?php selected('26', $displayorder); ?> value='26' /> 26: Posts, Pages, Archives, Tags, Categories</option>
266
+ <option <?php selected('27', $displayorder); ?> value='27' /> 27: Posts, Pages, Categories, Archives, Tags</option>
267
+ <option <?php selected('28', $displayorder); ?> value='28' /> 28: Posts, Pages, Categories, Tags, Archives</option>
268
+ <option <?php selected('29', $displayorder); ?> value='29' /> 29: Posts, Pages, Tags, Archives, Categories</option>
269
+ <option <?php selected('30', $displayorder); ?> value='30' /> 30: Posts, Pages, Tags, Categories, Archives</option>
270
+ <option <?php selected('31', $displayorder); ?> value='31' /> 31: Posts, Archives, Pages, Categories, Tags</option>
271
+ <option <?php selected('32', $displayorder); ?> value='32' /> 32: Posts, Archives, Pages, Tags, Categories</option>
272
+ <option <?php selected('33', $displayorder); ?> value='33' /> 33: Posts, Archives, Categories, Pages, Tags</option>
273
+ <option <?php selected('34', $displayorder); ?> value='34' /> 34: Posts, Archives, Categories, Tags, Pages</option>
274
+ <option <?php selected('35', $displayorder); ?> value='35' /> 35: Posts, Archives, Tags, Pages, Categories</option>
275
+ <option <?php selected('36', $displayorder); ?> value='36' /> 36: Posts, Archives, Tags, Categories, Pages</option>
276
+ <option <?php selected('37', $displayorder); ?> value='37' /> 37: Posts, Categories, Pages, Archives, Tags</option>
277
+ <option <?php selected('38', $displayorder); ?> value='38' /> 38: Posts, Categories, Pages, Tags, Archives</option>
278
+ <option <?php selected('39', $displayorder); ?> value='39' /> 39: Posts, Categories, Archives, Pages, Tags</option>
279
+ <option <?php selected('40', $displayorder); ?> value='40' /> 40: Posts, Categories, Archives, Tags, Pages</option>
280
+ <option <?php selected('41', $displayorder); ?> value='41' /> 41: Posts, Categories, Tags, Pages, Archives</option>
281
+ <option <?php selected('42', $displayorder); ?> value='42' /> 42: Posts, Categories, Tags, Archives, Pages</option>
282
+ <option <?php selected('43', $displayorder); ?> value='43' /> 43: Posts, Tags, Pages, Archives, Categories</option>
283
+ <option <?php selected('44', $displayorder); ?> value='44' /> 44: Posts, Tags, Pages, Categories, Archives</option>
284
+ <option <?php selected('45', $displayorder); ?> value='45' /> 45: Posts, Tags, Archives, Pages, Categories</option>
285
+ <option <?php selected('46', $displayorder); ?> value='46' /> 46: Posts, Tags, Archives, Categories, Pages</option>
286
+ <option <?php selected('47', $displayorder); ?> value='47' /> 47: Posts, Tags, Categories, Pages, Archives</option>
287
+ <option <?php selected('48', $displayorder); ?> value='48' /> 48: Posts, Tags, Categories, Archives, Pages</option>
288
+ <option <?php selected('49', $displayorder); ?> value='49' /> 49: Archives, Pages, Posts, Categories, Tags</option>
289
+ <option <?php selected('50', $displayorder); ?> value='50' /> 50: Archives, Pages, Posts, Tags, Categories</option>
290
+ <option <?php selected('51', $displayorder); ?> value='51' /> 51: Archives, Pages, Categories, Posts, Tags</option>
291
+ <option <?php selected('52', $displayorder); ?> value='52' /> 52: Archives, Pages, Categories, Tags, Posts</option>
292
+ <option <?php selected('53', $displayorder); ?> value='53' /> 53: Archives, Pages, Tags, Posts, Categories</option>
293
+ <option <?php selected('54', $displayorder); ?> value='54' /> 54: Archives, Pages, Tags, Categories, Posts</option>
294
+ <option <?php selected('55', $displayorder); ?> value='55' /> 55: Archives, Posts, Pages, Categories, Tags</option>
295
+ <option <?php selected('56', $displayorder); ?> value='56' /> 56: Archives, Posts, Pages, Tags, Categories</option>
296
+ <option <?php selected('57', $displayorder); ?> value='57' /> 57: Archives, Posts, Categories, Pages, Tags</option>
297
+ <option <?php selected('58', $displayorder); ?> value='58' /> 58: Archives, Posts, Categories, Tags, Pages</option>
298
+ <option <?php selected('59', $displayorder); ?> value='59' /> 59: Archives, Posts, Tags, Pages, Categories</option>
299
+ <option <?php selected('60', $displayorder); ?> value='60' /> 60: Archives, Posts, Tags, Categories, Pages</option>
300
+ <option <?php selected('61', $displayorder); ?> value='61' /> 61: Archives, Categories, Pages, Posts, Tags</option>
301
+ <option <?php selected('62', $displayorder); ?> value='62' /> 62: Archives, Categories, Pages, Tags, Posts</option>
302
+ <option <?php selected('63', $displayorder); ?> value='63' /> 63: Archives, Categories, Posts, Pages, Tags</option>
303
+ <option <?php selected('64', $displayorder); ?> value='64' /> 64: Archives, Categories, Posts, Tags, Pages</option>
304
+ <option <?php selected('65', $displayorder); ?> value='65' /> 65: Archives, Categories, Tags, Pages, Posts</option>
305
+ <option <?php selected('66', $displayorder); ?> value='66' /> 66: Archives, Categories, Tags, Posts, Pages</option>
306
+ <option <?php selected('67', $displayorder); ?> value='67' /> 67: Archives, Tags, Pages, Posts, Categories</option>
307
+ <option <?php selected('68', $displayorder); ?> value='68' /> 68: Archives, Tags, Pages, Categories, Posts</option>
308
+ <option <?php selected('69', $displayorder); ?> value='69' /> 69: Archives, Tags, Posts, Pages, Categories</option>
309
+ <option <?php selected('70', $displayorder); ?> value='70' /> 70: Archives, Tags, Posts, Categories, Pages</option>
310
+ <option <?php selected('71', $displayorder); ?> value='71' /> 71: Archives, Tags, Categories, Pages, Posts</option>
311
+ <option <?php selected('72', $displayorder); ?> value='72' /> 72: Archives, Tags, Categories, Posts, Pages</option>
312
+ <option <?php selected('73', $displayorder); ?> value='73' /> 73: Categories, Pages, Posts, Archives, Tags</option>
313
+ <option <?php selected('74', $displayorder); ?> value='74' /> 74: Categories, Pages, Posts, Tags, Archives</option>
314
+ <option <?php selected('75', $displayorder); ?> value='75' /> 75: Categories, Pages, Archives, Posts, Tags</option>
315
+ <option <?php selected('76', $displayorder); ?> value='76' /> 76: Categories, Pages, Archives, Tags, Posts</option>
316
+ <option <?php selected('77', $displayorder); ?> value='77' /> 77: Categories, Pages, Tags, Posts, Archives</option>
317
+ <option <?php selected('78', $displayorder); ?> value='78' /> 78: Categories, Pages, Tags, Archives, Posts</option>
318
+ <option <?php selected('79', $displayorder); ?> value='79' /> 79: Categories, Posts, Pages, Archives, Tags</option>
319
+ <option <?php selected('80', $displayorder); ?> value='80' /> 80: Categories, Posts, Pages, Tags, Archives</option>
320
+ <option <?php selected('81', $displayorder); ?> value='81' /> 81: Categories, Posts, Archives, Pages, Tags</option>
321
+ <option <?php selected('82', $displayorder); ?> value='82' /> 82: Categories, Posts, Archives, Tags, Pages</option>
322
+ <option <?php selected('83', $displayorder); ?> value='83' /> 83: Categories, Posts, Tags, Pages, Archives</option>
323
+ <option <?php selected('84', $displayorder); ?> value='84' /> 84: Categories, Posts, Tags, Archives, Pages</option>
324
+ <option <?php selected('85', $displayorder); ?> value='85' /> 85: Categories, Archives, Pages, Posts, Tags</option>
325
+ <option <?php selected('86', $displayorder); ?> value='86' /> 86: Categories, Archives, Pages, Tags, Posts</option>
326
+ <option <?php selected('87', $displayorder); ?> value='87' /> 87: Categories, Archives, Posts, Pages, Tags</option>
327
+ <option <?php selected('88', $displayorder); ?> value='88' /> 88: Categories, Archives, Posts, Tags, Pages</option>
328
+ <option <?php selected('89', $displayorder); ?> value='89' /> 89: Categories, Archives, Tags, Pages, Posts</option>
329
+ <option <?php selected('90', $displayorder); ?> value='90' /> 90: Categories, Archives, Tags, Posts, Pages</option>
330
+ <option <?php selected('91', $displayorder); ?> value='91' /> 91: Categories, Tags, Pages, Posts, Archives</option>
331
+ <option <?php selected('92', $displayorder); ?> value='92' /> 92: Categories, Tags, Pages, Archives, Posts</option>
332
+ <option <?php selected('93', $displayorder); ?> value='93' /> 93: Categories, Tags, Posts, Pages, Archives</option>
333
+ <option <?php selected('94', $displayorder); ?> value='94' /> 94: Categories, Tags, Posts, Archives, Pages</option>
334
+ <option <?php selected('95', $displayorder); ?> value='95' /> 95: Categories, Tags, Archives, Pages, Posts</option>
335
+ <option <?php selected('96', $displayorder); ?> value='96' /> 96: Categories, Tags, Archives, Posts, Pages</option>
336
+ <option <?php selected('97', $displayorder); ?> value='97' /> 97: Tags, Pages, Posts, Archives, Categories</option>
337
+ <option <?php selected('98', $displayorder); ?> value='98' /> 98: Tags, Pages, Posts, Categories, Archives</option>
338
+ <option <?php selected('99', $displayorder); ?> value='99' /> 99: Tags, Pages, Archives, Posts, Categories</option>
339
+ <option <?php selected('100', $displayorder); ?> value='100' /> 100: Tags, Pages, Archives, Categories, Posts</option>
340
+ <option <?php selected('101', $displayorder); ?> value='101' /> 101: Tags, Pages, Categories, Posts, Archives</option>
341
+ <option <?php selected('102', $displayorder); ?> value='102' /> 102: Tags, Pages, Categories, Archives, Posts</option>
342
+ <option <?php selected('103', $displayorder); ?> value='103' /> 103: Tags, Posts, Pages, Archives, Categories</option>
343
+ <option <?php selected('104', $displayorder); ?> value='104' /> 104: Tags, Posts, Pages, Categories, Archives</option>
344
+ <option <?php selected('105', $displayorder); ?> value='105' /> 105: Tags, Posts, Archives, Pages, Categories</option>
345
+ <option <?php selected('106', $displayorder); ?> value='106' /> 106: Tags, Posts, Archives, Categories, Pages</option>
346
+ <option <?php selected('107', $displayorder); ?> value='107' /> 107: Tags, Posts, Categories, Pages, Archives</option>
347
+ <option <?php selected('108', $displayorder); ?> value='108' /> 108: Tags, Posts, Categories, Archives, Pages</option>
348
+ <option <?php selected('109', $displayorder); ?> value='109' /> 109: Tags, Archives, Pages, Posts, Categories</option>
349
+ <option <?php selected('110', $displayorder); ?> value='110' /> 110: Tags, Archives, Pages, Categories, Posts</option>
350
+ <option <?php selected('111', $displayorder); ?> value='111' /> 111: Tags, Archives, Posts, Pages, Categories</option>
351
+ <option <?php selected('112', $displayorder); ?> value='112' /> 112: Tags, Archives, Posts, Categories, Pages</option>
352
+ <option <?php selected('113', $displayorder); ?> value='113' /> 113: Tags, Archives, Categories, Pages, Posts</option>
353
+ <option <?php selected('114', $displayorder); ?> value='114' /> 114: Tags, Archives, Categories, Posts, Pages</option>
354
+ <option <?php selected('115', $displayorder); ?> value='115' /> 115: Tags, Categories, Pages, Posts, Archives</option>
355
+ <option <?php selected('116', $displayorder); ?> value='116' /> 116: Tags, Categories, Pages, Archives, Posts</option>
356
+ <option <?php selected('117', $displayorder); ?> value='117' /> 117: Tags, Categories, Posts, Pages, Archives</option>
357
+ <option <?php selected('118', $displayorder); ?> value='118' /> 118: Tags, Categories, Posts, Archives, Pages</option>
358
+ <option <?php selected('119', $displayorder); ?> value='119' /> 119: Tags, Categories, Archives, Pages, Posts</option>
359
+ <option <?php selected('120', $displayorder); ?> value='120' /> 120: Tags, Categories, Archives, Posts, Pages</option>
360
+ </select></td>
361
+ </tr>
362
+ </table>
363
+
364
+ <div class="submit">
365
+ <input type="submit" name="info_update" value="Update Options" />
366
+ </div>
367
+ </form>
368
+ </div><?php
369
+ }
370
+
371
+ function remove_style(&$item, $key) {
372
+ $item = preg_replace('/ style=\'font-size: .*;\'/', '', $item);
373
+ }
374
+
375
+ // To replace the <!--wp-realtime-sitemap--> with the actual sitemap
376
+ function wp_realtime_sitemap($text) {
377
+ global $wpdb, $table_prefix;
378
+
379
+ // Only perform plugin functionality if post/page text has <!--wp-realtime-sitemap-->|
380
+ if (preg_match('|<!--wp-realtime-sitemap-->|', $text)) {
381
+
382
+ // Get option values
383
+ $orderby = get_option('wp_realtime_sitemap_orderby');
384
+ $showprivate = get_option('wp_realtime_sitemap_showprivate');
385
+ $showpages = get_option('wp_realtime_sitemap_showpages');
386
+ $showposts = get_option('wp_realtime_sitemap_showposts');
387
+ $showarchives = get_option('wp_realtime_sitemap_showarchives');
388
+ $showcategories = get_option('wp_realtime_sitemap_showcategories');
389
+ $showcategoriesastc = get_option('wp_realtime_sitemap_showcategoriesastc');
390
+ $showtags = get_option('wp_realtime_sitemap_showtags');
391
+ $showtagsastc = get_option('wp_realtime_sitemap_showtagsastc');
392
+ $displayorder = get_option('wp_realtime_sitemap_displayorder');
393
+
394
+ // Do order by
395
+ switch ($orderby) {
396
+ case 'datedesc':
397
+ $sqlorder = 'ORDER BY `post_date` DESC';
398
+ break;
399
+ case 'dateasc':
400
+ $sqlorder = 'ORDER BY `post_date`';
401
+ break;
402
+ case 'alphadesc':
403
+ $sqlorder = 'ORDER BY `post_title` DESC';
404
+ break;
405
+ case 'alphaasc':
406
+ $sqlorder = 'ORDER BY `post_title`';
407
+ break;
408
+ }
409
+
410
+ // Pages: Yes/No?
411
+ if ($showpages != 'no') {
412
+ if ($orderby == 'datedesc' || $orderby == 'dateasc')
413
+ $sort_column = 'post_date';
414
+
415
+ if ($orderby == 'alphadesc' || $orderby == 'alphaasc')
416
+ $sort_column = 'post_title';
417
+
418
+ if ($orderby == 'datedesc' || $orderby == 'alphadesc')
419
+ $sort_order = 'DESC';
420
+
421
+ if ($orderby == 'dateasc' || $orderby == 'alphaasc')
422
+ $sort_order = 'ASC';
423
+
424
+ $pages = '<h3>Pages</h3>';
425
+ $pages .= '<ul>' . wp_list_pages(array('sort_column' => $sort_column, 'sort_order' => $sort_order, 'title_li' => '', 'echo' => '0')) . '</ul>';
426
+ }
427
+
428
+ // Posts: Yes/No?
429
+ if ($showposts != 'no') {
430
+ // Show private: Yes/No?
431
+ if ($showprivate == 'yes') {
432
+ $sqlwhere = 'WHERE `post_type`="post" ';
433
+ } else {
434
+ $sqlwhere = 'WHERE `post_type`="post" AND `post_status`="publish" ';
435
+ }
436
+
437
+ $sqlposts = 'SELECT * FROM `' . $table_prefix . 'posts` ' . $sqlwhere . $sqlorder;
438
+ $allposts = $wpdb->get_results($sqlposts);
439
+
440
+ if (count($allposts) == 0) {
441
+ $posts = '';
442
+ } else {
443
+ $posts = '<h3>Posts</h3><ul>';
444
+
445
+ foreach($allposts as $thepost) {
446
+ $permalink = get_permalink($thepost->ID);
447
+ $posts .= '<li><a href="' . $permalink . '">' . $thepost->post_title . '</a></li>';
448
+ }
449
+
450
+ $posts .= '</ul>';
451
+ }
452
+ }
453
+
454
+ if ($showarchives != 'no') {
455
+ $archives = '<h3>Archives</h3><ul>' . wp_get_archives('type=monthly&echo=0') . '</ul>';
456
+ }
457
+
458
+ if ($showcategories != 'no') {
459
+ $categories = '<h3>Categories</h3>';
460
+
461
+ if ($showcategoriesastc != 'no') {
462
+ $categories .= wp_tag_cloud(array('format' => 'flat', 'separator' => ' ', 'taxonomy' => 'category', 'echo' => '0'));
463
+ } else {
464
+ $categories .= preg_replace('/ style=\'font-size: .*;\'/', '', wp_tag_cloud(array('format' => 'list', 'taxonomy' => 'category', 'echo' => '0')));
465
+ }
466
+ }
467
+
468
+ if ($showtags != 'no') {
469
+ $tags = '<h3>Tags</h3>';
470
+
471
+ if ($showtagsastc != 'no') {
472
+ $tags .= wp_tag_cloud(array('format' => 'flat', 'separator' => ' ', 'echo' => '0'));
473
+ } else {
474
+ $tags .= preg_replace('/ style=\'font-size: .*;\'/', '', wp_tag_cloud(array('format' => 'list', 'echo' => '0')));
475
+ }
476
+ }
477
+
478
+ // 1: Pages, Posts, Archives, Categories, Tags
479
+ if ($displayorder == 1)
480
+ $data = $pages . $posts . $archives . $categories . $tags;
481
+
482
+ // 2: Pages, Posts, Archives, Tags, Categories
483
+ if ($displayorder == 2)
484
+ $data = $pages . $posts . $archives . $tags . $categories;
485
+
486
+ // 3: Pages, Posts, Categories, Archives, Tags
487
+ if ($displayorder == 3)
488
+ $data = $pages . $posts . $categories . $archives . $tags;
489
+
490
+ // 4: Pages, Posts, Categories, Tags, Archives
491
+ if ($displayorder == 4)
492
+ $data = $pages . $posts . $categories . $tags . $archives;
493
+
494
+ // 5: Pages, Posts, Tags, Archives, Categories
495
+ if ($displayorder == 5)
496
+ $data = $pages . $posts . $tags . $archives . $categories;
497
+
498
+ // 6: Pages, Posts, Tags, Categories, Archives
499
+ if ($displayorder == 6)
500
+ $data = $pages . $posts . $tags . $categories . $archives;
501
+
502
+ // 7: Pages, Archives, Posts, Categories, Tags
503
+ if ($displayorder == 7)
504
+ $data = $pages . $archives . $posts . $categories . $tags;
505
+
506
+ // 8: Pages, Archives, Posts, Tags, Categories
507
+ if ($displayorder == 8)
508
+ $data = $pages . $archives . $posts . $tags . $categories;
509
+
510
+ // 9: Pages, Archives, Categories, Posts, Tags
511
+ if ($displayorder == 9)
512
+ $data = $pages . $archives . $categories . $posts . $tags;
513
+
514
+ // 10: Pages, Archives, Categories, Tags, Posts
515
+ if ($displayorder == 10)
516
+ $data = $pages . $archives . $categories . $tags . $posts;
517
+
518
+ // 11: Pages, Archives, Tags, Posts, Categories
519
+ if ($displayorder == 11)
520
+ $data = $pages . $archives . $tags . $posts . $categories;
521
+
522
+ // 12: Pages, Archives, Tags, Categories, Posts
523
+ if ($displayorder == 12)
524
+ $data = $pages . $archives . $tags . $categories . $posts;
525
+
526
+ // 13: Pages, Categories, Posts, Archives, Tags
527
+ if ($displayorder == 13)
528
+ $data = $pages . $categories . $posts . $archives . $tags;
529
+
530
+ // 14: Pages, Categories, Posts, Tags, Archives
531
+ if ($displayorder == 14)
532
+ $data = $pages . $categories . $posts . $tags . $archives;
533
+
534
+ // 15: Pages, Categories, Archives, Posts, Tags
535
+ if ($displayorder == 15)
536
+ $data = $pages . $categories . $archives . $posts . $tags;
537
+
538
+ // 16: Pages, Categories, Archives, Tags, Posts
539
+ if ($displayorder == 16)
540
+ $data = $pages . $categories . $archives . $tags . $posts;
541
+
542
+ // 17: Pages, Categories, Tags, Posts, Archives
543
+ if ($displayorder == 17)
544
+ $data = $pages . $categories . $tags . $posts . $archives;
545
+
546
+ // 18: Pages, Categories, Tags, Archives, Posts
547
+ if ($displayorder == 18)
548
+ $data = $pages . $categories . $tags . $archives . $posts;
549
+
550
+ // 19: Pages, Tags, Posts, Archives, Categories
551
+ if ($displayorder == 19)
552
+ $data = $pages . $tags . $posts . $archives . $categories;
553
+
554
+ // 20: Pages, Tags, Posts, Categories, Archives
555
+ if ($displayorder == 20)
556
+ $data = $pages . $tags . $posts . $categories . $archives;
557
+
558
+ // 21: Pages, Tags, Archives, Posts, Categories
559
+ if ($displayorder == 21)
560
+ $data = $pages . $tags . $archives . $posts . $categories;
561
+
562
+ // 22: Pages, Tags, Archives, Categories, Posts
563
+ if ($displayorder == 22)
564
+ $data = $pages . $tags . $archives . $categories . $posts;
565
+
566
+ // 23: Pages, Tags, Categories, Posts, Archives
567
+ if ($displayorder == 23)
568
+ $data = $pages . $tags . $categories . $posts . $archives;
569
+
570
+ // 24: Pages, Tags, Categories, Archives, Posts
571
+ if ($displayorder == 24)
572
+ $data = $pages . $tags . $categories . $archives . $posts;
573
+
574
+ // 25: Posts, Pages, Archives, Categories, Tags
575
+ if ($displayorder == 25)
576
+ $data = $posts . $pages . $archives . $categories . $tags;
577
+
578
+ // 26: Posts, Pages, Archives, Tags, Categories
579
+ if ($displayorder == 26)
580
+ $data = $posts . $pages . $archives . $tags . $categories;
581
+
582
+ // 27: Posts, Pages, Categories, Archives, Tags
583
+ if ($displayorder == 27)
584
+ $data = $posts . $pages . $categories . $archives . $tags;
585
+
586
+ // 28: Posts, Pages, Categories, Tags, Archives
587
+ if ($displayorder == 28)
588
+ $data = $posts . $pages . $categories . $tags . $archives;
589
+
590
+ // 29: Posts, Pages, Tags, Archives, Categories
591
+ if ($displayorder == 29)
592
+ $data = $posts . $pages . $tags . $archives . $categories;
593
+
594
+ // 30: Posts, Pages, Tags, Categories, Archives
595
+ if ($displayorder == 30)
596
+ $data = $posts . $pages . $tags . $categories . $archives;
597
+
598
+ // 31: Posts, Archives, Pages, Categories, Tags
599
+ if ($displayorder == 31)
600
+ $data = $posts . $archives . $pages . $categories . $tags;
601
+
602
+ // 32: Posts, Archives, Pages, Tags, Categories
603
+ if ($displayorder == 32)
604
+ $data = $posts . $archives . $pages . $tags . $categories;
605
+
606
+ // 33: Posts, Archives, Categories, Pages, Tags
607
+ if ($displayorder == 33)
608
+ $data = $posts . $archives . $categories . $pages . $tags;
609
+
610
+ // 34: Posts, Archives, Categories, Tags, Pages
611
+ if ($displayorder == 34)
612
+ $data = $posts . $archives . $categories . $tags . $pages;
613
+
614
+ // 35: Posts, Archives, Tags, Pages, Categories
615
+ if ($displayorder == 35)
616
+ $data = $posts . $archives . $tags . $pages . $categories;
617
+
618
+ // 36: Posts, Archives, Tags, Categories, Pages
619
+ if ($displayorder == 36)
620
+ $data = $posts . $archives . $tags . $categories . $pages;
621
+
622
+ // 37: Posts, Categories, Pages, Archives, Tags
623
+ if ($displayorder == 37)
624
+ $data = $posts . $categories . $pages . $archives . $tags;
625
+
626
+ // 38: Posts, Categories, Pages, Tags, Archives
627
+ if ($displayorder == 38)
628
+ $data = $posts . $categories . $pages . $tags . $archives;
629
+
630
+ // 39: Posts, Categories, Archives, Pages, Tags
631
+ if ($displayorder == 39)
632
+ $data = $posts . $categories . $archives . $pages . $tags;
633
+
634
+ // 40: Posts, Categories, Archives, Tags, Pages
635
+ if ($displayorder == 40)
636
+ $data = $posts . $categories . $archives . $tags . $pages;
637
+
638
+ // 41: Posts, Categories, Tags, Pages, Archives
639
+ if ($displayorder == 41)
640
+ $data = $posts . $categories . $tags . $pages . $archives;
641
+
642
+ // 42: Posts, Categories, Tags, Archives, Pages
643
+ if ($displayorder == 42)
644
+ $data = $posts . $categories . $tags . $archives . $pages;
645
+
646
+ // 43: Posts, Tags, Pages, Archives, Categories
647
+ if ($displayorder == 43)
648
+ $data = $posts . $tags . $pages . $archives . $categories;
649
+
650
+ // 44: Posts, Tags, Pages, Categories, Archives
651
+ if ($displayorder == 44)
652
+ $data = $posts . $tags . $pages . $categories . $archives;
653
+
654
+ // 45: Posts, Tags, Archives, Pages, Categories
655
+ if ($displayorder == 45)
656
+ $data = $posts . $tags . $archives . $pages . $categories;
657
+
658
+ // 46: Posts, Tags, Archives, Categories, Pages
659
+ if ($displayorder == 46)
660
+ $data = $posts . $tags . $archives . $categories . $pages;
661
+
662
+ // 47: Posts, Tags, Categories, Pages, Archives
663
+ if ($displayorder == 47)
664
+ $data = $posts . $tags . $categories . $pages . $archives;
665
+
666
+ // 48: Posts, Tags, Categories, Archives, Pages
667
+ if ($displayorder == 48)
668
+ $data = $posts . $tags . $categories . $archives . $pages;
669
+
670
+ // 49: Archives, Pages, Posts, Categories, Tags
671
+ if ($displayorder == 49)
672
+ $data = $archives . $pages . $posts . $categories . $tags;
673
+
674
+ // 50: Archives, Pages, Posts, Tags, Categories
675
+ if ($displayorder == 50)
676
+ $data = $archives . $pages . $posts . $tags . $categories;
677
+
678
+ // 51: Archives, Pages, Categories, Posts, Tags
679
+ if ($displayorder == 51)
680
+ $data = $archives . $pages . $categories . $posts . $tags;
681
+
682
+ // 52: Archives, Pages, Categories, Tags, Posts
683
+ if ($displayorder == 52)
684
+ $data = $archives . $pages . $categories . $tags . $posts;
685
+
686
+ // 53: Archives, Pages, Tags, Posts, Categories
687
+ if ($displayorder == 53)
688
+ $data = $archives . $pages . $tags . $posts . $categories;
689
+
690
+ // 54: Archives, Pages, Tags, Categories, Posts
691
+ if ($displayorder == 54)
692
+ $data = $archives . $pages . $tags . $categories . $posts;
693
+
694
+ // 55: Archives, Posts, Pages, Categories, Tags
695
+ if ($displayorder == 55)
696
+ $data = $archives . $posts . $pages . $categories . $tags;
697
+
698
+ // 56: Archives, Posts, Pages, Tags, Categories
699
+ if ($displayorder == 56)
700
+ $data = $archives . $posts . $pages . $tags . $categories;
701
+
702
+ // 57: Archives, Posts, Categories, Pages, Tags
703
+ if ($displayorder == 57)
704
+ $data = $archives . $posts . $categories . $pages . $tags;
705
+
706
+ // 58: Archives, Posts, Categories, Tags, Pages
707
+ if ($displayorder == 58)
708
+ $data = $archives . $posts . $categories . $tags . $pages;
709
+
710
+ // 59: Archives, Posts, Tags, Pages, Categories
711
+ if ($displayorder == 59)
712
+ $data = $archives . $posts . $tags . $pages . $categories;
713
+
714
+ // 60: Archives, Posts, Tags, Categories, Pages
715
+ if ($displayorder == 60)
716
+ $data = $archives . $posts . $tags . $categories . $pages;
717
+
718
+ // 61: Archives, Categories, Pages, Posts, Tags
719
+ if ($displayorder == 61)
720
+ $data = $archives . $categories . $pages . $posts . $tags;
721
+
722
+ // 62: Archives, Categories, Pages, Tags, Posts
723
+ if ($displayorder == 62)
724
+ $data = $archives . $categories . $pages . $tags . $posts;
725
+
726
+ // 63: Archives, Categories, Posts, Pages, Tags
727
+ if ($displayorder == 63)
728
+ $data = $archives . $categories . $posts . $pages . $tags;
729
+
730
+ // 64: Archives, Categories, Posts, Tags, Pages
731
+ if ($displayorder == 64)
732
+ $data = $archives . $categories . $posts . $tags . $pages;
733
+
734
+ // 65: Archives, Categories, Tags, Pages, Posts
735
+ if ($displayorder == 65)
736
+ $data = $archives . $categories . $tags . $pages . $posts;
737
+
738
+ // 66: Archives, Categories, Tags, Posts, Pages
739
+ if ($displayorder == 66)
740
+ $data = $archives . $categories . $tags . $posts . $pages;
741
+
742
+ // 67: Archives, Tags, Pages, Posts, Categories
743
+ if ($displayorder == 67)
744
+ $data = $archives . $tags . $pages . $posts . $categories;
745
+
746
+ // 68: Archives, Tags, Pages, Categories, Posts
747
+ if ($displayorder == 68)
748
+ $data = $archives . $tags . $pages . $categories . $posts;
749
+
750
+ // 69: Archives, Tags, Posts, Pages, Categories
751
+ if ($displayorder == 69)
752
+ $data = $archives . $tags . $posts . $pages . $categories;
753
+
754
+ // 70: Archives, Tags, Posts, Categories, Pages
755
+ if ($displayorder == 70)
756
+ $data = $archives . $tags . $posts . $categories . $pages;
757
+
758
+ // 71: Archives, Tags, Categories, Pages, Posts
759
+ if ($displayorder == 71)
760
+ $data = $archives . $tags . $categories . $pages . $posts;
761
+
762
+ // 72: Archives, Tags, Categories, Posts, Pages
763
+ if ($displayorder == 72)
764
+ $data = $archives . $tags . $categories . $posts . $pages;
765
+
766
+ // 73: Categories, Pages, Posts, Archives, Tags
767
+ if ($displayorder == 73)
768
+ $data = $categories . $pages . $posts . $archives . $tags;
769
+
770
+ // 74: Categories, Pages, Posts, Tags, Archives
771
+ if ($displayorder == 74)
772
+ $data = $categories . $pages . $posts . $tags . $archives;
773
+
774
+ // 75: Categories, Pages, Archives, Posts, Tags
775
+ if ($displayorder == 75)
776
+ $data = $categories . $pages . $archives . $posts . $tags;
777
+
778
+ // 76: Categories, Pages, Archives, Tags, Posts
779
+ if ($displayorder == 76)
780
+ $data = $categories . $pages . $archives . $tags . $posts;
781
+
782
+ // 77: Categories, Pages, Tags, Posts, Archives
783
+ if ($displayorder == 77)
784
+ $data = $categories . $pages . $tags . $posts . $archives;
785
+
786
+ // 78: Categories, Pages, Tags, Archives, Posts
787
+ if ($displayorder == 78)
788
+ $data = $categories . $pages . $tags . $archives . $posts;
789
+
790
+ // 79: Categories, Posts, Pages, Archives, Tags
791
+ if ($displayorder == 79)
792
+ $data = $categories . $posts . $pages . $archives . $tags;
793
+
794
+ // 80: Categories, Posts, Pages, Tags, Archives
795
+ if ($displayorder == 80)
796
+ $data = $categories . $posts . $pages . $tags . $archives;
797
+
798
+ // 81: Categories, Posts, Archives, Pages, Tags
799
+ if ($displayorder == 81)
800
+ $data = $categories . $posts . $archives . $pages . $tags;
801
+
802
+ // 82: Categories, Posts, Archives, Tags, Pages
803
+ if ($displayorder == 82)
804
+ $data = $categories . $posts . $archives . $tags . $pages;
805
+
806
+ // 83: Categories, Posts, Tags, Pages, Archives
807
+ if ($displayorder == 83)
808
+ $data = $categories . $posts . $tags . $pages . $archives;
809
+
810
+ // 84: Categories, Posts, Tags, Archives, Pages
811
+ if ($displayorder == 84)
812
+ $data = $categories . $posts . $tags . $archives . $pages;
813
+
814
+ // 85: Categories, Archives, Pages, Posts, Tags
815
+ if ($displayorder == 85)
816
+ $data = $categories . $archives . $pages . $posts . $tags;
817
+
818
+ // 86: Categories, Archives, Pages, Tags, Posts
819
+ if ($displayorder == 86)
820
+ $data = $categories . $archives . $pages . $tags . $posts;
821
+
822
+ // 87: Categories, Archives, Posts, Pages, Tags
823
+ if ($displayorder == 87)
824
+ $data = $categories . $archives . $posts . $pages . $tags;
825
+
826
+ // 88: Categories, Archives, Posts, Tags, Pages
827
+ if ($displayorder == 88)
828
+ $data = $categories . $archives . $posts . $tags . $pages;
829
+
830
+ // 89: Categories, Archives, Tags, Pages, Posts
831
+ if ($displayorder == 89)
832
+ $data = $categories . $archives . $tags . $pages . $posts;
833
+
834
+ // 90: Categories, Archives, Tags, Posts, Pages
835
+ if ($displayorder == 90)
836
+ $data = $categories . $archives . $tags . $posts . $pages;
837
+
838
+ // 91: Categories, Tags, Pages, Posts, Archives
839
+ if ($displayorder == 91)
840
+ $data = $categories . $tags . $pages . $posts . $archives;
841
+
842
+ // 92: Categories, Tags, Pages, Archives, Posts
843
+ if ($displayorder == 92)
844
+ $data = $categories . $tags . $pages . $archives . $posts;
845
+
846
+ // 93: Categories, Tags, Posts, Pages, Archives
847
+ if ($displayorder == 93)
848
+ $data = $categories . $tags . $posts . $pages . $archives;
849
+
850
+ // 94: Categories, Tags, Posts, Archives, Pages
851
+ if ($displayorder == 94)
852
+ $data = $categories . $tags . $posts . $archives . $pages;
853
+
854
+ // 95: Categories, Tags, Archives, Pages, Posts
855
+ if ($displayorder == 95)
856
+ $data = $categories . $tags . $archives . $pages . $posts;
857
+
858
+ // 96: Categories, Tags, Archives, Posts, Pages
859
+ if ($displayorder == 96)
860
+ $data = $categories . $tags . $archives . $posts . $pages;
861
+
862
+ // 97: Tags, Pages, Posts, Archives, Categories
863
+ if ($displayorder == 97)
864
+ $data = $tags . $pages . $posts . $archives . $categories;
865
+
866
+ // 98: Tags, Pages, Posts, Categories, Archives
867
+ if ($displayorder == 98)
868
+ $data = $tags . $pages . $posts . $categories . $archives;
869
+
870
+ // 99: Tags, Pages, Archives, Posts, Categories
871
+ if ($displayorder == 99)
872
+ $data = $tags . $pages . $archives . $posts . $categories;
873
+
874
+ // 100: Tags, Pages, Archives, Categories, Posts
875
+ if ($displayorder == 100)
876
+ $data = $tags . $pages . $archives . $categories . $posts;
877
+
878
+ // 101: Tags, Pages, Categories, Posts, Archives
879
+ if ($displayorder == 101)
880
+ $data = $tags . $pages . $categories . $posts . $archives;
881
+
882
+ // 102: Tags, Pages, Categories, Archives, Posts
883
+ if ($displayorder == 102)
884
+ $data = $tags . $pages . $categories . $archives . $posts;
885
+
886
+ // 103: Tags, Posts, Pages, Archives, Categories
887
+ if ($displayorder == 103)
888
+ $data = $tags . $posts . $pages . $archives . $categories;
889
+
890
+ // 104: Tags, Posts, Pages, Categories, Archives
891
+ if ($displayorder == 104)
892
+ $data = $tags . $posts . $pages . $categories . $archives;
893
+
894
+ // 105: Tags, Posts, Archives, Pages, Categories
895
+ if ($displayorder == 105)
896
+ $data = $tags . $posts . $archives . $pages . $categories;
897
+
898
+ // 106: Tags, Posts, Archives, Categories, Pages
899
+ if ($displayorder == 106)
900
+ $data = $tags . $posts . $archives . $categories . $pages;
901
+
902
+ // 107: Tags, Posts, Categories, Pages, Archives
903
+ if ($displayorder == 107)
904
+ $data = $tags . $posts . $categories . $pages . $archives;
905
+
906
+ // 108: Tags, Posts, Categories, Archives, Pages
907
+ if ($displayorder == 108)
908
+ $data = $tags . $posts . $categories . $archives . $pages;
909
+
910
+ // 109: Tags, Archives, Pages, Posts, Categories
911
+ if ($displayorder == 109)
912
+ $data = $tags . $archives . $pages . $posts . $categories;
913
+
914
+ // 110: Tags, Archives, Pages, Categories, Posts
915
+ if ($displayorder == 110)
916
+ $data = $tags . $archives . $pages . $categories . $posts;
917
+
918
+ // 111: Tags, Archives, Posts, Pages, Categories
919
+ if ($displayorder == 111)
920
+ $data = $tags . $archives . $posts . $pages . $categories;
921
+
922
+ // 112: Tags, Archives, Posts, Categories, Pages
923
+ if ($displayorder == 112)
924
+ $data = $tags . $archives . $posts . $categories . $pages;
925
+
926
+ // 113: Tags, Archives, Categories, Pages, Posts
927
+ if ($displayorder == 113)
928
+ $data = $tags . $archives . $categories . $pages . $posts;
929
+
930
+ // 114: Tags, Archives, Categories, Posts, Pages
931
+ if ($displayorder == 114)
932
+ $data = $tags . $archives . $categories . $posts . $pages;
933
+
934
+ // 115: Tags, Categories, Pages, Posts, Archives
935
+ if ($displayorder == 115)
936
+ $data = $tags . $categories . $pages . $posts . $archives;
937
+
938
+ // 116: Tags, Categories, Pages, Archives, Posts
939
+ if ($displayorder == 116)
940
+ $data = $tags . $categories . $pages . $archives . $posts;
941
+
942
+ // 117: Tags, Categories, Posts, Pages, Archives
943
+ if ($displayorder == 117)
944
+ $data = $tags . $categories . $posts . $pages . $archives;
945
+
946
+ // 118: Tags, Categories, Posts, Archives, Pages
947
+ if ($displayorder == 118)
948
+ $data = $tags . $categories . $posts . $archives . $pages;
949
+
950
+ // 119: Tags, Categories, Archives, Pages, Posts
951
+ if ($displayorder == 119)
952
+ $data = $tags . $categories . $archives . $pages . $posts;
953
+
954
+ // 120: Tags, Categories, Archives, Posts, Pages
955
+ if ($displayorder == 120)
956
+ $data = $tags . $categories . $archives . $posts . $pages;
957
+
958
+ $text = preg_replace("|<!--wp-realtime-sitemap-->|", $data, $text);
959
+ }
960
+
961
+ return $text;
962
+
963
+ } // End wp_realtime_sitemap()
964
+
965
+ add_filter('the_content', 'wp_realtime_sitemap', 2);
966
+
967
  ?>