Skip to content
This repository has been archived by the owner on Mar 26, 2021. It is now read-only.

NPRML Construction Changes #65

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
Open

NPRML Construction Changes #65

wants to merge 12 commits into from

Conversation

jwcounts
Copy link

@jwcounts jwcounts commented Jan 2, 2019

These modifications made to classes/nprml.php help with sending media file attachments to the NPR API/NPR One from Wordpress sites that use media offload plugins, such as WP Offload Media by Delicious Brains. The full scope of the modifications is detailed in this issue on the base fork.

It is currently working on our production site, as well as KTOO's website. It has also been tested on a base Wordpress install and one with the Powerpress podcasting plugin installed.

NPRML class uses wp_get_attachment_url() instead of attachment GUID
Deduplication between direct attachments and enclosures
@davidmpurdy
Copy link

I think it's worth noting that this isn't just about support for one specific plugin. I believe it also lines things up more generally with Wordpress best practices (e.g., not relying on GUID to be a link to the media file) that could help in other situations as well (such as when a site has migrated to another domain and GUIDs have properly been left unchanged).

@eteare eteare self-assigned this Jan 7, 2019
tamw-wnet and others added 11 commits May 5, 2021 18:35
resolves error raised when any non-admin user tries to trash a post
* NPRML Construction Changes

NPRML class uses wp_get_attachment_url() instead of attachment GUID
Deduplication between direct attachments and enclosures

* Change image_guid variable name to match content

Co-authored-by: Jared Counts <jcounts@houstonpublicmedia.org>
- arrays use square brackets instead of keyword
- Indents are tabs equal to 4 spaces
- Conditionals use {} instead of keywords (endif, etc)
- spaces within and around () unless they're empty
- removed spaces after ! in conditionals

*NOTE*: none of the code actually changed
This was strictly for my own sanity/edification
* If 'layout' is available in the NPR Story API output, generate complex HTML to render any images, YouTube videos, Tweets, iframes, or JavaScript-based widgets within the post in the order they appeared on the NPR website.

* if using the NPR "layout" only sideload primary story image into WordPress Media Library instead of all referenced images in the story

* Adding help text for layout option

Updating the text for the layout checkbox explaining that it may require a ticket with NPR to update their Story API key to get the layout section.

* Further tweaks to the help text for the
* Update settings.php

* Update NPRAPIWordpress.php

* Update NPRAPIWordpress.php

Co-authored-by: William Tam (WNET) <tamw-wnet@users.noreply.github.com>
Bug fixes
Resolving merge conflicts with main branch
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants