-
Notifications
You must be signed in to change notification settings - Fork 4
Generate WP posts with rich layout including multimedia etc #4
Conversation
…x 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.
…Press Media Library instead of all referenced images in the story
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks good, and I like that the additions are only enabled if the "layout" tag is included in the API response. I would really like to test it with data from the API, but I haven't been able to find an article with the "layout" tag available yet.
@jwcounts I think you actually have to make a request to NPR to have the 'layout' stuff added to your key. |
Okay, waiting to hear back from NPR Support. I'm good with merging in the meantime. |
I'm going to add some help text to the README and/or the settings page so people know how to enable 'layout' for their keys. "They should open a ticket requesting layout permissions for their Story API Key. Have them please provide the key in the request so we can make sure we know which one we're adding those permissions to." |
Sounds good
Jared Counts
Sent from my Mobile Command Center
… On Jan 21, 2022, at 09:44, William Tam (WNET) ***@***.***> wrote:
I'm going to add some help text to the README and/or the settings page so people know how to enable 'layout' for their keys. "They should open a ticket requesting layout permissions for their Story API Key. Have them please provide the key in the request so we can make sure we know which one we're adding those permissions to."
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.
|
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.
@jwcounts I've added the help text -- I'm going to let you make that request to NPR so you can see what the behavior is with the layout stuff before pushing this forward. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would suggest breaking the added line into it's own paragraph, maybe bolded or italicized. You would end up with 3 paragraphs, which may make it a little more legible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That works
The NPR Story API includes a 'layout' section for most stories that references inline the placement of multimedia objects such as images, videos, Twitter embeds, javascript widgets, etc. This pull request adds the ability for the WP site admin to import stories using that rich layout including the multimedia objects, in the order they appeared in the NPR.org story. It adds a checkbox to the admin to enable this functionality. As of this commit, Slideshows are not imported, only the first image in the slideshow.