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

Conversation

Projects
None yet
4 participants
@johnwatkins0
Contributor

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 WordPress/gutenberg-core Nov 20, 2018

@gziolo gziolo added this to the 4.6 milestone Nov 20, 2018

@jorgefilipecosta

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

@youknowriad youknowriad merged commit 095c65c into WordPress:master Nov 20, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@youknowriad youknowriad modified the milestones: 4.6, 4.5 Nov 20, 2018

grey-rsi pushed a commit to OnTheGoSystems/gutenberg that referenced this pull request Nov 22, 2018

Remove permalink-based features from nonpublic CPTs (WordPress#12046)
* Remove permalink features from nonpublic CPTs

* Use lodash get to get post type 'viewable' setting
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment