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

Use all eligible post types when all_templates_supported is selected. #1338

Merged
merged 1 commit into from
Aug 14, 2018

Conversation

hellofromtonya
Copy link
Contributor

@hellofromtonya hellofromtonya commented Aug 14, 2018

Per issue 1302, post type notices are being blasted when:

  1. There are no options saved in the database AND
  2. You switch from Classic to either Paired or Native.

The root cause for this problem is that the method AMP_Options_Manager::check_supported_post_type_update_errors() is only considering the selected post types when the all_templates_supported option is selected.

This PR fixes the problem by using all of the eligible post types (and not just the ones that are individually selected) when all_templates_supported option is selected.

Fixes #1302.

Fixes #1302.

In the `check_supported_post_type_update_errors()` method, when `all_templates_supported` option is selected, we want to use all of the eligible post types and not just the ones that are individually selected.  In doing so, this commit fixes #1302 where it blasts erroneous notices about unable to deactivate supported post types.
@hellofromtonya hellofromtonya added the Bug Something isn't working label Aug 14, 2018
@hellofromtonya hellofromtonya added this to the v1.0 milestone Aug 14, 2018
Copy link
Member

@westonruter westonruter left a comment

Choose a reason for hiding this comment

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

Looks great!

@westonruter westonruter merged commit 6a7fd5e into develop Aug 14, 2018
@westonruter westonruter deleted the fix/erroneous-post-type-notices branch August 14, 2018 18:32
@kienstra
Copy link
Contributor

Moving To 'Ready For Merging'

If it's alright, I'm moving this to 'Ready For Merging.' It looks like reproducing this on the staging site will be complex, though we could create a new site for this if you think it's important.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Changing settings can result in erroneous notices regarding post types
3 participants