-
Notifications
You must be signed in to change notification settings - Fork 43
Fix duplicate "Settings saved" notice on settings page #130
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
Fix duplicate "Settings saved" notice on settings page #130
Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #130 +/- ##
==========================================
Coverage 27.33% 27.33%
Complexity 152 152
==========================================
Files 14 14
Lines 900 900
==========================================
Hits 246 246
Misses 654 654
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
mindctrl
left a comment
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.
Works as expected.
| ?> | ||
|
|
||
| <?php settings_errors(); ?> | ||
| <?php settings_errors( 'ai_experiments' ); ?> |
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.
This is my mistake coming out of #100. Originally I was using this to display errors logged using add_settings_error but then removed that as it wasn't needed, but forgot to remove this. We could just remove this line for now but I'm also fine leaving this in case we do have settings errors we want to display in the future
What?
Closes
#128
Fix duplicate settings notice by specifying option group in
settings_errors()Why?
While changing and saving any changes on AI Experiments page under admin, it was showing the success message as "Settings saved." twice. This PR fixes it to appear only once.
How?
Specified option group under
settings_error()method as belowTesting Instructions
Testing Instructions for Keyboard
Screenshots or screencast