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

If the API push URL is not set, present a prompt to configure the plugin rather than no metabox #56

Merged
merged 5 commits into from
Sep 25, 2018

Conversation

benlk
Copy link
Contributor

@benlk benlk commented Sep 21, 2018

Changes

If the plugin is enabled and no API push URL is set, rather than silently displaying no metabox, this changeset displays a prompt to the metabox-viewing user to configure the plugin.

The relevant settings page in the plugin is limited to users with the manage_options capability, so for users who don't have that capability, the following metabox is shown:

screen shot 2018-09-21 at 5 55 30 pm

Users with the manage_options capability are given a link to the appropriate settings page:

screen shot 2018-09-21 at 5 55 43 pm

The settings page is unchanged:

screen shot 2018-09-21 at 5 56 50 pm

Why

For #51:

Just updated to the Wordpress API plugin version that was just released and I do not have a box anywhere for NPROne. I have looked in the documentation and that box is not available on my screen or options. What happened?

Questions:

  • Does this affect tests? (This is @benlk's problem)
  • Does the text in the meta box need to be revised?
  • Are there any changes that need to be made to the settings page?
  • Are there any parts of the plugin documentation outside of WordPress that need to be changed?

…gin rather than having no metabox in the post.

For #51
@benlk benlk added this to the 1.7.2 milestone Sep 21, 2018
@benlk benlk self-assigned this Sep 21, 2018
@benlk
Copy link
Contributor Author

benlk commented Sep 21, 2018

Regarding the question of whether documentation needs to be adjusted, readme.txt says this:

== Installation ==

  1. Upload the plugin files to the /wp-content/plugins/plugin-name directory, or install the plugin through the WordPress plugins screen directly.
  2. Activate the plugin through the 'Plugins' screen in WordPress
  3. Use the Settings->NPR API screen to configure the plugin. Begin by entering your API Key, then add your Push URL and Org ID.

And the documentation at https://github.com/npr/nprapi-wordpress/blob/master/docs/installation.md also mentions configuring the API push URL.

I don't believe that we need to adjust the documentation.

@eteare
Copy link
Contributor

eteare commented Sep 24, 2018

Ben,
Meta box
For the folks who have manage_options capacity, can the copy simply read:
"The NPR API plugin's settings must be configured to push stories to the NPR API. Instructions here"
Configure the Plugin (big blue button)
Docs
I updated the docs to reflect changes we've made.
I don't think we need any more copy updates outside of the plugin.

@benlk
Copy link
Contributor Author

benlk commented Sep 24, 2018

manage_options meta box has been updated.

screen shot 2018-09-24 at 6 18 52 pm

@benlk benlk merged commit 04bb881 into master Sep 25, 2018
@benlk benlk deleted the 51-post-box-prompt branch September 25, 2018 22:40
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.

None yet

2 participants