dispatch = NULL; $this->filename = __FILE__; } /* FeedWordPressSyndicationPage constructor */ function has_link () { return false; } var $_sources = NULL; function sources ($visibility = 'Y') { if (is_null($this->_sources)) : $links = FeedWordPress::syndicated_links(array("hide_invisible" => false)); $this->_sources = array("Y" => array(), "N" => array()); foreach ($links as $link) : $this->_sources[$link->link_visible][] = $link; endforeach; endif; $ret = ( array_key_exists($visibility, $this->_sources) ? $this->_sources[$visibility] : $this->_sources ); return $ret; } /* FeedWordPressSyndicationPage::sources() */ function visibility_toggle () { $sources = $this->sources('*'); $defaultVisibility = 'Y'; if ((count($this->sources('N')) > 0) and (count($this->sources('Y'))==0)) : $defaultVisibility = 'N'; endif; $visibility = ( isset($_REQUEST['visibility']) ? $_REQUEST['visibility'] : $defaultVisibility ); return $visibility; } /* FeedWordPressSyndicationPage::visibility_toggle() */ function show_inactive () { return ($this->visibility_toggle() == 'N'); } function updates_requested () { global $wpdb; if (isset($_POST['update']) or isset($_POST['action']) or isset($_POST['update_uri'])) : // Only do things with side-effects for HTTP POST or command line $fwp_update_invoke = 'post'; else : $fwp_update_invoke = 'get'; endif; $update_set = array(); if ($fwp_update_invoke != 'get') : if (isset($_POST['link_ids']) and is_array($_POST['link_ids']) and ($_POST['action']==FWP_UPDATE_CHECKED)) : $targets = $wpdb->get_results(" SELECT * FROM $wpdb->links WHERE link_id IN (".implode(",",$_POST['link_ids']).") "); if (is_array($targets)) : foreach ($targets as $target) : $update_set[] = $target->link_rss; endforeach; else : // This should never happen FeedWordPress::critical_bug('fwp_syndication_manage_page::targets', $targets, __LINE__); endif; elseif (isset($_POST['update_uri'])) : $targets = $_POST['update_uri']; if (!is_array($targets)) : $targets = array($targets); endif; $update_set = $targets; endif; endif; return $update_set; } function display () { global $wpdb; if (FeedWordPress::needs_upgrade()) : fwp_upgrade_page(); return; endif; ?> 'fwp_feedfinder_page', FWP_SYNDICATE_NEW => 'fwp_feedfinder_page', "switchfeed" => 'fwp_switchfeed_page', FWP_UNSUB_CHECKED => 'fwp_multidelete_page', FWP_DELETE_CHECKED => 'fwp_multidelete_page', 'Unsubscribe' => 'fwp_multidelete_page', FWP_RESUB_CHECKED => 'fwp_multiundelete_page', ); if (isset($_REQUEST['action']) and isset($dispatcher[$_REQUEST['action']])) : $method = $dispatcher[$_REQUEST['action']]; $cont = call_user_func($method); endif; if ($cont): ?> sources('Y'); $potential_updates = (!$this->show_inactive() and (count($this->sources('Y')) > 0)); $this->open_sheet('Syndicated Sites'); ?>
updates_requested()) > 0)) : fwp_add_meta_box( /*id=*/ 'feedwordpress_update_box', /*title=*/ __('Update feeds now'), /*callback=*/ 'fwp_syndication_manage_page_update_box', /*page=*/ $this->meta_box_context(), /*context =*/ $this->meta_box_context() ); endif; fwp_add_meta_box( /*id=*/ 'feedwordpress_feeds_box', /*title=*/ __('Syndicated sources'), /*callback=*/ 'fwp_syndication_manage_page_links_box', /*page=*/ $this->meta_box_context(), /*context =*/ $this->meta_box_context() ); if (FeedWordPressCompatibility::test_version(0, FWP_SCHEMA_25)) : fwp_add_meta_box( /*id=*/ 'feedwordpress_add_feed_box', /*title=*/ 'Add a new syndicated source', /*callback=*/ 'fwp_syndication_manage_page_add_feed_box', /*page=*/ $this->meta_box_context(), /*context=*/ $this->meta_box_context() ); endif; do_action('feedwordpress_admin_page_syndication_meta_boxes', $this); ?>
meta_box_context(), $this->meta_box_context(), $this); ?>
close_sheet(/*dispatch=*/ NULL); ?>

Thank you!

Thank you for your contribution to FeedWordPress development. Your generous gifts make ongoing support and development for FeedWordPress possible.

If you have any questions about FeedWordPress, or if there is anything I can do to help make FeedWordPress more useful for you, please contact me and let me know what you're thinking about.

Charles Johnson, Developer, FeedWordPress.

Keep FeedWordPress improving

FeedWordPress makes syndication simple and empowers you to stream content from all over the web into your WordPress hub. That's got to be worth a few lattes. If you're finding FWP useful, a modest gift is the best way to support steady progress on development, enhancements, support, and documentation.

You can make a gift online (or set up an automatic regular donation) using an existing PayPal account or any major credit card.

updates_requested(); if (count($update_set) > 0) : shuffle($update_set); // randomize order for load balancing purposes... $feedwordpress = new FeedWordPress; add_action('feedwordpress_check_feed', 'update_feeds_mention'); add_action('feedwordpress_check_feed_complete', 'update_feeds_finish', 10, 3); $crash_dt = (int) get_option('feedwordpress_update_time_limit'); if ($crash_dt > 0) : $crash_ts = time() + $crash_dt; else : $crash_ts = NULL; endif; echo "
\n"; echo "\n"; if (!is_null($tdelta)) : $mesg = array(); if (isset($delta['new'])) : $mesg[] = ' '.$tdelta['new'].' new posts were syndicated'; endif; if (isset($delta['updated'])) : $mesg[] = ' '.$tdelta['updated'].' existing posts were updated'; endif; echo "

Update complete.".implode(' and', $mesg)."

"; echo "\n"; flush(); endif; echo "
\n"; endif; } function fwp_syndication_manage_page_add_feed_box ($object = NULL, $box = NULL) { ?>
bleg_thanks($subject, $box); elseif ($bleg_box_ready) : $object->bleg_box($object, $box); endif; ?>

Check currently scheduled feeds for new and updated posts.

Note: Automatic updates are currently turned off. New posts from your feeds will not be syndicated until you manually check for them here. You can turn on automatic updates under Feed & Update Settings.

show_inactive()) : ?> updates_requested() as $req) : ?>

0)) : ?> 0): foreach ($links as $link): $trClass = array(); // Prep: Get last updated timestamp $sLink = new SyndicatedLink($link->link_id); if (!is_null($sLink->setting('update/last'))) : $lastUpdated = fwp_time_elapsed($sLink->setting('update/last')); else : $lastUpdated = __('None yet'); endif; // Prep: get last error timestamp, if any if (is_null($sLink->setting('update/error'))) : $errorsSince = ''; else : $trClass[] = 'feed-error'; $theError = unserialize($sLink->setting('update/error')); $errorsSince = "
" ."

Returning errors since " .fwp_time_elapsed($theError['since']) ."

" ."

Most recent (" .fwp_time_elapsed($theError['ts']) ."):
" .implode("
", $theError['object']->get_error_messages()) ."

" ."
\n"; endif; $nextUpdate = "
Ready for next update "; if (isset($sLink->settings['update/ttl']) and is_numeric($sLink->settings['update/ttl'])) : if (isset($sLink->settings['update/timed']) and $sLink->settings['update/timed']=='automatically') : $next = $sLink->settings['update/last'] + ((int) $sLink->settings['update/ttl'] * 60); $nextUpdate .= fwp_time_elapsed($next); if (FEEDWORDPRESS_DEBUG) : $nextUpdate .= " [".(($next-time())/60)." minutes]"; endif; else : $nextUpdate .= "every ".$sLink->settings['update/ttl']." minute".(($sLink->settings['update/ttl']!=1)?"s":""); endif; else: $nextUpdate .= "as soon as possible"; endif; $nextUpdate .= "
"; unset($sLink); $alt_row = !$alt_row; if ($alt_row) : $trClass[] = 'alternate'; endif; ?> 0) ? ' class="'.implode(" ", $trClass).'"':''); ?>> link_id}&page=${fwp_path}/"; $caption = ( (strlen($link->link_rss) > 0) ? __('Switch Feed') : $caption=__('Find Feed') ); ?> link_rss) > 0): ?>
link_name); ?>
Settings > | | |
Actions > | |
link_rss, 32)); ?>

no feed assigned

There are no websites currently listed for syndication.

false)); $sources = $object->sources('*'); $visibility = $object->visibility_toggle(); $showInactive = $object->show_inactive(); $hrefPrefix = "admin.php?page=${fwp_path}/".basename(__FILE__); ?>

has been added as a contributing site, using the feed at <>. | Configure settings.

There was a problem adding the feed. [SQL: ]

set_uri($fwp_post['feed']); if ($changed): $home = $existingLink->homepage(/*from feed=*/ false); $name = $existingLink->name(/*from feed=*/ false); ?>

Feed for updated to <>.

Nothing was changed.

array(), ); foreach ($actions as $link_id => $what) : $do_it[$what][] = $link_id; endforeach; $alter = array(); if (count($do_it['unhide']) > 0) : $unhiddem = "(".implode(', ', $do_it['unhide']).")"; $alter[] = " UPDATE $wpdb->links SET link_visible = 'Y' WHERE link_id IN {$unhiddem} "; endif; $errs = array(); $success = array (); foreach ($alter as $sql) : $result = $wpdb->query($sql); if (!$result): $errs[] = mysql_error(); endif; endforeach; if (count($alter) > 0) : echo "
\n"; if (count($errs) > 0) : echo "There were some problems processing your "; echo "re-subscribe request. [SQL: ".implode('; ', $errs)."]"; else : echo "Your re-subscribe request(s) have been processed."; endif; echo "
\n"; endif; return true; // Continue on to Syndicated Sites listing else : $targets = $wpdb->get_results(" SELECT * FROM $wpdb->links WHERE link_id IN (".implode(",",$link_ids).") "); ?>

Re-subscribe to Syndicated Links:

link_visible)); $link_url = esc_html($link->link_url); $link_name = esc_html($link->link_name); $link_description = esc_html($link->link_description); $link_rss = esc_html($link->link_rss); if (!$subscribed) : ?>
Subscription :
array(), 'nuke' => array(), 'delete' => array(), ); foreach ($actions as $link_id => $what) : $do_it[$what][] = $link_id; endforeach; $alter = array(); if (count($do_it['hide']) > 0) : $hidem = "(".implode(', ', $do_it['hide']).")"; $alter[] = " UPDATE $wpdb->links SET link_visible = 'N' WHERE link_id IN {$hidem} "; endif; if (count($do_it['nuke']) > 0) : $nukem = "(".implode(', ', $do_it['nuke']).")"; // Make a list of the items syndicated from this feed... $post_ids = $wpdb->get_col(" SELECT post_id FROM $wpdb->postmeta WHERE meta_key = 'syndication_feed_id' AND meta_value IN {$nukem} "); // ... and kill them all if (count($post_ids) > 0) : foreach ($post_ids as $post_id) : if (FeedWordPressCompatibility::test_version(FWP_SCHEMA_29)) : // Force scrubbing of deleted post // rather than sending to Trashcan wp_delete_post( /*postid=*/ $post_id, /*force_delete=*/ true ); else : wp_delete_post($post_id); endif; endforeach; endif; $alter[] = " DELETE FROM $wpdb->links WHERE link_id IN {$nukem} "; endif; if (count($do_it['delete']) > 0) : $deletem = "(".implode(', ', $do_it['delete']).")"; // Make the items syndicated from this feed appear to be locally-authored $alter[] = " DELETE FROM $wpdb->postmeta WHERE meta_key = 'syndication_feed_id' AND meta_value IN {$deletem} "; // ... and delete the links themselves. $alter[] = " DELETE FROM $wpdb->links WHERE link_id IN {$deletem} "; endif; $errs = array(); $success = array (); foreach ($alter as $sql) : $result = $wpdb->query($sql); if (!$result): $errs[] = mysql_error(); endif; endforeach; if (count($alter) > 0) : echo "
\n"; if (count($errs) > 0) : echo "There were some problems processing your "; echo "unsubscribe request. [SQL: ".implode('; ', $errs)."]"; else : echo "Your unsubscribe request(s) have been processed."; endif; echo "
\n"; endif; return true; // Continue on to Syndicated Sites listing else : $targets = $wpdb->get_results(" SELECT * FROM $wpdb->links WHERE link_id IN (".implode(",",$link_ids).") "); ?>

Unsubscribe from Syndicated Links:

link_visible)); $link_url = esc_html($link->link_url); $link_name = esc_html($link->link_name); $link_description = esc_html($link->link_description); $link_rss = esc_html($link->link_rss); ?>
Subscription :
  • checked="checked" name="link_action[link_id; ?>]" value="nuke" />
display();