| 1 |
<?php |
|---|
| 2 |
define('WP_USE_THEMES', true); |
|---|
| 3 |
$blog='NULL'; |
|---|
| 4 |
$blogdata='NULL'; |
|---|
| 5 |
$optiondomain = 'system'; |
|---|
| 6 |
$_REQUEST['b']='system'; |
|---|
| 7 |
|
|---|
| 8 |
require('private.php'); |
|---|
| 9 |
require(CONFIGPATH . 'wp-config.php'); |
|---|
| 10 |
|
|---|
| 11 |
$site_title = get_settings('site_title'); |
|---|
| 12 |
|
|---|
| 13 |
$posts = get_recent_posts(10); |
|---|
| 14 |
|
|---|
| 15 |
echo '<?xml version="1.0" encoding="utf-8"?>'; |
|---|
| 16 |
$cdata_open = '<![CDATA['; |
|---|
| 17 |
$cdata_close = ']]>'; |
|---|
| 18 |
|
|---|
| 19 |
?> |
|---|
| 20 |
<feed |
|---|
| 21 |
xmlns="http://www.w3.org/2005/Atom" |
|---|
| 22 |
xmlns:thr="http://purl.org/syndication/thread/1.0" |
|---|
| 23 |
xml:lang="en" |
|---|
| 24 |
xml:base="<?php echo LURL ?>/atom.php" |
|---|
| 25 |
> |
|---|
| 26 |
<title type="text"><?php echo $site_title ?></title> |
|---|
| 27 |
|
|---|
| 28 |
<updated><?php echo gmdate('Y-m-d\TH:i:s\Z') ?></updated> |
|---|
| 29 |
<generator uri="http://lyceum.ibiblio.org/" version="<?php echo $wp_version ?>">Lyceum</generator> |
|---|
| 30 |
|
|---|
| 31 |
<link rel="alternate" type="text/html" href="<?php echo LURL ?>" /> |
|---|
| 32 |
<id><?php echo LURL ?>/feed/atom.php/</id> |
|---|
| 33 |
<link rel="self" type="application/atom+xml" href="<?php echo LURL ?>/atom.php" /> |
|---|
| 34 |
|
|---|
| 35 |
<?php foreach ($posts as $p): ?> |
|---|
| 36 |
<entry> |
|---|
| 37 |
<author> |
|---|
| 38 |
<name><?php echo $p->author_nickname ?></name> |
|---|
| 39 |
<uri><?php echo $p->siteurl ?></uri> |
|---|
| 40 |
</author> |
|---|
| 41 |
<title type="html"><?php echo $cdata_open . $p->post_title . $cdata_close ?></title> |
|---|
| 42 |
<link rel="alternate" type="text/html" href="<?php echo $p->guid; ?>" /> |
|---|
| 43 |
<id><?php echo $p->guid; ?></id> |
|---|
| 44 |
<published><?php echo rfc3339($p->post_date_gmt) ?></published> |
|---|
| 45 |
<updated><?php echo rfc3339($p->post_modified_gmt) ?></updated> |
|---|
| 46 |
<?php if ($p->post_excerpt) : ?> |
|---|
| 47 |
<summary type="html"><?php echo $cdata_open . $p->post_excerpt . $cdata_close ?></summary> |
|---|
| 48 |
<?php endif; ?> |
|---|
| 49 |
<content type="html" xml:base="<?php echo $p->guid; ?>"><?php echo $cdata_open . $p->post_content . $cdata_close ?></content> |
|---|
| 50 |
</entry> |
|---|
| 51 |
<?php endforeach ?> |
|---|
| 52 |
</feed> |
|---|