-
Notifications
You must be signed in to change notification settings - Fork 22
Retrieve walkthrough
Aram Zucker-Scharff edited this page Nov 23, 2013
·
8 revisions
Function order:
- Call
import-cron.php
- Call
PF_Feed_Item::assemble_feed_for_pull()
- Call
PF_Feed_Item::get_the_feed_object()
(feed-items.php:ln321) - Call
PF_Feed_Retrieve::step_through_feedlist()
- Retrieve feedlist using
pf_feedlist
(ln316) - Get
feeds_iteration
option to determine position. - Check if option indicates we are go to retrieve
feeds_go_switch
- Check what the last iteration was from option
prev_iteration
- Insure current iteration count is one greater than the last count.
- Check that we are past the last feed.
- Get the feed data from the feedlist by taking what is stored in the
feeds_iteration
as the position of the array. (slurp.php:ln190) - Check that the system has properly notified other actors that we have inside the overall iteration with the
iterate_going_switch
- Check if we are on the last key.
- If we are, we'll need to reset the retrieval process and set the
iterate_going_switch
to zero, so no further iteration occurs. We'll also be setting the feed position back to zero. - If we are not then iterate the
feeds_iteration
variable in order to send the next iteration to the correct location. - If neither case is true than ... huh? We're going to log it. (slurp.php:ln235)
- Update the
feeds_iteration
option with the new value so the next iteration works. - If the feed is empty or an error and it isn't the last key, re-call this function to get the next feed.
- If the feed is empty and this is the last feed, set all states ready to reset and return false.
- Take the feed object and transform it into an object containing items we can understand by calling
feed_handler()
(slurp.php:ln265) - Set up the feed CPT
- Check if the feed type is on the Feed CPT by calling
PF_Feeds_Schema::get_pf_feed_type($id)
. (slurp.php:ln394) - Get post meta by id to check for feed type. (feeds.php:ln416)
- IF an error is returned or a false is returned pass-through the fail data.
- ELSE return the type.
- Check if the feed's type exists with
PF_Feed_Retrieve::does_type_exist($type)
- Use
get_the_feed_object()
to get the object using the correct module function. - Unlock the process so that the system knows it can go ahead and retrieve another feed.
- Return the translated set of items.
- Attempt to retrieve the feed (ln266)
- If it fails, log it.
- Check for failure states and log
- Check for bad process states and log.
- If all is well, return the Feed as an object.
- Begin the loop to move through each feed item and send it to the database. (feed-items.php:ln321)
- Create each post and add the meta data to post_meta
- Advance Feeds using
advance_feeds()
The PressForward Plugin is developed and maintained by the Roy Rosenzweig Center for History and New Media at George Mason University as part of the PressForward Project, generously funded by the Alfred P. Sloan Foundation. Our developers include Aram Zucker-Scharff, Boone B. Gorges, and Jeremy Boggs. PressForward is free to use and modify under an AGPLv3 license.
- Home
- Installation Instructions
- Quick Start Guide
-
User Manual
- Installing PressForward
- Installing and Using the “Nominate This” Bookmarklet
- Subscribe to RSS/Atom Feeds
- Using the All Content Page: How to Read, Nominate, and Add Comments to Items
- Using the Nominated Page: How to Review, Select, and Publish Nominations
- Posting Nominated Items to WordPress
- Managing Feeds Using the Subscribed Feeds Page
- Preferences
- Tools
- Folders
- FAQ
- Recommended Server Configuration
- Developer Handbook