WP Manifestindependent plugin directory
manifest / content / dpa-digitalwires-wireq-wordpress-plugin

dpa-digitalwires-to-wordpress

Best practices of how to receive dpa-digitalwires via wireQ API and import it to Wordpress.

★ 0stars
v1.3.0latest · 2 years ago

Install

Download source zip No release zip yet

This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/dpa-newslab/dpa-digitalwires-wireq-wordpress-plugin/archive/refs/heads/main.zip
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

Import dpa-digitalwires via wireQ-API to Wordpress CMS

This repository shows how to import dpa-articles to Wordpress via a plugin which is based on the wireQ-API.

Setup

  • Copy the plugin folder to wp-content/plugins/dpa-digitalwires-to-wordpress
  • Activate plugin in the WP-admin-dashboard
  • Add your wireQ-Endpoint to the plugin's settings and tick the "active"-checkbox

Details

Wordpress cronjobs

This plugin uses WP-Cron which has some drawbacks (e.g. to work properly, regular site visits are required).

To setup a real cronjob use your system's task scheduler to trigger wp-cron.php as specified in the Wordpress-documentation.

Embeds

The plugin imports Web Components contained in dpa-articles as HTML. Therefore needed HTML-tags are allowed. To render the components you have to define them. This could be done by loading dnl_embeds.js in your template. You can directly use the pre-built dnl_embeds.js. For details on how to add scripts to a theme please refer to the Wordpress-documentation.

Customization

To customize the imported article use the dpa_digitalwires_post_process_post-filter, e.g. by adding the following snippet to the functions.php of your theme:

function modify_digitalwires_post($value, $dw_entry){
    $value["post_title"] = $value["post_title"] . " (dpa)";
    return $value;
}
add_filter("dpa_digitalwires_post_process_post", "modify_digitalwires_post", 10, 2);

This will add (dpa) to the title of every imported post.

For customization reaching further than a modification of the inserted post you might want to modify the plugin code directly. The post_process_post-function might be a good starting point.

Releases

5 releases.

Tag
Published
v1.3.0 latest
Mar 4, 2024 2 years ago
Nov 22, 2023 2 years ago
Oct 18, 2023 3 years ago
Feb 17, 2022 4 years ago
Nov 8, 2021 5 years ago

These releases are tags only. The author does not attach a packaged zip, so there are no download counts to report.