Version Description
Download this release
Release Info
Developer | koralyne |
Plugin | RSS Post Importer |
Version | 2.1.7 |
Comparing to | |
See all releases |
Code changes from version 2.1.6 to 2.1.7
app/classes/admin/class-rss-pi-admin-processor.php
CHANGED
@@ -294,7 +294,8 @@ class rssPIAdminProcessor {
|
|
294 |
'tags_id' => (isset($_POST[$id . '-tags_id'])) ? $_POST[$id . '-tags_id'] : '',
|
295 |
'keywords' => array_map('trim',$keywords),
|
296 |
'strip_html' => (isset($_POST[$id . '-strip_html'])) ? $_POST[$id . '-strip_html'] : '',
|
297 |
-
'nofollow_outbound' => (isset($_POST[$id . '-nofollow_outbound'])) ? $_POST[$id . '-nofollow_outbound'] : ''
|
|
|
298 |
));
|
299 |
}
|
300 |
}
|
294 |
'tags_id' => (isset($_POST[$id . '-tags_id'])) ? $_POST[$id . '-tags_id'] : '',
|
295 |
'keywords' => array_map('trim',$keywords),
|
296 |
'strip_html' => (isset($_POST[$id . '-strip_html'])) ? $_POST[$id . '-strip_html'] : '',
|
297 |
+
'nofollow_outbound' => (isset($_POST[$id . '-nofollow_outbound'])) ? $_POST[$id . '-nofollow_outbound'] : '',
|
298 |
+
'automatic_import_categories' => (isset($_POST[$id . '-automatic_import_categories'])) ? $_POST[$id . '-automatic_import_categories'] : '', 'automatic_import_author' => (isset($_POST[$id . '-automatic_import_author'])) ? $_POST[$id . '-automatic_import_author'] : ''
|
299 |
));
|
300 |
}
|
301 |
}
|
app/classes/admin/class-rss-pi-opml.php
CHANGED
@@ -118,7 +118,9 @@ if (!class_exists("Rss_pi_opml")) {
|
|
118 |
'tags_id' => '',
|
119 |
'keywords' => '',
|
120 |
'strip_html' => 'false',
|
121 |
-
'nofollow_outbound' => 'false'
|
|
|
|
|
122 |
));
|
123 |
|
124 |
} else {
|
118 |
'tags_id' => '',
|
119 |
'keywords' => '',
|
120 |
'strip_html' => 'false',
|
121 |
+
'nofollow_outbound' => 'false',
|
122 |
+
'automatic_import_categories' => 'false',
|
123 |
+
'automatic_import_author' => 'false'
|
124 |
));
|
125 |
|
126 |
} else {
|
app/classes/import/class-rss-pi-engine.php
CHANGED
@@ -139,6 +139,8 @@ class rssPIEngine {
|
|
139 |
'keywords' => isset($f['keywords']) && is_array($f['keywords']) ? $f['keywords'] : array(),
|
140 |
'strip_html' => $f['strip_html'],
|
141 |
'nofollow_outbound' => $f['nofollow_outbound'],
|
|
|
|
|
142 |
'save_to_db' => true
|
143 |
);
|
144 |
return $this->_import($f['url'], $args);
|
@@ -167,6 +169,8 @@ class rssPIEngine {
|
|
167 |
'strip_html' => true,
|
168 |
'save_to_db' => true,
|
169 |
'nofollow_outbound' => true,
|
|
|
|
|
170 |
);
|
171 |
|
172 |
$args = wp_parse_args($args, $defaults);
|
@@ -361,7 +365,7 @@ class rssPIEngine {
|
|
361 |
|
362 |
// Featured Image setter
|
363 |
$thumbnail = new rssPIFeaturedImage();
|
364 |
-
|
365 |
foreach ( $items as $item ) {
|
366 |
if ( ! $this->post_exists($item) ) {
|
367 |
|
@@ -383,12 +387,60 @@ class rssPIEngine {
|
|
383 |
{
|
384 |
$content=$this->rss_pi_url_parse_content($content);
|
385 |
}
|
386 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
387 |
'post_title' => $item->get_title(),
|
388 |
'post_content' => $content,
|
389 |
'post_status' => $this->options['settings']['post_status'],
|
390 |
-
'post_author' => $
|
391 |
-
'post_category' =>
|
392 |
'tags_input' => $tags_name,
|
393 |
'comment_status' => $this->options['settings']['allow_comments'],
|
394 |
'post_date' => get_date_from_gmt($item->get_date('Y-m-d H:i:s'))
|
139 |
'keywords' => isset($f['keywords']) && is_array($f['keywords']) ? $f['keywords'] : array(),
|
140 |
'strip_html' => $f['strip_html'],
|
141 |
'nofollow_outbound' => $f['nofollow_outbound'],
|
142 |
+
'automatic_import_categories' => $f['automatic_import_categories'],
|
143 |
+
'automatic_import_author' => $f['automatic_import_author'],
|
144 |
'save_to_db' => true
|
145 |
);
|
146 |
return $this->_import($f['url'], $args);
|
169 |
'strip_html' => true,
|
170 |
'save_to_db' => true,
|
171 |
'nofollow_outbound' => true,
|
172 |
+
'automatic_import_categories' => true,
|
173 |
+
'automatic_import_author' => true,
|
174 |
);
|
175 |
|
176 |
$args = wp_parse_args($args, $defaults);
|
365 |
|
366 |
// Featured Image setter
|
367 |
$thumbnail = new rssPIFeaturedImage();
|
368 |
+
|
369 |
foreach ( $items as $item ) {
|
370 |
if ( ! $this->post_exists($item) ) {
|
371 |
|
387 |
{
|
388 |
$content=$this->rss_pi_url_parse_content($content);
|
389 |
}
|
390 |
+
|
391 |
+
// Get auto categories from Feeds
|
392 |
+
$post_category = array();
|
393 |
+
if($args['automatic_import_categories']=='true') {
|
394 |
+
|
395 |
+
$category_array = array();
|
396 |
+
foreach ($item->get_categories() as $category){
|
397 |
+
$cat_id = wp_create_category($category->get_label());
|
398 |
+
if($cat_id > 0){
|
399 |
+
$category_array[] = $cat_id;
|
400 |
+
}else{
|
401 |
+
$category = get_term_by('name', $category->get_label(), 'category');
|
402 |
+
if($category){
|
403 |
+
$category_array[] = $category->term_id;
|
404 |
+
}
|
405 |
+
}
|
406 |
+
}
|
407 |
+
$post_category = $category_array;
|
408 |
+
}else
|
409 |
+
{
|
410 |
+
$post_category = array($args['category_id']);
|
411 |
+
}
|
412 |
+
|
413 |
+
// Get Author From Feed URl
|
414 |
+
if($args['automatic_import_author']=='true') {
|
415 |
+
|
416 |
+
if ($author = $item->get_author())
|
417 |
+
{
|
418 |
+
$array_author = explode(",",$author->get_name());
|
419 |
+
$user_name = preg_replace('/[^A-Za-z0-9\-]/', ' ', $array_author[0]);
|
420 |
+
$user_id = username_exists( $user_name );
|
421 |
+
if ( !$user_id) :
|
422 |
+
$random_password = wp_generate_password( $length=12, $include_standard_special_chars=false );
|
423 |
+
$user_id = wp_create_user( $user_name, $random_password,'');
|
424 |
+
|
425 |
+
endif;
|
426 |
+
|
427 |
+
$post_author = $user_id;
|
428 |
+
|
429 |
+
}else
|
430 |
+
{
|
431 |
+
$post_author = $args['author_id'];
|
432 |
+
}
|
433 |
+
}else
|
434 |
+
{
|
435 |
+
$post_author = $args['author_id'];
|
436 |
+
}
|
437 |
+
|
438 |
+
$post = array(
|
439 |
'post_title' => $item->get_title(),
|
440 |
'post_content' => $content,
|
441 |
'post_status' => $this->options['settings']['post_status'],
|
442 |
+
'post_author' => $post_author,
|
443 |
+
'post_category' => $post_category,
|
444 |
'tags_input' => $tags_name,
|
445 |
'comment_status' => $this->options['settings']['allow_comments'],
|
446 |
'post_date' => get_date_from_gmt($item->get_date('Y-m-d H:i:s'))
|
app/templates/feed-table-row.php
CHANGED
@@ -11,7 +11,9 @@ if (!isset($f)) {
|
|
11 |
'category_id' => 1,
|
12 |
'tags_id' => array(),
|
13 |
'strip_html' => 'false',
|
14 |
-
'nofollow_outbound' => 'false'
|
|
|
|
|
15 |
);
|
16 |
$show = ' show';
|
17 |
}
|
@@ -101,6 +103,24 @@ if (is_array($f['category_id'])) {
|
|
101 |
</ul>
|
102 |
</td>
|
103 |
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
104 |
<tr>
|
105 |
<td><label for="<?php echo ($f['id']); ?>-author_id"><?php _e("Feed Author", 'rss_pi'); ?></label></td>
|
106 |
<td>
|
@@ -118,6 +138,25 @@ wp_dropdown_users($args);
|
|
118 |
?>
|
119 |
</td>
|
120 |
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
121 |
<tr>
|
122 |
<td><label for=""><?php _e("Category", 'rss_pi'); ?></label></td>
|
123 |
<td>
|
@@ -143,6 +182,7 @@ wp_dropdown_users($args);
|
|
143 |
?>
|
144 |
</td>
|
145 |
</tr>
|
|
|
146 |
<tr>
|
147 |
<td><label for=""><?php _e("Tags", 'rss_pi'); ?></label></td>
|
148 |
<td>
|
11 |
'category_id' => 1,
|
12 |
'tags_id' => array(),
|
13 |
'strip_html' => 'false',
|
14 |
+
'nofollow_outbound' => 'false',
|
15 |
+
'automatic_import_categories' => 'false',
|
16 |
+
'automatic_import_author' => 'false'
|
17 |
);
|
18 |
$show = ' show';
|
19 |
}
|
103 |
</ul>
|
104 |
</td>
|
105 |
</tr>
|
106 |
+
|
107 |
+
<tr>
|
108 |
+
<td>
|
109 |
+
<label for="<?php echo ($f['id']); ?>-automatic_import_author"><?php _e('Automatic import of Authors ?', "rss_pi"); ?></label>
|
110 |
+
|
111 |
+
</td>
|
112 |
+
<td>
|
113 |
+
<ul class="radiolist">
|
114 |
+
<li>
|
115 |
+
<label><input type="radio" id="<?php echo($f['id']); ?>-automatic_import_author_true" name="<?php echo($f['id']); ?>-automatic_import_author" value="true" <?php echo($f['automatic_import_author'] == 'true' ? 'checked="checked"' : ''); ?> /> <?php _e('Yes', 'rss_pi'); ?></label>
|
116 |
+
</li>
|
117 |
+
<li>
|
118 |
+
<label><input type="radio" id="<?php echo($f['id']); ?>-automatic_import_author_false" name="<?php echo($f['id']); ?>-automatic_import_author" value="false" <?php echo($f['automatic_import_author'] == 'false' || $f['automatic_import_author'] == '' ? 'checked="checked"' : ''); ?> /> <?php _e('No', 'rss_pi'); ?></label>
|
119 |
+
</li>
|
120 |
+
</ul>
|
121 |
+
</td>
|
122 |
+
</tr>
|
123 |
+
|
124 |
<tr>
|
125 |
<td><label for="<?php echo ($f['id']); ?>-author_id"><?php _e("Feed Author", 'rss_pi'); ?></label></td>
|
126 |
<td>
|
138 |
?>
|
139 |
</td>
|
140 |
</tr>
|
141 |
+
|
142 |
+
<tr>
|
143 |
+
<td>
|
144 |
+
<label for="<?php echo ($f['id']); ?>-automatic_import_categories"><?php _e('Automatic import of Categories ?', "rss_pi"); ?></label>
|
145 |
+
|
146 |
+
</td>
|
147 |
+
<td>
|
148 |
+
<ul class="radiolist">
|
149 |
+
<li>
|
150 |
+
<label><input type="radio" id="<?php echo($f['id']); ?>-automatic_import_categories_true" name="<?php echo($f['id']); ?>-automatic_import_categories" value="true" <?php echo($f['automatic_import_categories'] == 'true' ? 'checked="checked"' : ''); ?> /> <?php _e('Yes', 'rss_pi'); ?></label>
|
151 |
+
</li>
|
152 |
+
<li>
|
153 |
+
<label><input type="radio" id="<?php echo($f['id']); ?>-automatic_import_categories_false" name="<?php echo($f['id']); ?>-automatic_import_categories" value="false" <?php echo($f['automatic_import_categories'] == 'false' || $f['automatic_import_categories'] == '' ? 'checked="checked"' : ''); ?> /> <?php _e('No', 'rss_pi'); ?></label>
|
154 |
+
</li>
|
155 |
+
</ul>
|
156 |
+
</td>
|
157 |
+
</tr>
|
158 |
+
|
159 |
+
|
160 |
<tr>
|
161 |
<td><label for=""><?php _e("Category", 'rss_pi'); ?></label></td>
|
162 |
<td>
|
182 |
?>
|
183 |
</td>
|
184 |
</tr>
|
185 |
+
|
186 |
<tr>
|
187 |
<td><label for=""><?php _e("Tags", 'rss_pi'); ?></label></td>
|
188 |
<td>
|
index.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
Plugin URI: https://wordpress.org/plugins/rss-post-importer/
|
6 |
Description: This plugin lets you set up an import posts from one or several rss-feeds and save them as posts on your site, simple and flexible.
|
7 |
Author: feedsapi
|
8 |
-
Version: 2.1.
|
9 |
Author URI: https://www.feedsapi.org/
|
10 |
License: GPLv2 or later
|
11 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
@@ -27,7 +27,7 @@ if (!defined('RSS_PI_BASENAME')) {
|
|
27 |
}
|
28 |
|
29 |
if (!defined('RSS_PI_VERSION')) {
|
30 |
-
define('RSS_PI_VERSION', '2.1.
|
31 |
}
|
32 |
|
33 |
if (!defined('RSS_PI_LOG_PATH')) {
|
5 |
Plugin URI: https://wordpress.org/plugins/rss-post-importer/
|
6 |
Description: This plugin lets you set up an import posts from one or several rss-feeds and save them as posts on your site, simple and flexible.
|
7 |
Author: feedsapi
|
8 |
+
Version: 2.1.7
|
9 |
Author URI: https://www.feedsapi.org/
|
10 |
License: GPLv2 or later
|
11 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
27 |
}
|
28 |
|
29 |
if (!defined('RSS_PI_VERSION')) {
|
30 |
+
define('RSS_PI_VERSION', '2.1.7');
|
31 |
}
|
32 |
|
33 |
if (!defined('RSS_PI_LOG_PATH')) {
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.feedsapi.org/
|
|
4 |
Tags: rss, feeds, import, feed, autoblog, feed aggregation, rss-feed, aggregation, atom, feed, rss, syndication, FeedWordPress, autoblog aggregator, Autoblogger, autoblogging, feed import, rss multi importer, feed reader, feed to post, multi feed import, multi feed importer, multi import, multi rss feeds, multiple feed import, multiple feeds, multiple rss feeds, rss, rss aggregator, rss feader, RSS import, rss to post, content curation, RSS Retriever, RSS fetch feed, WP RSS Aggregator, AutoPost, RSS Feed to Post, RSSImport, yahoo pipes, WP Pipes, Import XML feed , FeedSyndicate, RSSpost, RSS in Page
|
5 |
Requires at least: 3.5
|
6 |
Tested up to: 4.2.4
|
7 |
-
Stable tag: 2.1.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -124,6 +124,11 @@ Learn more (and get detailed instructions) in our [contribute guide](http://jetp
|
|
124 |
|
125 |
== Change Log ==
|
126 |
|
|
|
|
|
|
|
|
|
|
|
127 |
= Version 2.1.6 =
|
128 |
* Custom scheduling
|
129 |
* SEO: Feeds level no-follow
|
4 |
Tags: rss, feeds, import, feed, autoblog, feed aggregation, rss-feed, aggregation, atom, feed, rss, syndication, FeedWordPress, autoblog aggregator, Autoblogger, autoblogging, feed import, rss multi importer, feed reader, feed to post, multi feed import, multi feed importer, multi import, multi rss feeds, multiple feed import, multiple feeds, multiple rss feeds, rss, rss aggregator, rss feader, RSS import, rss to post, content curation, RSS Retriever, RSS fetch feed, WP RSS Aggregator, AutoPost, RSS Feed to Post, RSSImport, yahoo pipes, WP Pipes, Import XML feed , FeedSyndicate, RSSpost, RSS in Page
|
5 |
Requires at least: 3.5
|
6 |
Tested up to: 4.2.4
|
7 |
+
Stable tag: 2.1.7
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
124 |
|
125 |
== Change Log ==
|
126 |
|
127 |
+
= Version 2.1.7 =
|
128 |
+
* upport for Automatic Authors Importing
|
129 |
+
* Support for Automatic Categories importing
|
130 |
+
* Bug fixes
|
131 |
+
|
132 |
= Version 2.1.6 =
|
133 |
* Custom scheduling
|
134 |
* SEO: Feeds level no-follow
|