Version Description
Download this release
Release Info
Developer | radgeek |
Plugin | FeedWordPress |
Version | 2013.0504 |
Comparing to | |
See all releases |
Code changes from version 2013.0503 to 2013.0504
- admin-ui.php +45 -39
- categories-page.php +3 -2
- compatability.php +1 -1
- diagnostics-page.php +1 -1
- externals/myphp/myphp.class.php +88 -0
- feeds-page.php +4 -3
- feedwordpress.php +6 -5
- feedwordpress_file.class.php +3 -1
- feedwordpresslocalpost.class.php +2 -1
- feedwordpresssyndicationpage.class.php +30 -18
- performance-page.php +1 -1
- readme.txt +12 -1
admin-ui.php
CHANGED
@@ -241,6 +241,38 @@ class FeedWordPressAdminPage {
|
|
241 |
<?php
|
242 |
} /* FeedWordPressAdminPage::ajax_interface_js () */
|
243 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
244 |
function display_feed_settings_page_links ($params = array()) {
|
245 |
global $fwp_path;
|
246 |
|
@@ -260,8 +292,6 @@ class FeedWordPressAdminPage {
|
|
260 |
'Categories' => array('page' => 'categories-page.php', 'long' => 'Categories & Tags'),
|
261 |
);
|
262 |
|
263 |
-
$hrefPrefix = 'admin.php?';
|
264 |
-
|
265 |
$link_id = NULL;
|
266 |
if (is_object($sub)) :
|
267 |
if (method_exists($sub, 'found')) :
|
@@ -273,21 +303,12 @@ class FeedWordPressAdminPage {
|
|
273 |
endif;
|
274 |
endif;
|
275 |
|
276 |
-
if (!is_null($link_id)) :
|
277 |
-
$urlParam = "link_id={$link_id}";
|
278 |
-
$hrefPrefix .= $urlParam."&";
|
279 |
-
$urlSuffix = "&".$urlParam;
|
280 |
-
else :
|
281 |
-
$urlParam = '';
|
282 |
-
endif;
|
283 |
-
$hrefPrefix .= "page=${fwp_path}/";
|
284 |
-
|
285 |
print $params['before']; $first = true;
|
286 |
foreach ($links as $label => $link) :
|
287 |
if (!$first) : print $params['between']; endif;
|
288 |
|
289 |
-
if (isset($link['url'])) :
|
290 |
-
else : $url = $
|
291 |
endif;
|
292 |
$url = esc_html($url);
|
293 |
|
@@ -345,8 +366,9 @@ class FeedWordPressAdminPage {
|
|
345 |
} /* FeedWordPressAdminPage::display_feed_select_dropdown() */
|
346 |
|
347 |
function display_sheet_header ($pagename = 'Syndication', $all = false) {
|
|
|
348 |
?>
|
349 |
-
<div class="icon32"><img src="<?php print esc_html(WP_PLUGIN_URL.'/'.$
|
350 |
<h2><?php print esc_html(__($pagename.($all ? '' : ' Settings'))); ?><?php if ($this->for_feed_settings()) : ?>: <?php echo esc_html($this->link->name(/*from feed=*/ false)); ?><?php endif; ?></h2>
|
351 |
<?php
|
352 |
}
|
@@ -395,7 +417,7 @@ class FeedWordPressAdminPage {
|
|
395 |
if (is_null($filename)) :
|
396 |
$filename = basename($this->filename);
|
397 |
endif;
|
398 |
-
return
|
399 |
} /* FeedWordPressAdminPage::form_action () */
|
400 |
|
401 |
function update_message () {
|
@@ -403,6 +425,8 @@ class FeedWordPressAdminPage {
|
|
403 |
}
|
404 |
|
405 |
function display () {
|
|
|
|
|
406 |
if (FeedWordPress::needs_upgrade()) :
|
407 |
fwp_upgrade_page();
|
408 |
return;
|
@@ -414,7 +438,7 @@ class FeedWordPressAdminPage {
|
|
414 |
// Process POST request, if any ////////////////
|
415 |
////////////////////////////////////////////////
|
416 |
if (strtoupper($_SERVER['REQUEST_METHOD'])=='POST') :
|
417 |
-
$this->accept_POST($
|
418 |
else :
|
419 |
$this->updated = false;
|
420 |
endif;
|
@@ -539,7 +563,7 @@ class FeedWordPressAdminPage {
|
|
539 |
endif;
|
540 |
|
541 |
if (isset($params['site-wide-url'])) : $href = $params['site-wide-url'];
|
542 |
-
else : $href =
|
543 |
endif;
|
544 |
|
545 |
if (isset($params['setting-default'])) : $settingDefault = $params['setting-default'];
|
@@ -1072,7 +1096,6 @@ function fwp_remove_meta_box($id, $page, $context) {
|
|
1072 |
} /* function fwp_remove_meta_box() */
|
1073 |
|
1074 |
function fwp_syndication_manage_page_links_table_rows ($links, $page, $visible = 'Y') {
|
1075 |
-
global $fwp_path;
|
1076 |
|
1077 |
$subscribed = ('Y' == strtoupper($visible));
|
1078 |
if ($subscribed or (count($links) > 0)) :
|
@@ -1183,7 +1206,6 @@ function fwp_syndication_manage_page_links_table_rows ($links, $page, $visible =
|
|
1183 |
<tr<?php echo ((count($trClass) > 0) ? ' class="'.implode(" ", $trClass).'"':''); ?>>
|
1184 |
<th class="check-column" scope="row"><input type="checkbox" name="link_ids[]" value="<?php echo $link->link_id; ?>" /></th>
|
1185 |
<?php
|
1186 |
-
$hrefPrefix = "admin.php?link_id={$link->link_id}&page=${fwp_path}/";
|
1187 |
$caption = (
|
1188 |
(strlen($link->link_rss) > 0)
|
1189 |
? __('Switch Feed')
|
@@ -1191,7 +1213,7 @@ function fwp_syndication_manage_page_links_table_rows ($links, $page, $visible =
|
|
1191 |
);
|
1192 |
?>
|
1193 |
<td>
|
1194 |
-
<strong><a href="<?php print $
|
1195 |
<div class="row-actions"><?php if ($subscribed) :
|
1196 |
$page->display_feed_settings_page_links(array(
|
1197 |
'before' => '<div><strong>Settings ></strong> ',
|
@@ -1202,11 +1224,11 @@ function fwp_syndication_manage_page_links_table_rows ($links, $page, $visible =
|
|
1202 |
|
1203 |
<div><strong>Actions ></strong>
|
1204 |
<?php if ($subscribed) : ?>
|
1205 |
-
<a href="<?php print $
|
1206 |
<?php else : ?>
|
1207 |
-
<a href="<?php print $
|
1208 |
<?php endif; ?>
|
1209 |
-
| <a href="<?php print $
|
1210 |
| <a href="<?php print esc_html($link->link_url); ?>"><?php _e('View')?></a></div>
|
1211 |
</div>
|
1212 |
</td>
|
@@ -1239,19 +1261,3 @@ function fwp_syndication_manage_page_links_table_rows ($links, $page, $visible =
|
|
1239 |
endif;
|
1240 |
} /* function fwp_syndication_manage_page_links_table_rows () */
|
1241 |
|
1242 |
-
function fwp_syndication_manage_page_links_subsubsub ($sources, $showInactive) {
|
1243 |
-
global $fwp_path;
|
1244 |
-
$hrefPrefix = "admin.php?page=${fwp_path}/syndication.php";
|
1245 |
-
?>
|
1246 |
-
<ul class="subsubsub">
|
1247 |
-
<li><a <?php if (!$showInactive) : ?>class="current" <?php endif; ?>href="<?php print $hrefPrefix; ?>&visibility=Y">Subscribed
|
1248 |
-
<span class="count">(<?php print count($sources['Y']); ?>)</span></a></li>
|
1249 |
-
<?php if ($showInactive or (count($sources['N']) > 0)) : ?>
|
1250 |
-
<li><a <?php if ($showInactive) : ?>class="current" <?php endif; ?>href="<?php print $hrefPrefix; ?>&visibility=N">Inactive</a>
|
1251 |
-
<span class="count">(<?php print count($sources['N']); ?>)</span></a></li>
|
1252 |
-
<?php endif; ?>
|
1253 |
-
|
1254 |
-
</ul> <!-- class="subsubsub" -->
|
1255 |
-
<?php
|
1256 |
-
}
|
1257 |
-
|
241 |
<?php
|
242 |
} /* FeedWordPressAdminPage::ajax_interface_js () */
|
243 |
|
244 |
+
function admin_page_href ($page, $params = array(), $link = NULL) {
|
245 |
+
global $fwp_path;
|
246 |
+
|
247 |
+
// Merge in the page's filename
|
248 |
+
$params = array_merge($params, array('page' => $fwp_path.'/'.$page));
|
249 |
+
|
250 |
+
// If there is a link ID provided, then merge that in too.
|
251 |
+
if (!is_null($link)) :
|
252 |
+
$link_id = NULL;
|
253 |
+
if (is_object($link)) :
|
254 |
+
if (method_exists($link, 'found')) :
|
255 |
+
// Is this a SyndicatedLink object?
|
256 |
+
if ($link->found()) :
|
257 |
+
$link_id = $link->link->link_id;
|
258 |
+
endif;
|
259 |
+
else :
|
260 |
+
// Is this a wp_links table record?
|
261 |
+
$link_id = $link->link_id;
|
262 |
+
endif;
|
263 |
+
else :
|
264 |
+
// Is this just a numeric ID?
|
265 |
+
$link_id = $link;
|
266 |
+
endif;
|
267 |
+
|
268 |
+
if (!is_null($link_id)) :
|
269 |
+
$params = array_merge($params, array('link_id' => $link_id));
|
270 |
+
endif;
|
271 |
+
endif;
|
272 |
+
|
273 |
+
return MyPHP::url(admin_url('admin.php'), $params);
|
274 |
+
} /* FeedWordPressAdminPage::admin_page_href () */
|
275 |
+
|
276 |
function display_feed_settings_page_links ($params = array()) {
|
277 |
global $fwp_path;
|
278 |
|
292 |
'Categories' => array('page' => 'categories-page.php', 'long' => 'Categories & Tags'),
|
293 |
);
|
294 |
|
|
|
|
|
295 |
$link_id = NULL;
|
296 |
if (is_object($sub)) :
|
297 |
if (method_exists($sub, 'found')) :
|
303 |
endif;
|
304 |
endif;
|
305 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
306 |
print $params['before']; $first = true;
|
307 |
foreach ($links as $label => $link) :
|
308 |
if (!$first) : print $params['between']; endif;
|
309 |
|
310 |
+
if (isset($link['url'])) : MyPHP::url($link['url'], array("link_id" => $link_id));
|
311 |
+
else : $url = $this->admin_page_href($link['page'], array(), $sub);
|
312 |
endif;
|
313 |
$url = esc_html($url);
|
314 |
|
366 |
} /* FeedWordPressAdminPage::display_feed_select_dropdown() */
|
367 |
|
368 |
function display_sheet_header ($pagename = 'Syndication', $all = false) {
|
369 |
+
global $fwp_path;
|
370 |
?>
|
371 |
+
<div class="icon32"><img src="<?php print esc_html(WP_PLUGIN_URL.'/'.$fwp_path.'/feedwordpress.png'); ?>" alt="" /></div>
|
372 |
<h2><?php print esc_html(__($pagename.($all ? '' : ' Settings'))); ?><?php if ($this->for_feed_settings()) : ?>: <?php echo esc_html($this->link->name(/*from feed=*/ false)); ?><?php endif; ?></h2>
|
373 |
<?php
|
374 |
}
|
417 |
if (is_null($filename)) :
|
418 |
$filename = basename($this->filename);
|
419 |
endif;
|
420 |
+
return $this->admin_page_href($filename);
|
421 |
} /* FeedWordPressAdminPage::form_action () */
|
422 |
|
423 |
function update_message () {
|
425 |
}
|
426 |
|
427 |
function display () {
|
428 |
+
global $fwp_post;
|
429 |
+
|
430 |
if (FeedWordPress::needs_upgrade()) :
|
431 |
fwp_upgrade_page();
|
432 |
return;
|
438 |
// Process POST request, if any ////////////////
|
439 |
////////////////////////////////////////////////
|
440 |
if (strtoupper($_SERVER['REQUEST_METHOD'])=='POST') :
|
441 |
+
$this->accept_POST($fwp_post);
|
442 |
else :
|
443 |
$this->updated = false;
|
444 |
endif;
|
563 |
endif;
|
564 |
|
565 |
if (isset($params['site-wide-url'])) : $href = $params['site-wide-url'];
|
566 |
+
else : $href = $this->admin_page_href($filename);
|
567 |
endif;
|
568 |
|
569 |
if (isset($params['setting-default'])) : $settingDefault = $params['setting-default'];
|
1096 |
} /* function fwp_remove_meta_box() */
|
1097 |
|
1098 |
function fwp_syndication_manage_page_links_table_rows ($links, $page, $visible = 'Y') {
|
|
|
1099 |
|
1100 |
$subscribed = ('Y' == strtoupper($visible));
|
1101 |
if ($subscribed or (count($links) > 0)) :
|
1206 |
<tr<?php echo ((count($trClass) > 0) ? ' class="'.implode(" ", $trClass).'"':''); ?>>
|
1207 |
<th class="check-column" scope="row"><input type="checkbox" name="link_ids[]" value="<?php echo $link->link_id; ?>" /></th>
|
1208 |
<?php
|
|
|
1209 |
$caption = (
|
1210 |
(strlen($link->link_rss) > 0)
|
1211 |
? __('Switch Feed')
|
1213 |
);
|
1214 |
?>
|
1215 |
<td>
|
1216 |
+
<strong><a href="<?php print $page->admin_page_href('feeds-page.php', array(), $link); ?>"><?php print esc_html($link->link_name); ?></a></strong>
|
1217 |
<div class="row-actions"><?php if ($subscribed) :
|
1218 |
$page->display_feed_settings_page_links(array(
|
1219 |
'before' => '<div><strong>Settings ></strong> ',
|
1224 |
|
1225 |
<div><strong>Actions ></strong>
|
1226 |
<?php if ($subscribed) : ?>
|
1227 |
+
<a href="<?php print $page->admin_page_href('syndication.php', array('action' => 'feedfinder'), $link); ?>"><?php echo $caption; ?></a>
|
1228 |
<?php else : ?>
|
1229 |
+
<a href="<?php print $page->admin_page_href('syndication.php', array('action' => FWP_RESUB_CHECKED), $link); ?>"><?php _e('Re-subscribe'); ?></a>
|
1230 |
<?php endif; ?>
|
1231 |
+
| <a href="<?php print $page->admin_page_href('syndication.php', array('action' => 'Unsubscribe'), $link); ?>"><?php _e(($subscribed ? 'Unsubscribe' : 'Delete permanently')); ?></a>
|
1232 |
| <a href="<?php print esc_html($link->link_url); ?>"><?php _e('View')?></a></div>
|
1233 |
</div>
|
1234 |
</td>
|
1261 |
endif;
|
1262 |
} /* function fwp_syndication_manage_page_links_table_rows () */
|
1263 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
categories-page.php
CHANGED
@@ -100,7 +100,7 @@ class FeedWordPressCategoriesPage extends FeedWordPressAdminPage {
|
|
100 |
endforeach;
|
101 |
|
102 |
if ($this->for_feed_settings()) :
|
103 |
-
$href =
|
104 |
|
105 |
foreach ($unmatched as $what => $um) :
|
106 |
// Is the global default setting appropriate to this post type?
|
@@ -450,7 +450,8 @@ blank.</p></td>
|
|
450 |
|
451 |
$globalDogs = SyndicatedPost::category_ids($globalCats, /*unfamiliar=*/ 'create:'.$tax, /*taxonomies=*/ array($tax));
|
452 |
|
453 |
-
$siteWideHref =
|
|
|
454 |
if ($page->for_feed_settings()) :
|
455 |
?>
|
456 |
</td>
|
100 |
endforeach;
|
101 |
|
102 |
if ($this->for_feed_settings()) :
|
103 |
+
$href = $this->admin_page_href(basename(__FILE__));
|
104 |
|
105 |
foreach ($unmatched as $what => $um) :
|
106 |
// Is the global default setting appropriate to this post type?
|
450 |
|
451 |
$globalDogs = SyndicatedPost::category_ids($globalCats, /*unfamiliar=*/ 'create:'.$tax, /*taxonomies=*/ array($tax));
|
452 |
|
453 |
+
$siteWideHref = $this->admin_page_href(basename(__FILE__));
|
454 |
+
|
455 |
if ($page->for_feed_settings()) :
|
456 |
?>
|
457 |
</td>
|
compatability.php
CHANGED
@@ -177,7 +177,7 @@ function fwp_time_elapsed ($ts) {
|
|
177 |
################################################################################
|
178 |
|
179 |
function fwp_upgrade_page () {
|
180 |
-
if (
|
181 |
$ver = get_option('feedwordpress_version');
|
182 |
if (get_option('feedwordpress_version') != FEEDWORDPRESS_VERSION) :
|
183 |
echo "<div class=\"wrap\">\n";
|
177 |
################################################################################
|
178 |
|
179 |
function fwp_upgrade_page () {
|
180 |
+
if (MyPHP::post('action')=='Upgrade') :
|
181 |
$ver = get_option('feedwordpress_version');
|
182 |
if (get_option('feedwordpress_version') != FEEDWORDPRESS_VERSION) :
|
183 |
echo "<div class=\"wrap\">\n";
|
diagnostics-page.php
CHANGED
@@ -28,7 +28,7 @@ class FeedWordPressDiagnosticsPage extends FeedWordPressAdminPage {
|
|
28 |
|
29 |
if (strtoupper($_SERVER['REQUEST_METHOD'])=='POST') :
|
30 |
$this->accept_POST($fwp_post);
|
31 |
-
do_action('feedwordpress_admin_page_diagnostics_save', $
|
32 |
endif;
|
33 |
|
34 |
////////////////////////////////////////////////
|
28 |
|
29 |
if (strtoupper($_SERVER['REQUEST_METHOD'])=='POST') :
|
30 |
$this->accept_POST($fwp_post);
|
31 |
+
do_action('feedwordpress_admin_page_diagnostics_save', $fwp_post, $this);
|
32 |
endif;
|
33 |
|
34 |
////////////////////////////////////////////////
|
externals/myphp/myphp.class.php
ADDED
@@ -0,0 +1,88 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
if (!class_exists('MyPHP')) :
|
3 |
+
class MyPHP {
|
4 |
+
// For dealing with HTTP GET/POST parameters sent to us as input
|
5 |
+
static public function param ($key, $default = NULL, $type = 'REQUEST') {
|
6 |
+
// PHP 5.4 introduces "just-in-time" initialization of
|
7 |
+
// $GLOBALS. Which seems to me largely to defeat the
|
8 |
+
// purpose of the $GLOBALS array. But whatever. Force
|
9 |
+
// $_GET, $_POST, and $_REQUEST into the array.
|
10 |
+
global $_GET, $_POST, $_REQUEST;
|
11 |
+
|
12 |
+
$where = '_'.strtoupper($type);
|
13 |
+
$ret = $default;
|
14 |
+
if (isset($GLOBALS[$where]) and is_array($GLOBALS[$where])) :
|
15 |
+
if (isset($GLOBALS[$where][$key])) :
|
16 |
+
$ret = $GLOBALS[$where][$key];
|
17 |
+
|
18 |
+
// Magic quotes are like the stupidest
|
19 |
+
// thing ever.
|
20 |
+
if (get_magic_quotes_gpc()) :
|
21 |
+
$ret = self::stripslashes_deep($ret);
|
22 |
+
endif;
|
23 |
+
endif;
|
24 |
+
endif;
|
25 |
+
|
26 |
+
return $ret;
|
27 |
+
} /* MyPHP::param () */
|
28 |
+
|
29 |
+
static function post ($key, $default = NULL) {
|
30 |
+
return self::param($key, $default, 'POST');
|
31 |
+
} /*MyPHP::post () */
|
32 |
+
|
33 |
+
static function get ($key, $default = NULL) {
|
34 |
+
return self::param($key, $default, "GET");
|
35 |
+
} /* MyPHP::get () */
|
36 |
+
|
37 |
+
static function request ($key, $default = NULL) {
|
38 |
+
return self::param($key, $default, "REQUEST");
|
39 |
+
} /* MyPHP::request () */
|
40 |
+
|
41 |
+
static function stripslashes_deep ($value) {
|
42 |
+
if ( is_array($value) ) {
|
43 |
+
$value = array_map(array(__CLASS__, 'stripslashes_deep'), $value);
|
44 |
+
} elseif ( is_object($value) ) {
|
45 |
+
$vars = get_object_vars( $value );
|
46 |
+
foreach ($vars as $key=>$data) {
|
47 |
+
$value->{$key} = stripslashes_deep( $data );
|
48 |
+
}
|
49 |
+
} else {
|
50 |
+
$value = stripslashes($value);
|
51 |
+
}
|
52 |
+
return $value;
|
53 |
+
} /* MyPHP::stripslashes_deep () */
|
54 |
+
|
55 |
+
static function url ($url, $params = array()) {
|
56 |
+
$sep = '?';
|
57 |
+
if (strpos($url, '?') !== false) :
|
58 |
+
$sep = '&';
|
59 |
+
endif;
|
60 |
+
$url .= $sep . self::to_http_post($params);
|
61 |
+
|
62 |
+
return $url;
|
63 |
+
} /* MyPHP::url () */
|
64 |
+
|
65 |
+
/**
|
66 |
+
* MyPHP::to_http_post () -- convert a hash table or object into
|
67 |
+
* an application/x-www-form-urlencoded query string
|
68 |
+
*/
|
69 |
+
static function to_http_post ($params) {
|
70 |
+
$getQuery = array();
|
71 |
+
foreach ($params as $key => $value) :
|
72 |
+
if (is_scalar($value)) :
|
73 |
+
$getQuery[] = urlencode($key) . '=' . urlencode($value);
|
74 |
+
else :
|
75 |
+
// Make some attempt to deal with array and
|
76 |
+
// object members. Really we should descend
|
77 |
+
// recursively to get the whole thing....
|
78 |
+
foreach ((array) $value as $k => $v) :
|
79 |
+
$getQuery[] = urlencode($key.'['.$k.']') . '=' . urlencode($v);
|
80 |
+
endforeach;
|
81 |
+
endif;
|
82 |
+
endforeach;
|
83 |
+
return implode("&", $getQuery);
|
84 |
+
} /* MyPHP::to_http_post () */
|
85 |
+
}
|
86 |
+
endif;
|
87 |
+
|
88 |
+
|
feeds-page.php
CHANGED
@@ -711,11 +711,12 @@ class FeedWordPressFeedsPage extends FeedWordPressAdminPage {
|
|
711 |
} /* FeedWordPressFeedsPage::feed_information_box() */
|
712 |
|
713 |
function custom_settings_box ($page, $box = NULL) {
|
|
|
714 |
?>
|
715 |
<p class="setting-description">These custom settings are special fields for the <strong>feed</strong> you are
|
716 |
syndicating, to be retrieved in templates using the <code>get_feed_meta()</code> function. They do not create
|
717 |
custom fields on syndicated <strong>posts</strong>. If you want to create custom fields that are applied to each
|
718 |
-
individual post from this feed, set up the settings in <a href="
|
719 |
|
720 |
<div id="postcustomstuff">
|
721 |
<table id="meta-list" cellpadding="3">
|
@@ -900,7 +901,7 @@ class FeedWordPressFeedsPage extends FeedWordPressAdminPage {
|
|
900 |
$feed_version = '';
|
901 |
endif;
|
902 |
?>
|
903 |
-
<form<?php print $form_class; ?> action="
|
904 |
<div class="inside"><?php FeedWordPressCompatibility::stamp_nonce('feedwordpress_switchfeed'); ?>
|
905 |
|
906 |
<?php
|
@@ -1068,7 +1069,7 @@ class FeedWordPressFeedsPage extends FeedWordPressAdminPage {
|
|
1068 |
$alt = $params['alt'];
|
1069 |
|
1070 |
?>
|
1071 |
-
<form action="
|
1072 |
<div class="inside"><?php
|
1073 |
FeedWordPressCompatibility::stamp_nonce($this->dispatch);
|
1074 |
?>
|
711 |
} /* FeedWordPressFeedsPage::feed_information_box() */
|
712 |
|
713 |
function custom_settings_box ($page, $box = NULL) {
|
714 |
+
$postsSettings = $this->admin_page_href('posts-page.php', array(), $page->link);
|
715 |
?>
|
716 |
<p class="setting-description">These custom settings are special fields for the <strong>feed</strong> you are
|
717 |
syndicating, to be retrieved in templates using the <code>get_feed_meta()</code> function. They do not create
|
718 |
custom fields on syndicated <strong>posts</strong>. If you want to create custom fields that are applied to each
|
719 |
+
individual post from this feed, set up the settings in <a href="<?php print $postsSettings; ?>">Syndicated Posts</a>.</p>
|
720 |
|
721 |
<div id="postcustomstuff">
|
722 |
<table id="meta-list" cellpadding="3">
|
901 |
$feed_version = '';
|
902 |
endif;
|
903 |
?>
|
904 |
+
<form<?php print $form_class; ?> action="<?php $this->form_action('syndication.php'); ?>" method="post">
|
905 |
<div class="inside"><?php FeedWordPressCompatibility::stamp_nonce('feedwordpress_switchfeed'); ?>
|
906 |
|
907 |
<?php
|
1069 |
$alt = $params['alt'];
|
1070 |
|
1071 |
?>
|
1072 |
+
<form action="<?php $this->form_action(); ?>" method="post">
|
1073 |
<div class="inside"><?php
|
1074 |
FeedWordPressCompatibility::stamp_nonce($this->dispatch);
|
1075 |
?>
|
feedwordpress.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: FeedWordPress
|
4 |
Plugin URI: http://feedwordpress.radgeek.com/
|
5 |
Description: simple and flexible Atom/RSS syndication for WordPress
|
6 |
-
Version: 2013.
|
7 |
Author: Charles Johnson
|
8 |
Author URI: http://radgeek.com/
|
9 |
License: GPL
|
@@ -11,7 +11,7 @@ License: GPL
|
|
11 |
|
12 |
/**
|
13 |
* @package FeedWordPress
|
14 |
-
* @version 2013.
|
15 |
*/
|
16 |
|
17 |
# This uses code derived from:
|
@@ -32,7 +32,7 @@ License: GPL
|
|
32 |
|
33 |
# -- Don't change these unless you know what you're doing...
|
34 |
|
35 |
-
define ('FEEDWORDPRESS_VERSION', '2013.
|
36 |
define ('FEEDWORDPRESS_AUTHOR_CONTACT', 'http://radgeek.com/contact');
|
37 |
|
38 |
if (!defined('FEEDWORDPRESS_BLEG')) :
|
@@ -794,14 +794,15 @@ function fwp_publish_post_hook ($post_id) {
|
|
794 |
|
795 |
function feedwordpress_add_post_edit_controls () {
|
796 |
global $feedwordpress;
|
797 |
-
|
|
|
798 |
// Put in Manual Editing checkbox
|
799 |
add_meta_box('feedwordpress-post-controls', __('Syndication'), 'feedwordpress_post_edit_controls', 'post', 'side', 'high');
|
800 |
|
801 |
add_filter('user_can_richedit', array($feedwordpress, 'user_can_richedit'), 1000, 1);
|
802 |
|
803 |
if (FeedWordPress::diagnostic_on('syndicated_posts:static_meta_data')) :
|
804 |
-
$
|
805 |
endif;
|
806 |
} // function FeedWordPress::postEditControls
|
807 |
|
3 |
Plugin Name: FeedWordPress
|
4 |
Plugin URI: http://feedwordpress.radgeek.com/
|
5 |
Description: simple and flexible Atom/RSS syndication for WordPress
|
6 |
+
Version: 2013.0504
|
7 |
Author: Charles Johnson
|
8 |
Author URI: http://radgeek.com/
|
9 |
License: GPL
|
11 |
|
12 |
/**
|
13 |
* @package FeedWordPress
|
14 |
+
* @version 2013.0504
|
15 |
*/
|
16 |
|
17 |
# This uses code derived from:
|
32 |
|
33 |
# -- Don't change these unless you know what you're doing...
|
34 |
|
35 |
+
define ('FEEDWORDPRESS_VERSION', '2013.0504');
|
36 |
define ('FEEDWORDPRESS_AUTHOR_CONTACT', 'http://radgeek.com/contact');
|
37 |
|
38 |
if (!defined('FEEDWORDPRESS_BLEG')) :
|
794 |
|
795 |
function feedwordpress_add_post_edit_controls () {
|
796 |
global $feedwordpress;
|
797 |
+
global $inspectPostMeta;
|
798 |
+
|
799 |
// Put in Manual Editing checkbox
|
800 |
add_meta_box('feedwordpress-post-controls', __('Syndication'), 'feedwordpress_post_edit_controls', 'post', 'side', 'high');
|
801 |
|
802 |
add_filter('user_can_richedit', array($feedwordpress, 'user_can_richedit'), 1000, 1);
|
803 |
|
804 |
if (FeedWordPress::diagnostic_on('syndicated_posts:static_meta_data')) :
|
805 |
+
$inspectPostMeta = new InspectPostMeta;
|
806 |
endif;
|
807 |
} // function FeedWordPress::postEditControls
|
808 |
|
feedwordpress_file.class.php
CHANGED
@@ -1,5 +1,7 @@
|
|
1 |
<?php
|
2 |
-
$
|
|
|
|
|
3 |
|
4 |
class FeedWordPress_File extends WP_SimplePie_File {
|
5 |
function FeedWordPress_File ($url, $timeout = 10, $redirects = 5, $headers = null, $useragent = null, $force_fsockopen = false) {
|
1 |
<?php
|
2 |
+
global $fwp_credentials;
|
3 |
+
|
4 |
+
$fwp_credentials = NULL;
|
5 |
|
6 |
class FeedWordPress_File extends WP_SimplePie_File {
|
7 |
function FeedWordPress_File ($url, $timeout = 10, $redirects = 5, $headers = null, $useragent = null, $force_fsockopen = false) {
|
feedwordpresslocalpost.class.php
CHANGED
@@ -91,7 +91,8 @@ class FeedWordPressLocalPost {
|
|
91 |
}
|
92 |
|
93 |
public function feed () {
|
94 |
-
|
|
|
95 |
}
|
96 |
|
97 |
public function feed_id () {
|
91 |
}
|
92 |
|
93 |
public function feed () {
|
94 |
+
global $feedwordpress;
|
95 |
+
return $feedwordpress->subscription($this->feed_id());
|
96 |
}
|
97 |
|
98 |
public function feed_id () {
|
feedwordpresssyndicationpage.class.php
CHANGED
@@ -431,7 +431,7 @@ class FeedWordPressSyndicationPage extends FeedWordPressAdminPage {
|
|
431 |
|
432 |
// Hey ho, let's go...
|
433 |
?>
|
434 |
-
<div style="float: left; background: #F5F5F5; padding-top: 5px; padding-right: 5px;"><a href="<?php print $this->form_action(); ?>"><img src="<?php print esc_html(WP_PLUGIN_URL.
|
435 |
|
436 |
<p class="info" style="margin-bottom: 0px; border-bottom: 1px dotted black;">Managed by <a href="http://feedwordpress.radgeek.com/">FeedWordPress</a>
|
437 |
<?php print FEEDWORDPRESS_VERSION; ?>.</p>
|
@@ -567,7 +567,7 @@ class FeedWordPressSyndicationPage extends FeedWordPressAdminPage {
|
|
567 |
<div class="alignleft">
|
568 |
<?php
|
569 |
if (count($sources[$visibility]) > 0) :
|
570 |
-
|
571 |
endif;
|
572 |
?>
|
573 |
</div> <!-- class="alignleft" -->
|
@@ -590,9 +590,7 @@ class FeedWordPressSyndicationPage extends FeedWordPressAdminPage {
|
|
590 |
if (count($sources[$visibility]) > 0) :
|
591 |
$this->display_button_bar($showInactive);
|
592 |
else :
|
593 |
-
|
594 |
-
<?php fwp_syndication_manage_page_links_subsubsub($sources, $showInactive); ?>
|
595 |
-
<?php
|
596 |
endif;
|
597 |
|
598 |
fwp_syndication_manage_page_links_table_rows($sources[$visibility], $this, $visibility);
|
@@ -601,7 +599,22 @@ class FeedWordPressSyndicationPage extends FeedWordPressAdminPage {
|
|
601 |
</form>
|
602 |
<?php
|
603 |
} /* FeedWordPressSyndicationPage::syndicated_sources_box() */
|
604 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
605 |
function display_button_bar ($showInactive) {
|
606 |
?>
|
607 |
<div style="clear: left" class="alignleft">
|
@@ -650,7 +663,7 @@ support, and documentation.</p>
|
|
650 |
<input type="hidden" name="cmd" value="_xclick" />
|
651 |
<input type="hidden" name="item_name" value="FeedWordPress donation" />
|
652 |
<input type="hidden" name="no_shipping" value="1" />
|
653 |
-
<input type="hidden" name="return" value="<?php print
|
654 |
<input type="hidden" name="currency_code" value="USD" />
|
655 |
<input type="hidden" name="notify_url" value="http://feedwordpress.radgeek.com/ipn/donation" />
|
656 |
<input type="hidden" name="custom" value="1" />
|
@@ -682,21 +695,20 @@ regular donation</a>) using an existing PayPal account or any major credit card.
|
|
682 |
|
683 |
function multidelete_page () {
|
684 |
global $wpdb;
|
685 |
-
global $fwp_post;
|
686 |
|
687 |
// If this is a POST, validate source and user credentials
|
688 |
FeedWordPressCompatibility::validate_http_request(/*action=*/ 'feedwordpress_feeds', /*capability=*/ 'manage_links');
|
689 |
|
690 |
-
if (
|
691 |
return true; // Continue without further ado.
|
692 |
endif;
|
693 |
|
694 |
$link_ids = (isset($_REQUEST['link_ids']) ? $_REQUEST['link_ids'] : array());
|
695 |
if (isset($_REQUEST['link_id'])) : array_push($link_ids, $_REQUEST['link_id']); endif;
|
696 |
|
697 |
-
if (
|
698 |
-
if (
|
699 |
-
$actions =
|
700 |
else :
|
701 |
$actions = array();
|
702 |
endif;
|
@@ -862,9 +874,9 @@ regular donation</a>) using an existing PayPal account or any major credit card.
|
|
862 |
$link_ids = (isset($_REQUEST['link_ids']) ? $_REQUEST['link_ids'] : array());
|
863 |
if (isset($_REQUEST['link_id'])) : array_push($link_ids, $_REQUEST['link_id']); endif;
|
864 |
|
865 |
-
if (
|
866 |
-
if (
|
867 |
-
$actions =
|
868 |
else :
|
869 |
$actions = array();
|
870 |
endif;
|
@@ -1068,7 +1080,7 @@ function fwp_syndication_manage_page_update_box ($object = NULL, $box = NULL) {
|
|
1068 |
<p class="heads-up"><strong>Note:</strong> Automatic updates are currently turned
|
1069 |
<strong>off</strong>. New posts from your feeds will not be syndicated
|
1070 |
until you manually check for them here. You can turn on automatic
|
1071 |
-
updates under <a href="
|
1072 |
<?php
|
1073 |
endif;
|
1074 |
?>
|
@@ -1104,7 +1116,7 @@ function fwp_feedfinder_page () {
|
|
1104 |
|
1105 |
function fwp_switchfeed_page () {
|
1106 |
global $wpdb, $wp_db_version;
|
1107 |
-
global $fwp_post;
|
1108 |
|
1109 |
// If this is a POST, validate source and user credentials
|
1110 |
FeedWordPressCompatibility::validate_http_request(/*action=*/ 'feedwordpress_switchfeed', /*capability=*/ 'manage_links');
|
@@ -1121,7 +1133,7 @@ function fwp_switchfeed_page () {
|
|
1121 |
<div class="updated"><p><a href="<?php print $fwp_post['feed_link']; ?>"><?php print esc_html($fwp_post['feed_title']); ?></a>
|
1122 |
has been added as a contributing site, using the feed at
|
1123 |
<<a href="<?php print $fwp_post['feed']; ?>"><?php print esc_html($fwp_post['feed']); ?></a>>.
|
1124 |
-
| <a href="admin.php?page=<?php print $
|
1125 |
<?php else: ?>
|
1126 |
<div class="updated"><p>There was a problem adding the feed. [SQL: <?php echo esc_html(mysql_error()); ?>]</p></div>
|
1127 |
<?php endif;
|
431 |
|
432 |
// Hey ho, let's go...
|
433 |
?>
|
434 |
+
<div style="float: left; background: #F5F5F5; padding-top: 5px; padding-right: 5px;"><a href="<?php print $this->form_action(); ?>"><img src="<?php print esc_html(WP_PLUGIN_URL."/${fwp_path}/feedwordpress.png"); ?>" alt="" /></a></div>
|
435 |
|
436 |
<p class="info" style="margin-bottom: 0px; border-bottom: 1px dotted black;">Managed by <a href="http://feedwordpress.radgeek.com/">FeedWordPress</a>
|
437 |
<?php print FEEDWORDPRESS_VERSION; ?>.</p>
|
567 |
<div class="alignleft">
|
568 |
<?php
|
569 |
if (count($sources[$visibility]) > 0) :
|
570 |
+
$this->manage_page_links_subsubsub($sources, $showInactive);
|
571 |
endif;
|
572 |
?>
|
573 |
</div> <!-- class="alignleft" -->
|
590 |
if (count($sources[$visibility]) > 0) :
|
591 |
$this->display_button_bar($showInactive);
|
592 |
else :
|
593 |
+
$this->manage_page_links_subsubsub($sources, $showInactive);
|
|
|
|
|
594 |
endif;
|
595 |
|
596 |
fwp_syndication_manage_page_links_table_rows($sources[$visibility], $this, $visibility);
|
599 |
</form>
|
600 |
<?php
|
601 |
} /* FeedWordPressSyndicationPage::syndicated_sources_box() */
|
602 |
+
|
603 |
+
function manage_page_links_subsubsub ($sources, $showInactive) {
|
604 |
+
$hrefPrefix = $this->admin_page_href("syndication.php");
|
605 |
+
?>
|
606 |
+
<ul class="subsubsub">
|
607 |
+
<li><a <?php if (!$showInactive) : ?>class="current" <?php endif; ?>href="<?php print $hrefPrefix; ?>&visibility=Y">Subscribed
|
608 |
+
<span class="count">(<?php print count($sources['Y']); ?>)</span></a></li>
|
609 |
+
<?php if ($showInactive or (count($sources['N']) > 0)) : ?>
|
610 |
+
<li><a <?php if ($showInactive) : ?>class="current" <?php endif; ?>href="<?php print $hrefPrefix; ?>&visibility=N">Inactive</a>
|
611 |
+
<span class="count">(<?php print count($sources['N']); ?>)</span></a></li>
|
612 |
+
<?php endif; ?>
|
613 |
+
|
614 |
+
</ul> <!-- class="subsubsub" -->
|
615 |
+
<?php
|
616 |
+
}
|
617 |
+
|
618 |
function display_button_bar ($showInactive) {
|
619 |
?>
|
620 |
<div style="clear: left" class="alignleft">
|
663 |
<input type="hidden" name="cmd" value="_xclick" />
|
664 |
<input type="hidden" name="item_name" value="FeedWordPress donation" />
|
665 |
<input type="hidden" name="no_shipping" value="1" />
|
666 |
+
<input type="hidden" name="return" value="<?php print esc_attr($this->admin_page_href(basename($this->filename), array('paid' => 'yes'))); ?>" />
|
667 |
<input type="hidden" name="currency_code" value="USD" />
|
668 |
<input type="hidden" name="notify_url" value="http://feedwordpress.radgeek.com/ipn/donation" />
|
669 |
<input type="hidden" name="custom" value="1" />
|
695 |
|
696 |
function multidelete_page () {
|
697 |
global $wpdb;
|
|
|
698 |
|
699 |
// If this is a POST, validate source and user credentials
|
700 |
FeedWordPressCompatibility::validate_http_request(/*action=*/ 'feedwordpress_feeds', /*capability=*/ 'manage_links');
|
701 |
|
702 |
+
if (MyPHP::post('submit')==FWP_CANCEL_BUTTON) :
|
703 |
return true; // Continue without further ado.
|
704 |
endif;
|
705 |
|
706 |
$link_ids = (isset($_REQUEST['link_ids']) ? $_REQUEST['link_ids'] : array());
|
707 |
if (isset($_REQUEST['link_id'])) : array_push($link_ids, $_REQUEST['link_id']); endif;
|
708 |
|
709 |
+
if (MyPHP::post('confirm')=='Delete'):
|
710 |
+
if ( is_array(MyPHP::post('link_action')) ) :
|
711 |
+
$actions = MyPHP::post('link_action');
|
712 |
else :
|
713 |
$actions = array();
|
714 |
endif;
|
874 |
$link_ids = (isset($_REQUEST['link_ids']) ? $_REQUEST['link_ids'] : array());
|
875 |
if (isset($_REQUEST['link_id'])) : array_push($link_ids, $_REQUEST['link_id']); endif;
|
876 |
|
877 |
+
if (MyPHP::post('confirm')=='Undelete'):
|
878 |
+
if ( is_array(MyPHP::post('link_action')) ) :
|
879 |
+
$actions = MyPHP::post('link_action');
|
880 |
else :
|
881 |
$actions = array();
|
882 |
endif;
|
1080 |
<p class="heads-up"><strong>Note:</strong> Automatic updates are currently turned
|
1081 |
<strong>off</strong>. New posts from your feeds will not be syndicated
|
1082 |
until you manually check for them here. You can turn on automatic
|
1083 |
+
updates under <a href="<?php print $object->admin_page_href('feeds-page.php'); ?>">Feed & Update Settings<a></a>.</p>
|
1084 |
<?php
|
1085 |
endif;
|
1086 |
?>
|
1116 |
|
1117 |
function fwp_switchfeed_page () {
|
1118 |
global $wpdb, $wp_db_version;
|
1119 |
+
global $fwp_post, $fwp_path;
|
1120 |
|
1121 |
// If this is a POST, validate source and user credentials
|
1122 |
FeedWordPressCompatibility::validate_http_request(/*action=*/ 'feedwordpress_switchfeed', /*capability=*/ 'manage_links');
|
1133 |
<div class="updated"><p><a href="<?php print $fwp_post['feed_link']; ?>"><?php print esc_html($fwp_post['feed_title']); ?></a>
|
1134 |
has been added as a contributing site, using the feed at
|
1135 |
<<a href="<?php print $fwp_post['feed']; ?>"><?php print esc_html($fwp_post['feed']); ?></a>>.
|
1136 |
+
| <a href="admin.php?page=<?php print $fwp_path; ?>/feeds-page.php&link_id=<?php print $link_id; ?>">Configure settings</a>.</p></div>
|
1137 |
<?php else: ?>
|
1138 |
<div class="updated"><p>There was a problem adding the feed. [SQL: <?php echo esc_html(mysql_error()); ?>]</p></div>
|
1139 |
<?php endif;
|
performance-page.php
CHANGED
@@ -25,7 +25,7 @@ class FeedWordPressPerformancePage extends FeedWordPressAdminPage {
|
|
25 |
|
26 |
if (strtoupper($_SERVER['REQUEST_METHOD'])=='POST') :
|
27 |
$this->accept_POST($fwp_post);
|
28 |
-
do_action('feedwordpress_admin_page_performance_save', $
|
29 |
endif;
|
30 |
|
31 |
////////////////////////////////////////////////
|
25 |
|
26 |
if (strtoupper($_SERVER['REQUEST_METHOD'])=='POST') :
|
27 |
$this->accept_POST($fwp_post);
|
28 |
+
do_action('feedwordpress_admin_page_performance_save', $fwp_post, $this);
|
29 |
endif;
|
30 |
|
31 |
////////////////////////////////////////////////
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: http://feedwordpress.radgeek.com/
|
|
4 |
Tags: syndication, aggregation, feed, atom, rss
|
5 |
Requires at least: 3.0
|
6 |
Tested up to: 3.5.1
|
7 |
-
Stable tag: 2013.
|
8 |
|
9 |
FeedWordPress syndicates content from feeds you choose into your WordPress weblog.
|
10 |
|
@@ -94,6 +94,17 @@ outs, see the documentation at the [FeedWordPress project homepage][].
|
|
94 |
|
95 |
== Changelog ==
|
96 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
97 |
= 2012.0503 =
|
98 |
|
99 |
* BUGFIX: Works properly again with WordPress installations that use a
|
4 |
Tags: syndication, aggregation, feed, atom, rss
|
5 |
Requires at least: 3.0
|
6 |
Tested up to: 3.5.1
|
7 |
+
Stable tag: 2013.0504
|
8 |
|
9 |
FeedWordPress syndicates content from feeds you choose into your WordPress weblog.
|
10 |
|
94 |
|
95 |
== Changelog ==
|
96 |
|
97 |
+
= 2012.0504 =
|
98 |
+
|
99 |
+
* BUGFIX: PHP 5.4 compatibility -- includes some more extensive fixes to
|
100 |
+
compatibility issues with PHP 5.4's handling of global variables
|
101 |
+
|
102 |
+
* MODULE REORGANIZATION: Should ensures that all needed submodules will be
|
103 |
+
properly included regardless of whether you are installing from github,
|
104 |
+
from SVN, or from the WordPress plugins page. If you've been getting
|
105 |
+
fatal errors about required modules not being found, this release should
|
106 |
+
hopefully resolve the issue.
|
107 |
+
|
108 |
= 2012.0503 =
|
109 |
|
110 |
* BUGFIX: Works properly again with WordPress installations that use a
|