{"id":19107827,"url":"https://github.com/alleyinteractive/feed-consumer","last_synced_at":"2025-04-30T19:00:19.988Z","repository":{"id":63379570,"uuid":"567453665","full_name":"alleyinteractive/feed-consumer","owner":"alleyinteractive","description":"Ingest external feeds and other data sources into WordPress","archived":false,"fork":false,"pushed_at":"2025-03-31T17:31:45.000Z","size":2848,"stargazers_count":10,"open_issues_count":3,"forks_count":0,"subscribers_count":22,"default_branch":"develop","last_synced_at":"2025-04-12T22:04:29.952Z","etag":null,"topics":["feeds","wordpress","wordpress-plugin"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alleyinteractive.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-11-17T20:32:55.000Z","updated_at":"2024-08-12T20:33:25.000Z","dependencies_parsed_at":"2024-04-29T07:53:36.527Z","dependency_job_id":null,"html_url":"https://github.com/alleyinteractive/feed-consumer","commit_stats":{"total_commits":76,"total_committers":3,"mean_commits":"25.333333333333332","dds":"0.13157894736842102","last_synced_commit":"347a55973d06ded939e94322d5412a43a082d717"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":"alleyinteractive/create-wordpress-plugin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alleyinteractive%2Ffeed-consumer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alleyinteractive%2Ffeed-consumer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alleyinteractive%2Ffeed-consumer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alleyinteractive%2Ffeed-consumer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alleyinteractive","download_url":"https://codeload.github.com/alleyinteractive/feed-consumer/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251767210,"owners_count":21640467,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["feeds","wordpress","wordpress-plugin"],"created_at":"2024-11-09T04:14:08.334Z","updated_at":"2025-04-30T19:00:19.960Z","avatar_url":"https://github.com/alleyinteractive.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Feed Consumer\n\nContributors: srtfisher\n\nTags: alleyinteractive, feed-consumer, wordpress-plugin\n\nStable tag: 1.0.1\n\nRequires at least: 5.9\n\nTested up to: 6.0\n\nRequires PHP: 8.0\n\nLicense: GPL v2 or later\n\n[![Coding Standards](https://github.com/alleyinteractive/feed-consumer/actions/workflows/coding-standards.yml/badge.svg)](https://github.com/alleyinteractive/feed-consumer/actions/workflows/coding-standards.yml)\n[![Testing Suite](https://github.com/alleyinteractive/feed-consumer/actions/workflows/unit-test.yml/badge.svg)](https://github.com/alleyinteractive/feed-consumer/actions/workflows/unit-test.yml)\n\nIngest external feeds and other data sources into WordPress.\n\n## Installation\n\nYou can install the package via composer:\n\n```bash\ncomposer require alleyinteractive/feed-consumer\n```\n\n### Requirements\n\nThis plugin requires\n[Fieldmanager](https://github.com/alleyinteractive/wordpress-fieldmanager)\nto be installed and activated. It is also recommended to use\n[Alley Logger](https://github.com/alleyinteractive/logger) as well but that is not\nrequired.\n\n## Usage\n\nActivate the plugin in WordPress and you will see the new Feeds post type\navailable for use:\n\n![Screenshot of feed post type](https://user-images.githubusercontent.com/346399/208514114-06f0cc86-b4a4-42aa-b48c-b57eb84fe8fa.png)\n\nFeed Consumer is a plugin that allows you to ingest external feeds and other\ndata sources into WordPress. It is built to be extensible and can be used to\ningest data from any source that can be represented as a PHP array.\n\n### Creating a Feed\n\nTo create a feed, navigate to the Feeds post type and click Add New. You will\nsee a form that allows you to configure the feed. The feed configuration\nincludes the following fields:\n\n- **Title**: The name of the feed. This is used to identify the feed in the\n  admin.\n- **Processors**: The processors to run on the feed. Processors are used to\n  are classes that define the extractor, transformer, and loader to use for\n  the feed. For more information, see [Processors](#processors).\n\nThe selected processor will also display any settings for the processor's\nextractor, transformer, and loader.\n\n## Processors\n\nProcessors are the core of Feed Consumer. They define the extractor,\ntransformer, and loader to use for the feed.\n\nOut of the box, Feed Consumer includes the following processors:\n\n- **JSON Processor**: Extracts data from a JSON feed into WordPress posts.\n- **RSS Processor**: Extracts data from an RSS feed into WordPress posts.\n- **XML Processor**: Extracts data from an XML feed into WordPress posts.\n\n### Creating a Processor\n\n```php\nadd_filter( 'feed_consumer_processors', function ( array $processors ) {\n\t$processors[] = My_Plugin\\Processor::class;\n\n\treturn $processors;\n} );\n```\n\n### Extractors\n\nExtractors will take extract data from a remote source and return it as data to\nbe passed to a transformer. Out of the box, Feed Consumer includes JSON, XML,\nand RSS transformers among others that can be used to extract data from a\nvariety of sources. You can also create your own extractor by implementing the\n`Feed_Consumer\\Contracts\\Extractor` interface.\n\n### Transformers\n\nTransformers will take extracted data and transform it into a format that can be\nloaded into WordPress. Out of the box, Feed Consumer includes a `Post_Loader`\nthat will take transformed data and load it into WordPress as posts. You can\nalso create your own transformer by implementing the\n`Feed_Consumer\\Contracts\\Transformer` interface.\n\n### Loaders\n\nLoaders will take transformed data and load it where configured. Out of the box,\nthe `Post_Loader` will be the most common loader used to take transformed data\nand load it into WordPress as posts.\n\nYou can also create your own loader by implementing the\n`Feed_Consumer\\Contracts\\Loader` interface.\n\n#### Post Loader\n\nThe post loader will take transformed data and load it into WordPress. It will\nalso transform the content into Gutenberg blocks by default via\n[wp-block-converter](https://github.com/alleyinteractive/wp-block-converter/).\n\n## Integrations\n\n### Byline Manager\n\nThe plugin includes an integration with [Byline\nManager](https://github.com/alleyinteractive/byline-manager) to automatically\nset the byline for a post based on the feed item's author. Once the Byline\nManager plugin is enabled, the settings fields will appear on the feed to set\nthe default byline and to optionally use the feed item's author as the byline.\n\n## Hooks\n\n### `feed_consumer_run_complete`\n\nFires when a feed has completed running. The feed ID, loaded data, and processor\nclass are passed to the hook.\n\n```php\nadd_action( 'feed_consumer_run_complete', function ( int $feed_id, $loaded_data, string $processor ) {\n\t// Do something.\n}, 10, 3 );\n```\n\n### `feed_consumer_extractor_error`\n\nFires when an extractor encounters an error. The extractor response and\nextractor class are passed to the hook.\n\n```php\nadd_action( 'feed_consumer_extractor_error', function ( $response, \\Feed_Consumer\\Contracts\\Extractor $extractor ) {\n\t// Do something.\n}, 10, 2 );\n```\n\n### `feed_consumer_pre_feed_fetch`\n\nFires when a feed is about to be fetched.\n\n```php\nuse Mantle\\Http_Client\\Pending_Request;\nuse Feed_Consumer\\Contracts\\Processor;\n\nadd_action( 'feed_consumer_pre_feed_fetch', function ( Pending_Request $request, Processor $processor, array $settings ) {\n\t// Do something.\n}, 10, 3 );\n```\n\n### `feed_consumer_feed_fetch`\n\nFires when a feed has been fetched.\n\n```php\nuse Mantle\\Http_Client\\Response;\nuse Feed_Consumer\\Contracts\\Processor;\n\nadd_action( 'feed_consumer_feed_fetch', function ( Response $response, Processor $processor, array $settings ) {\n\t// Do something.\n}, 10, 3 );\n```\n\n## Changelog\n\nPlease see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.\n\n## Credits\n\nThis project is actively maintained by [Alley\nInteractive](https://github.com/alleyinteractive). Like what you see? [Come work\nwith us](https://alley.com/careers/).\n\n- [Sean Fisher](https://github.com/srtfisher)\n- [All Contributors](../../contributors)\n\n## License\n\nThe GNU General Public License (GPL) license. Please see [License File](LICENSE) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falleyinteractive%2Ffeed-consumer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falleyinteractive%2Ffeed-consumer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falleyinteractive%2Ffeed-consumer/lists"}