} else {
                if (test_param('name')) {
                    $_post_id = -1;
                    $_post_name = get_param('name');
                } else {
                    $_post_id = 0;
                    $_post_name = '';
                }
            }
            $lastcommentdate_s = mysql2date('Y-m-d H:i:s', get_lastcommentmodified($_post_id, $_post_name));
            $lastcommentdate = mysql2date('U', $lastcommentdate_s);
            static_content_header($lastcommentdate);
        } else {
            $lastpostdate_s = mysql2date('Y-m-d H:i:s', get_lastpostmodified());
            $lastpostdate = mysql2date('U', $lastpostdate_s);
            static_content_header($lastpostdate);
        }
    }
}
/* Getting settings from db */
if (!empty($GLOBALS['doing_rss'])) {
    $GLOBALS['posts_per_page'] = get_settings('posts_per_rss');
}
if ($GLOBALS['pagenow'] == 'nkarchives.php' && !empty($GLOBALS['wp_arc_posts_per_page'])) {
    $GLOBALS['posts_per_page'] = $GLOBALS['wp_arc_posts_per_page'];
}
if (empty($GLOBALS['posts_per_page'])) {
    $GLOBALS['posts_per_page'] = get_settings('posts_per_page');
}
$GLOBALS['what_to_show'] = get_settings('what_to_show');
/* First let's clear some variables */
예제 #2
0
<?php

$blog = 1;
// enter your blog's ID
require_once dirname(__FILE__) . '/wp-config.php';
if (!get_settings('xmlrpc_autodetect')) {
    @header('HTTP/1.x 404 Not Found');
    echo "404 Not Found";
    exit;
}
error_reporting(E_ERROR);
static_content_header(filemtime(__FILE__));
header('Content-type: text/xml', true);
echo '<?xml version="1.0"?>';
?>
<!-- generator="wordpress/<?php 
echo $wp_version;
?>
" -->
<rsd version="1.0" xmlns="http://archipelago.phrasewise.com/rsd">
  <service>
    <engineName>WordPress for XOOPS</engineName> 
    <engineLink>http://www.kowa.org/</engineLink>
    <homePageLink><?php 
bloginfo_rss('url');
?>
</homePageLink>
    <apis>
      <api name="MetaWeblog" preferred="true" apiLink="<?php 
echo wp_siteurl() . '/' . get_settings('xmlrpc_filename');
?>
$GLOBALS['blog'] = 1;
$GLOBALS['doing_rss'] = 1;
require_once dirname(__FILE__) . '/wp-config.php';
error_reporting(E_ERROR);
init_param('GET', 'num', 'integer');
if (test_param('num')) {
    $showposts = get_param('num');
}
if (!empty($_GET['p'])) {
    $_post_id = intval($_GET['p']);
} else {
    $_post_id = 0;
}
$lastcommentdate_s = mysql2date('Y-m-d H:i:s', get_lastcommentmodified($_post_id));
$lastcommentdate = mysql2date('U', $lastcommentdate_s);
static_content_header($lastcommentdate);
require_once 'wp-blog-header.php';
header('Content-type: application/xml');
echo '<?xml version="1.0" encoding="' . wp_get_rss_charset() . '"?' . '>';
?>
<!-- generator="wordpress/<?php 
echo $wp_version;
?>
" -->
<rss version="2.0" 
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:admin="http://webns.net/mvcb/"
	xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
<?php

$GLOBALS['blog'] = 1;
$cur_PATH = $_SERVER['SCRIPT_FILENAME'];
require dirname(__FILE__) . '/wp-config.php';
error_reporting(E_ERROR);
header('Content-type: text/css; charset=' . $GLOBALS['blog_charset']);
static_content_header(filemtime(get_custom_path('wp-blocks.css.php')));
$_SERVER['SCRIPT_FILENAME'] = 'XXXXX';
//trick for force reading some style and keep comatibility.
echo block_style_get(false, false);
exit;