Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove permalink-based features from nonpublic CPTs #12046

Merged
merged 2 commits into from
Nov 20, 2018
Merged

Remove permalink-based features from nonpublic CPTs #12046

merged 2 commits into from
Nov 20, 2018

Conversation

johnwatkins0
Copy link
Member

@johnwatkins0 johnwatkins0 commented Nov 18, 2018

Description

Fixes #12008.
Using the released version of the plugin, I came across the error described in #12008 when enabling the new editor for a non-public CPT with an admin UI. I think that issue has been resolved in this repo (and can probably be closed) since the last release, but I found a few other small things to update for non-public CPTs. This PR makes the following changes:

  1. Remove the "View Post" link from the publish post notice in the editor. Now it just says "Post published".
  2. Skip the "What's next?" sidebar step for non-public CPT because it only pertains to permalinks, which aren't applicable to nonpublic CPTs. If other content is added to this sidebar in the future, the permalink section can be omitted instead of skipping the sidebar step. With this change, when the user confirms publish, the sidebar goes back to the default view instead of to "What's next?"

How has this been tested?

A failing unit test was resolved, and a new unit test added. Tested in the browser using both a non-public CPT and the built-in post type (where everything should be unchanged).

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • My code has proper inline documentation.

@youknowriad youknowriad requested review from jorgefilipecosta and a team November 20, 2018 13:09
@gziolo gziolo added [Type] Bug An existing feature does not function as intended [Feature] Permalink The permalink of a post or page and the experience of setting or editing it [Feature] Document Settings Document settings experience labels Nov 20, 2018
@gziolo gziolo added this to the 4.6 milestone Nov 20, 2018
Copy link
Member

@jorgefilipecosta jorgefilipecosta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your contribution @johnwatkins0. The code looks good and tested correctly.

@youknowriad youknowriad merged commit 095c65c into WordPress:master Nov 20, 2018
@youknowriad youknowriad modified the milestones: 4.6, 4.5 Nov 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Document Settings Document settings experience [Feature] Permalink The permalink of a post or page and the experience of setting or editing it [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Permalinks: Don't show the sidebar panel for CPTs that aren't viewable.
4 participants