This repository has been archived by the owner on Mar 26, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 30
NPRML Construction Changes #65
Open
jwcounts
wants to merge
12
commits into
npr:master
Choose a base branch
from
jwcounts:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NPRML class uses wp_get_attachment_url() instead of attachment GUID Deduplication between direct attachments and enclosures
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). |
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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.