-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwp-locations.php
37 lines (37 loc) · 1.06 KB
/
wp-locations.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?php $blog = 1; // enter your blog's ID
header('Content-type: text/xml');
include('wp-blog-header.php');
?><?php echo "<?xml version=\"1.0\"?".">\n"; ?>
<travels>
<?php
$start = count($posts)-1;
for ($i = $start; $i >= 0; $i--) {
$post = $posts[$i];
start_wp();
if ((get_Lon() != null) && (get_Lon > -360) && (get_Lon() < 360 )) {
?>
<location arrival="<?php the_date_xml() ?>">
<name><?php the_title_rss() ?></name>
<latitude><?php print_Lat() ?></latitude>
<longitude><?php print_Lon() ?></longitude>
<?php
if (get_settings('rss_use_excerpt')) {
?>
<note><?php the_content_rss('', 0, '', get_settings('rss_excerpt_length'), get_settings('rss_encoded_html')) ?>
</note>
<?php
} else { // use content
?>
<note><?php the_excerpt_rss('', 0, '', get_settings('rss_excerpt_length'), get_settings('rss_encoded_html')) ?></note>
<?php
} // end else use content
?>
<url><?php permalink_single_rss() ?></url>
</location>
<?php
} // end if lon valid
?>
<?php
} // end loop
?>
</travels>