Plugin logic flow

Wondering what the plugin does logic wise?

The plugin logic: Fetching new posts

  1. The cron job of your site triggers the fetching of new posts every two hours
  2. For each connected platform the plugins call the API of WP Social Wall to fetch the latest social posts
  3. The API returns the posts in a unified structure
  4. The plugin walks over the returned posts and checks if they exist in the local database
  5. When a post does not exist it will be added to your local database
  6. The posts which are added are checked if it contains any media links. If it includes media it will be fetched from the URL to the WordPress media library

The plugin logic: Displaying posts

Because your local database is being updated by the corn job the plugin only reads out the local database when social posts are being requested for display. So the logic here is just a simple query to the database which sorts all the social posts on creation date and returns x amount of posts.