RSS importer tweaks.
git-svn-id: http://svn.automattic.com/wordpress/trunk@2868 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
da14f8881c
commit
dc756855d9
|
@ -24,18 +24,13 @@ class RSS_Import {
|
||||||
}
|
}
|
||||||
|
|
||||||
function greet() {
|
function greet() {
|
||||||
$this->header();
|
_e("<p>Howdy! This importer allows you to extract posts from any RSS 2.0 file into your blog. This is useful if you want to import your posts from a system that is not handled by a custom import tool. To get started you must edit the following line in this file (<code>import/rss.php</code>) </p>
|
||||||
?>
|
|
||||||
<p>Howdy! This importer allows you to extract posts from any RSS 2.0 file into your blog. This is useful if you want to import your posts from a system that is not handled by a custom import tool. To get started you must edit the following line in this file (<code>import/rss.php</code>) </p>
|
|
||||||
<p><code>define('RSSFILE', '');</code></p>
|
<p><code>define('RSSFILE', '');</code></p>
|
||||||
<p>You want to define where the RSS file we'll be working with is, for example: </p>
|
<p>You want to define where the RSS file we'll be working with is, for example: </p>
|
||||||
<p><code>define('RSSFILE', 'rss.xml');</code></p>
|
<p><code>define('RSSFILE', 'rss.xml');</code></p>
|
||||||
<p>You have to do this manually for security reasons. When you're done reload this page and we'll take you to the next step.</p>
|
<p>You have to do this manually for security reasons. When you're done reload this page and we'll take you to the next step.</p>");
|
||||||
<?php if ('' != RSSFILE) : ?>
|
if ('' != RSSFILE)
|
||||||
<a href="admin.php?import=rss&step=1">Begin RSS Import »</a>
|
echo '<a href="admin.php?import=rss&step=1">' . __('Begin RSS Import »') . '</a>';
|
||||||
<?php
|
|
||||||
endif;
|
|
||||||
$this->footer();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function get_posts() {
|
function get_posts() {
|
||||||
|
@ -154,6 +149,8 @@ class RSS_Import {
|
||||||
else
|
else
|
||||||
$step = (int) $_GET['step'];
|
$step = (int) $_GET['step'];
|
||||||
|
|
||||||
|
$this->header();
|
||||||
|
|
||||||
switch ($step) {
|
switch ($step) {
|
||||||
case 0 :
|
case 0 :
|
||||||
$this->greet();
|
$this->greet();
|
||||||
|
@ -162,6 +159,8 @@ class RSS_Import {
|
||||||
$this->import();
|
$this->import();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$this->footer();
|
||||||
}
|
}
|
||||||
|
|
||||||
function RSS_Import() {
|
function RSS_Import() {
|
||||||
|
@ -171,5 +170,5 @@ class RSS_Import {
|
||||||
|
|
||||||
$rss_import = new RSS_Import();
|
$rss_import = new RSS_Import();
|
||||||
|
|
||||||
register_importer('rss', 'RSS', 'Import posts from and RSS feed', array ($rss_import, 'dispatch'));
|
register_importer('rss', 'RSS', __('Import posts from an RSS feed'), array ($rss_import, 'dispatch'));
|
||||||
?>
|
?>
|
Loading…
Reference in New Issue