Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Revamp notice appearing in AMP Enabled toggle, revamp how plugin determines whether AMP can be disabled #5010
Revamp notice appearing in AMP Enabled toggle, revamp how plugin determines whether AMP can be disabled #5010
Changes from 26 commits
5bcc30a
f3ba560
6f037ab
490fe5a
723a7bb
a6596ba
dc1d73a
88d1c8b
14aeece
1919ec1
ab52015
d85ec63
668d0d9
2a13776
75487f4
270d604
e1f3871
7a0ab77
3a326c3
8c51a9d
3315937
a39c212
fefff34
dac8963
6e190c5
7df6a05
e07656a
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you think
AMP_Post_Meta_Box::get_status_and_errors
should be refactored into 2 separate methods? The returned status is now only being used in 1 instance (AMP_Post_Meta_Box::get_amp_enabled_rest_field
), and the set of errors are used twice elsewhere (AMP_Post_Meta_Box::enqueue_block_assets
andAMP_Post_Meta_Box::render_status
).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's being used both in
AMP_Post_Meta_Box::sanitize_status()
andAMP_Post_Meta_Box::render_status()
, in the latter case it appears to not be used only because the usage is in theinclude
file at the end of the method.Nevertheless, I'm not in love with
get_status_and_errors
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Byebye!