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

NPR Story API for WordPress Version 1.6

Compare
Choose a tag to compare
@mike-douglas mike-douglas released this 30 Jun 14:06
· 123 commits to master since this release
  • Added meta box to post edit page to explicitly push a story to NPR One
  • Added documentation
  • If pushing a story to NPR fails, the error message is displayed on the post edit page
  • If it succeeds, a success message is displayed
  • Rename the plugin to "NPR Story API"
  • The plugin now requires certain WordPress capabilities before performing API actions:
    • deleting posts in the API now requires the delete_others_posts capability for the user trying to delete the post. In effect, this limits deletion of stories from the NPR API to admins and editors.
    • pushing stories to the API requires the publish_posts capability, which means that contributors and guests can't push to NPR.
    • pulling posts from the API requires the edit_posts capability, meaning that contributors and guests can't pull from NPR. We may want to revisit this in the future, or make the permissions filterable if sites using the plugin want to lock permissions down or open them up.
  • A number of settings in the admin now use the number input type instead of text fields
  • Added unit tests for much of the PHP code
  • Most functions were renamed to use the prefix nprstory_ instead of ds_npr_ or no common prefix. This does not affect
  • Added nonces, input sanitization, and input validation for settings.
  • DS_NPR_API class now uses new-style __construct() constructor.
  • Removed /wp-admin/includes/admin.php, /wp-load.php, /wp-includes/class-wp-error.php from the cron job function, see 4b3d65a and cf2dfa3 - the cron job works without them.