Skip to content

only show status on supported post types#2692

Closed
paulschreiber wants to merge 1 commit intoampproject:masterfrom
paulschreiber:fix/status
Closed

only show status on supported post types#2692
paulschreiber wants to merge 1 commit intoampproject:masterfrom
paulschreiber:fix/status

Conversation

@paulschreiber
Copy link
Copy Markdown
Contributor

Fixes the post metabox so AMP Status is not show on unsupported post types.

@googlebot googlebot added the cla: yes Signed the Google CLA label Jun 26, 2019
@westonruter
Copy link
Copy Markdown
Member

Originally this was intentional in order to provide discovery for enabling the post types. But this was perhaps too “in your face”.

@paulschreiber
Copy link
Copy Markdown
Contributor Author

Without this patch, you see the AMP enabled/disabled radio button on CPTs that aren't AMP-enabled (or aren't logically posts, such as custom page layouts). Clicking the "edit" link won't make that content available; it will instead show you a warning:
image

@westonruter
Copy link
Copy Markdown
Member

Yes, that is what I meant was intentional.

@swissspidy
Copy link
Copy Markdown
Collaborator

I can see how this is confusing though. Is this shown only to admins or also other authors?

@westonruter
Copy link
Copy Markdown
Member

Yeah, if we show it then it should be limited to admins.

@swissspidy
Copy link
Copy Markdown
Collaborator

Just checked, even contributors currently see that message.

@paulschreiber Would showing the message just for admins (users with manage_options capability) work for your environment?

@swissspidy swissspidy added the Needs More Info Follow-up required in order to be actionable. label Jun 28, 2019
@paulschreiber
Copy link
Copy Markdown
Contributor Author

@swissspidy Showing the message only for admins is an improvement.

@swissspidy
Copy link
Copy Markdown
Collaborator

In addition to only showing for admins, I think it also should just be an info notice, not a warning. Or ideally, really not show anything.

I opened #2724 to discuss this more broadly.

@westonruter
Copy link
Copy Markdown
Member

This will need to be re-factored to implement in the block editor.

The PR also needs to target develop. So I'm going to close this PR in favor of opening a new issue to capture the full scope: #4593.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yes Signed the Google CLA Needs More Info Follow-up required in order to be actionable.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants