Version Description
Download this release
Release Info
Developer | koralyne |
Plugin | RSS Post Importer |
Version | 2.1.6 |
Comparing to | |
See all releases |
Code changes from version 2.1.5 to 2.1.6
- app/assets/css/style.css +6 -0
- app/assets/js/main.js +18 -0
- app/classes/admin/class-rss-pi-admin-processor.php +33 -6
- app/classes/admin/class-rss-pi-admin.php +22 -0
- app/classes/admin/class-rss-pi-opml.php +3 -2
- app/classes/import/class-rss-pi-engine.php +48 -2
- app/templates/admin-ui.php +20 -1
- app/templates/feed-table-row.php +19 -1
- app/templates/settings-table.php +22 -4
- index.php +2 -2
- readme.txt +6 -1
app/assets/css/style.css
CHANGED
@@ -280,3 +280,9 @@ div.category_container ul.children {
|
|
280 |
padding: 20px;
|
281 |
text-align: center;
|
282 |
}
|
|
|
|
|
|
|
|
|
|
|
|
280 |
padding: 20px;
|
281 |
text-align: center;
|
282 |
}
|
283 |
+
#rss_custom_frequency
|
284 |
+
{
|
285 |
+
width:30% !important;
|
286 |
+
|
287 |
+
|
288 |
+
}
|
app/assets/js/main.js
CHANGED
@@ -195,6 +195,24 @@ $('document').ready(function(){
|
|
195 |
$("#rss_pi_progressbar_label").html("Import in progres. Processed feeds: <span class='processed'>0</span> of <span class='max'>"+feeds.total()+"</span>. Imported posts so far: <span class='count'>0</span>");
|
196 |
import_feed(feeds.get());
|
197 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
198 |
|
199 |
});
|
200 |
|
195 |
$("#rss_pi_progressbar_label").html("Import in progres. Processed feeds: <span class='processed'>0</span> of <span class='max'>"+feeds.total()+"</span>. Imported posts so far: <span class='count'>0</span>");
|
196 |
import_feed(feeds.get());
|
197 |
}
|
198 |
+
|
199 |
+
|
200 |
+
/*This is for custom frequency*/
|
201 |
+
$("#frequency").change(function(){
|
202 |
+
|
203 |
+
if($(this).val()=="custom_frequency")
|
204 |
+
{
|
205 |
+
$("#rss_custom_frequency").show();
|
206 |
+
$("#rss_custom_frequency").focus();
|
207 |
+
}else{
|
208 |
+
$("#rss_custom_frequency").val('');
|
209 |
+
$("#rss_custom_frequency").hide();
|
210 |
+
}
|
211 |
+
|
212 |
+
|
213 |
+
})
|
214 |
+
|
215 |
+
|
216 |
|
217 |
});
|
218 |
|
app/classes/admin/class-rss-pi-admin-processor.php
CHANGED
@@ -187,8 +187,33 @@ class rssPIAdminProcessor {
|
|
187 |
private function process_settings() {
|
188 |
|
189 |
// Get selected settings for all imported posts
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
190 |
$settings = array(
|
191 |
-
'frequency' => $
|
192 |
'feeds_api_key' => $_POST['feeds_api_key'],
|
193 |
'post_template' => stripslashes_deep($_POST['post_template']),
|
194 |
'post_status' => $_POST['post_status'],
|
@@ -202,6 +227,7 @@ class rssPIAdminProcessor {
|
|
202 |
// these values are setup after key_validity check via filter()
|
203 |
'keywords' => array(),
|
204 |
'cache_deleted' => 'true',
|
|
|
205 |
);
|
206 |
|
207 |
global $rss_post_importer;
|
@@ -267,7 +293,8 @@ class rssPIAdminProcessor {
|
|
267 |
'category_id' => (isset($_POST[$id . '-category_id'])) ? $_POST[$id . '-category_id'] : '',
|
268 |
'tags_id' => (isset($_POST[$id . '-tags_id'])) ? $_POST[$id . '-tags_id'] : '',
|
269 |
'keywords' => array_map('trim',$keywords),
|
270 |
-
'strip_html' => (isset($_POST[$id . '-strip_html'])) ? $_POST[$id . '-strip_html'] : ''
|
|
|
271 |
));
|
272 |
}
|
273 |
}
|
@@ -327,10 +354,10 @@ class rssPIAdminProcessor {
|
|
327 |
// set up keywords (otherwise don't)
|
328 |
if (isset($_POST['keyword_filter']))
|
329 |
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
|
335 |
if (!empty($keyword_str)) {
|
336 |
$keywords = explode(',', $keyword_str);
|
187 |
private function process_settings() {
|
188 |
|
189 |
// Get selected settings for all imported posts
|
190 |
+
|
191 |
+
// Code added for custom frequency
|
192 |
+
if($_POST['frequency']=="custom_frequency")
|
193 |
+
{
|
194 |
+
$rss_custom_frequency = $_POST['rss_custom_frequency'];
|
195 |
+
$frequency = "minutes_".$rss_custom_frequency;
|
196 |
+
$custom_frequency = 'true';
|
197 |
+
// Adding option for custom cron
|
198 |
+
$rss_custom_cron_frequency = serialize(
|
199 |
+
array('time'=>$rss_custom_frequency,
|
200 |
+
'frequency'=>$frequency
|
201 |
+
)
|
202 |
+
);
|
203 |
+
|
204 |
+
delete_option( 'rss_custom_cron_frequency' );
|
205 |
+
add_option( 'rss_custom_cron_frequency',$rss_custom_cron_frequency);
|
206 |
+
}else
|
207 |
+
{
|
208 |
+
$frequency = $_POST['frequency'];
|
209 |
+
$custom_frequency = 'false';
|
210 |
+
|
211 |
+
// Delete custom cron if not exixts
|
212 |
+
delete_option( 'rss_custom_cron_frequency' );
|
213 |
+
}
|
214 |
+
|
215 |
$settings = array(
|
216 |
+
'frequency' => $frequency,
|
217 |
'feeds_api_key' => $_POST['feeds_api_key'],
|
218 |
'post_template' => stripslashes_deep($_POST['post_template']),
|
219 |
'post_status' => $_POST['post_status'],
|
227 |
// these values are setup after key_validity check via filter()
|
228 |
'keywords' => array(),
|
229 |
'cache_deleted' => 'true',
|
230 |
+
'custom_frequency' => $custom_frequency
|
231 |
);
|
232 |
|
233 |
global $rss_post_importer;
|
293 |
'category_id' => (isset($_POST[$id . '-category_id'])) ? $_POST[$id . '-category_id'] : '',
|
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 |
}
|
354 |
// set up keywords (otherwise don't)
|
355 |
if (isset($_POST['keyword_filter']))
|
356 |
|
357 |
+
// Strip Slases for RegEx
|
358 |
+
$keyword_str = stripslashes($_POST['keyword_filter']);
|
359 |
+
|
360 |
+
$keywords = array();
|
361 |
|
362 |
if (!empty($keyword_str)) {
|
363 |
$keywords = explode(',', $keyword_str);
|
app/classes/admin/class-rss-pi-admin.php
CHANGED
@@ -112,6 +112,8 @@ class rssPIAdmin {
|
|
112 |
|
113 |
// Add 10 minutes in frequency.
|
114 |
add_filter('cron_schedules', array($this, 'rss_pi_cron_add'));
|
|
|
|
|
115 |
|
116 |
// trigger on Export
|
117 |
if ( isset($_POST['export_opml']) ) {
|
@@ -194,8 +196,28 @@ class rssPIAdmin {
|
|
194 |
'interval' => 600,
|
195 |
'display' => '10 minutes'
|
196 |
);
|
|
|
197 |
return $schedules;
|
198 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
199 |
|
200 |
/**
|
201 |
* save any options submitted before the screen/ui get displayed
|
112 |
|
113 |
// Add 10 minutes in frequency.
|
114 |
add_filter('cron_schedules', array($this, 'rss_pi_cron_add'));
|
115 |
+
|
116 |
+
add_filter('cron_schedules', array($this, 'rss_pi_cron_add_custom'));
|
117 |
|
118 |
// trigger on Export
|
119 |
if ( isset($_POST['export_opml']) ) {
|
196 |
'interval' => 600,
|
197 |
'display' => '10 minutes'
|
198 |
);
|
199 |
+
|
200 |
return $schedules;
|
201 |
}
|
202 |
+
|
203 |
+
// this will fetch custom frequency
|
204 |
+
function rss_pi_cron_add_custom($schedules) {
|
205 |
+
|
206 |
+
// min in sec
|
207 |
+
$rss_min = 60;
|
208 |
+
$custom_cron_options = get_option( 'rss_custom_cron_frequency',array());
|
209 |
+
if(!empty($custom_cron_options)){
|
210 |
+
$rss_custom_cron = unserialize($custom_cron_options);
|
211 |
+
$rss_frequency_cron = $rss_custom_cron['frequency'];
|
212 |
+
$rss_frequency_time = $rss_custom_cron['time'];
|
213 |
+
// Adding custom cron
|
214 |
+
$schedules[$rss_frequency_cron] = array(
|
215 |
+
'interval' => $rss_min*$rss_frequency_time,
|
216 |
+
'display' => $rss_frequency_time.' minutes'
|
217 |
+
);
|
218 |
+
}
|
219 |
+
return $schedules;
|
220 |
+
}
|
221 |
|
222 |
/**
|
223 |
* save any options submitted before the screen/ui get displayed
|
app/classes/admin/class-rss-pi-opml.php
CHANGED
@@ -118,6 +118,7 @@ if (!class_exists("Rss_pi_opml")) {
|
|
118 |
'tags_id' => '',
|
119 |
'keywords' => '',
|
120 |
'strip_html' => 'false',
|
|
|
121 |
));
|
122 |
|
123 |
} else {
|
@@ -166,8 +167,8 @@ if (!class_exists("Rss_pi_opml")) {
|
|
166 |
// $result = "<-?xml version=\"1.0\" encoding=\"ISO-8859-1\"?->\n"
|
167 |
$result = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n"
|
168 |
. "<opml version=\"1.1\">\n"
|
169 |
-
. "
|
170 |
-
. "
|
171 |
. " <dateCreated>" . date("r") . "</dateCreated>\n"
|
172 |
// . " <ownerName>" . $ownerName . "</ownerName>\n"
|
173 |
. " <ownerEmail>" . $ownerEmail . "</ownerEmail>\n"
|
118 |
'tags_id' => '',
|
119 |
'keywords' => '',
|
120 |
'strip_html' => 'false',
|
121 |
+
'nofollow_outbound' => 'false'
|
122 |
));
|
123 |
|
124 |
} else {
|
167 |
// $result = "<-?xml version=\"1.0\" encoding=\"ISO-8859-1\"?->\n"
|
168 |
$result = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n"
|
169 |
. "<opml version=\"1.1\">\n"
|
170 |
+
. "<head>\n"
|
171 |
+
. " <title>" . $title . "</title>\n"
|
172 |
. " <dateCreated>" . date("r") . "</dateCreated>\n"
|
173 |
// . " <ownerName>" . $ownerName . "</ownerName>\n"
|
174 |
. " <ownerEmail>" . $ownerEmail . "</ownerEmail>\n"
|
app/classes/import/class-rss-pi-engine.php
CHANGED
@@ -138,6 +138,7 @@ class rssPIEngine {
|
|
138 |
'tags_id' => $f['tags_id'],
|
139 |
'keywords' => isset($f['keywords']) && is_array($f['keywords']) ? $f['keywords'] : array(),
|
140 |
'strip_html' => $f['strip_html'],
|
|
|
141 |
'save_to_db' => true
|
142 |
);
|
143 |
return $this->_import($f['url'], $args);
|
@@ -164,7 +165,8 @@ class rssPIEngine {
|
|
164 |
'tags_id' => array(),
|
165 |
'keywords' => array(),
|
166 |
'strip_html' => true,
|
167 |
-
'save_to_db' => true
|
|
|
168 |
);
|
169 |
|
170 |
$args = wp_parse_args($args, $defaults);
|
@@ -375,7 +377,12 @@ class rssPIEngine {
|
|
375 |
|
376 |
// parse the content
|
377 |
$content = $parser->_parse($item, $args['feed_title'], $args['strip_html']);
|
378 |
-
|
|
|
|
|
|
|
|
|
|
|
379 |
$post = array(
|
380 |
'post_title' => $item->get_title(),
|
381 |
'post_content' => $content,
|
@@ -639,5 +646,44 @@ class rssPIEngine {
|
|
639 |
|
640 |
return $id;
|
641 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
642 |
|
643 |
}
|
138 |
'tags_id' => $f['tags_id'],
|
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);
|
165 |
'tags_id' => array(),
|
166 |
'keywords' => array(),
|
167 |
'strip_html' => true,
|
168 |
+
'save_to_db' => true,
|
169 |
+
'nofollow_outbound' => true,
|
170 |
);
|
171 |
|
172 |
$args = wp_parse_args($args, $defaults);
|
377 |
|
378 |
// parse the content
|
379 |
$content = $parser->_parse($item, $args['feed_title'], $args['strip_html']);
|
380 |
+
|
381 |
+
//Filter content for /* Add rel="nofollow" to all outbounded links. */
|
382 |
+
if($args['nofollow_outbound']=='true')
|
383 |
+
{
|
384 |
+
$content=$this->rss_pi_url_parse_content($content);
|
385 |
+
}
|
386 |
$post = array(
|
387 |
'post_title' => $item->get_title(),
|
388 |
'post_content' => $content,
|
646 |
|
647 |
return $id;
|
648 |
}
|
649 |
+
|
650 |
+
function rss_pi_url_parse_content($content) {
|
651 |
+
|
652 |
+
$regexp = "<a\s[^>]*href=(\"??)([^\" >]*?)\\1[^>]*>";
|
653 |
+
if (preg_match_all("/$regexp/siU", $content, $matches, PREG_SET_ORDER)) {
|
654 |
+
if (!empty($matches)) {
|
655 |
+
|
656 |
+
$srcUrl = get_option('home');
|
657 |
+
for ($i = 0; $i < count($matches); $i++) {
|
658 |
+
|
659 |
+
$tag = $matches[$i][0];
|
660 |
+
$tag2 = $matches[$i][0];
|
661 |
+
$url = $matches[$i][0];
|
662 |
+
|
663 |
+
$noFollow = '';
|
664 |
+
|
665 |
+
$pattern = '/target\s*=\s*"\s*_blank\s*"/';
|
666 |
+
preg_match($pattern, $tag2, $match, PREG_OFFSET_CAPTURE);
|
667 |
+
if (count($match) < 1)
|
668 |
+
$noFollow .= ' target="_blank" ';
|
669 |
+
|
670 |
+
$pattern = '/rel\s*=\s*"\s*[n|d]ofollow\s*"/';
|
671 |
+
preg_match($pattern, $tag2, $match, PREG_OFFSET_CAPTURE);
|
672 |
+
if (count($match) < 1)
|
673 |
+
$noFollow .= ' rel="nofollow" ';
|
674 |
+
|
675 |
+
$pos = strpos($url, $srcUrl);
|
676 |
+
if ($pos === false) {
|
677 |
+
$tag = rtrim($tag, '>');
|
678 |
+
$tag .= $noFollow . '>';
|
679 |
+
$content = str_replace($tag2, $tag, $content);
|
680 |
+
}
|
681 |
+
}
|
682 |
+
}
|
683 |
+
}
|
684 |
+
|
685 |
+
$content = str_replace(']]>', ']]>', $content);
|
686 |
+
return $content;
|
687 |
+
}
|
688 |
|
689 |
}
|
app/templates/admin-ui.php
CHANGED
@@ -37,4 +37,23 @@
|
|
37 |
</div>
|
38 |
|
39 |
<div class="ajax_content"></div>
|
40 |
-
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
37 |
</div>
|
38 |
|
39 |
<div class="ajax_content"></div>
|
40 |
+
</div>
|
41 |
+
<script type="text/javascript">
|
42 |
+
adroll_adv_id = "QQBLQGEK7FB4RBKP6CVHTS";
|
43 |
+
adroll_pix_id = "ZAMJKSSZRREUVAYSLZ2K6S";
|
44 |
+
(function () {
|
45 |
+
var _onload = function(){
|
46 |
+
if (document.readyState && !/loaded|complete/.test(document.readyState)){setTimeout(_onload, 10);return}
|
47 |
+
if (!window.__adroll_loaded){__adroll_loaded=true;setTimeout(_onload, 50);return}
|
48 |
+
var scr = document.createElement("script");
|
49 |
+
var host = (("https:" == document.location.protocol) ? "https://s.adroll.com" : "http://a.adroll.com");
|
50 |
+
scr.setAttribute('async', 'true');
|
51 |
+
scr.type = "text/javascript";
|
52 |
+
scr.src = host + "/j/roundtrip.js";
|
53 |
+
((document.getElementsByTagName('head') || [null])[0] ||
|
54 |
+
document.getElementsByTagName('script')[0].parentNode).appendChild(scr);
|
55 |
+
};
|
56 |
+
if (window.addEventListener) {window.addEventListener('load', _onload, false);}
|
57 |
+
else {window.attachEvent('onload', _onload)}
|
58 |
+
}());
|
59 |
+
</script>
|
app/templates/feed-table-row.php
CHANGED
@@ -10,7 +10,8 @@ if (!isset($f)) {
|
|
10 |
'author_id' => 1,
|
11 |
'category_id' => 1,
|
12 |
'tags_id' => array(),
|
13 |
-
'strip_html' => 'false'
|
|
|
14 |
);
|
15 |
$show = ' show';
|
16 |
}
|
@@ -84,6 +85,22 @@ if (is_array($f['category_id'])) {
|
|
84 |
<td><label for="<?php echo ($f['id']); ?>-max_posts"><?php _e("Max posts / import", 'rss_pi'); ?></label></td>
|
85 |
<td><input type="number" class="field-max_posts" name="<?php echo ($f['id']); ?>-max_posts" id="<?php echo ($f['id']); ?>-max_posts" value="<?php echo ($f['max_posts']); ?>" min="1" max="100" /></td>
|
86 |
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
87 |
<tr>
|
88 |
<td><label for="<?php echo ($f['id']); ?>-author_id"><?php _e("Feed Author", 'rss_pi'); ?></label></td>
|
89 |
<td>
|
@@ -166,6 +183,7 @@ wp_dropdown_users($args);
|
|
166 |
?></textarea>
|
167 |
</td>
|
168 |
</tr>
|
|
|
169 |
<tr>
|
170 |
<td><label for=""><?php _e("Strip html tags", 'rss_pi'); ?></label></td>
|
171 |
<td>
|
10 |
'author_id' => 1,
|
11 |
'category_id' => 1,
|
12 |
'tags_id' => array(),
|
13 |
+
'strip_html' => 'false',
|
14 |
+
'nofollow_outbound' => 'false'
|
15 |
);
|
16 |
$show = ' show';
|
17 |
}
|
85 |
<td><label for="<?php echo ($f['id']); ?>-max_posts"><?php _e("Max posts / import", 'rss_pi'); ?></label></td>
|
86 |
<td><input type="number" class="field-max_posts" name="<?php echo ($f['id']); ?>-max_posts" id="<?php echo ($f['id']); ?>-max_posts" value="<?php echo ($f['max_posts']); ?>" min="1" max="100" /></td>
|
87 |
</tr>
|
88 |
+
<tr>
|
89 |
+
<td>
|
90 |
+
<label for="<?php echo ($f['id']); ?>-nofollow_outbound"><?php _e('Nofollow option for all outbound links?', "rss_pi"); ?></label>
|
91 |
+
<p class="description"><?php _e('Add rel="nofollow" to all outbounded links.', "rss_pi"); ?></p>
|
92 |
+
</td>
|
93 |
+
<td>
|
94 |
+
<ul class="radiolist">
|
95 |
+
<li>
|
96 |
+
<label><input type="radio" id="<?php echo($f['id']); ?>-nofollow_outbound_true" name="<?php echo($f['id']); ?>-nofollow_outbound" value="true" <?php echo($f['nofollow_outbound'] == 'true' ? 'checked="checked"' : ''); ?> /> <?php _e('Yes', 'rss_pi'); ?></label>
|
97 |
+
</li>
|
98 |
+
<li>
|
99 |
+
<label><input type="radio" id="<?php echo($f['id']); ?>-nofollow_outbound_false" name="<?php echo($f['id']); ?>-nofollow_outbound" value="false" <?php echo($f['nofollow_outbound'] == 'false' || $f['nofollow_outbound'] == '' ? 'checked="checked"' : ''); ?> /> <?php _e('No', 'rss_pi'); ?></label>
|
100 |
+
</li>
|
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>
|
183 |
?></textarea>
|
184 |
</td>
|
185 |
</tr>
|
186 |
+
|
187 |
<tr>
|
188 |
<td><label for=""><?php _e("Strip html tags", 'rss_pi'); ?></label></td>
|
189 |
<td>
|
app/templates/settings-table.php
CHANGED
@@ -12,17 +12,35 @@
|
|
12 |
<td>
|
13 |
<label for="frequency"><?php _e('Frequency', "rss_pi"); ?></label>
|
14 |
<p class="description"><?php _e('How often will the import run.', "rss_pi"); ?></p>
|
|
|
15 |
</td>
|
16 |
<td>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
17 |
<select name="frequency" id="frequency">
|
18 |
-
<?php $x
|
19 |
-
|
|
|
|
|
20 |
<option value="<?php echo $interval; ?>" <?php
|
21 |
if ($this->options['settings']['frequency'] == $interval) : echo('selected="selected"');
|
22 |
endif;
|
23 |
?>><?php echo $x[$interval]['display']; ?></option>
|
24 |
-
<?php
|
|
|
|
|
|
|
25 |
</select>
|
|
|
|
|
|
|
|
|
|
|
26 |
</td>
|
27 |
</tr>
|
28 |
<tr>
|
@@ -338,4 +356,4 @@ strip_html = strip html tags - "true" or "false"', "rss_pi"); ?></p>
|
|
338 |
</td>
|
339 |
</tr>
|
340 |
</tbody>
|
341 |
-
</table>
|
12 |
<td>
|
13 |
<label for="frequency"><?php _e('Frequency', "rss_pi"); ?></label>
|
14 |
<p class="description"><?php _e('How often will the import run.', "rss_pi"); ?></p>
|
15 |
+
<p class="description"><?php _e('Custom Frequency in minutes only.', "rss_pi"); ?></p>
|
16 |
</td>
|
17 |
<td>
|
18 |
+
<?php
|
19 |
+
$x = wp_get_schedules();
|
20 |
+
$custom_cron_options = get_option( 'rss_custom_cron_frequency',array());
|
21 |
+
if(!empty($custom_cron_options)):
|
22 |
+
$rss_custom_cron = unserialize($custom_cron_options);
|
23 |
+
endif;
|
24 |
+
?>
|
25 |
<select name="frequency" id="frequency">
|
26 |
+
<?php foreach (array_keys($x) as $interval) :
|
27 |
+
if($rss_custom_cron['frequency'] != $interval) :
|
28 |
+
|
29 |
+
?>
|
30 |
<option value="<?php echo $interval; ?>" <?php
|
31 |
if ($this->options['settings']['frequency'] == $interval) : echo('selected="selected"');
|
32 |
endif;
|
33 |
?>><?php echo $x[$interval]['display']; ?></option>
|
34 |
+
<?php endif;
|
35 |
+
endforeach; ?>
|
36 |
+
|
37 |
+
<option value="custom_frequency" <?php if ($this->options['settings']['custom_frequency'] == "true"){ echo('selected="selected"');} ?>><?php _e('Custom frequency', "rss_pi"); ?></option>
|
38 |
</select>
|
39 |
+
|
40 |
+
|
41 |
+
<input type="text" id="rss_custom_frequency" name="rss_custom_frequency" value="<?php echo $rss_custom_cron['time']; ?>" placeholder="Minutes" <?php if ($this->options['settings']['custom_frequency'] == 'true'){ echo('style="display:inline"');} ?>/>
|
42 |
+
|
43 |
+
|
44 |
</td>
|
45 |
</tr>
|
46 |
<tr>
|
356 |
</td>
|
357 |
</tr>
|
358 |
</tbody>
|
359 |
+
</table>
|
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.6
|
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.6');
|
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.5 =
|
128 |
* Duplicate Post protection issue fixed
|
129 |
* RegEx filter bug fixed
|
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.6
|
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.6 =
|
128 |
+
* Custom scheduling
|
129 |
+
* SEO: Feeds level no-follow
|
130 |
+
* Bug fixes
|
131 |
+
|
132 |
= Version 2.1.5 =
|
133 |
* Duplicate Post protection issue fixed
|
134 |
* RegEx filter bug fixed
|